<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>oldfritter (朱成峰)</title>
    <link>https://ruby-china.org/oldfritter</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>吐槽一下阿里的 OSS 关于 Bucket Policy 的文档</title>
      <description>&lt;p&gt;&lt;a href="https://help.aliyun.com/document_detail/85111.html?spm=a2c4g.11186623.2.14.22b33c28BZRWit#concept-ahc-tx4-j2b" rel="nofollow" target="_blank"&gt;https://help.aliyun.com/document_detail/85111.html?spm=a2c4g.11186623.2.14.22b33c28BZRWit#concept-ahc-tx4-j2b&lt;/a&gt;
这个是汉字版的说明&lt;/p&gt;

&lt;p&gt;&lt;a href="https://partners-intl.aliyun.com/help/doc-detail/100680.htm" rel="nofollow" target="_blank"&gt;https://partners-intl.aliyun.com/help/doc-detail/100680.htm&lt;/a&gt;
这个是英文的&lt;/p&gt;

&lt;p&gt;明显英文的阅读起来更能明白具体意思，怀疑阿里还是靠鬼佬撑起来的。&lt;/p&gt;</description>
      <author>oldfritter</author>
      <pubDate>Fri, 20 Nov 2020 17:33:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/40595</link>
      <guid>https://ruby-china.org/topics/40595</guid>
    </item>
    <item>
      <title>做了好久的 Rails 代码迁移至 Go，顺便开源一个 Go 版的 SneakerWorker</title>
      <description>&lt;h2 id="SneakerWorker for Golang"&gt;&lt;a href="https://github.com/oldfritter/sneaker-go" rel="nofollow" target="_blank" title=""&gt;SneakerWorker for Golang&lt;/a&gt;&lt;/h2&gt;&lt;h3 id="Dependencies 依赖"&gt;Dependencies 依赖&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;RabbitMQ&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="Usage 使用方法"&gt;Usage 使用方法&lt;/h3&gt;
&lt;p&gt;1.在你的项目中的 config 目录下创建以下两个文件&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;amqp.yml
workers.yml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a &lt;a href="https://github.com/oldfritter/sneaker-go/blob/master/example/config" rel="nofollow" target="_blank" title=""&gt;example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;2.workers&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/oldfritter/sneaker-go/blob/master/example/sneakerWorkers" rel="nofollow" target="_blank" title=""&gt;example  示例&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.main&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/oldfritter/sneaker-go/blob/master/example/workers.go" rel="nofollow" target="_blank" title=""&gt;example  示例&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="workers.yml配置说明"&gt;workers.yml 配置说明&lt;/h3&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
- name: TreatWorker  # worker的名称
  exchange: sneaker.example.default  # 消息经过的Exchange
  routing_key: sneaker.example.treat  # 消息经过的routing_key
  queue: sneaker.example.treat  # 消息进入的queue
  durable: true
  ack: true  # 是否ack
  threads: 1  # 并发处理数量
  steps:  # 重试队列的延时配置
    - 5000       # 5 Second
    - 30000      # 30 Second
    - 60000      # 1 Minute
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>oldfritter</author>
      <pubDate>Fri, 17 Jan 2020 11:21:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/39450</link>
      <guid>https://ruby-china.org/topics/39450</guid>
    </item>
    <item>
      <title>写了一个使用 FFmpeg 的包,给点建议</title>
      <description>&lt;p&gt;项目地址
&lt;a href="https://github.com/oldfritter/ffmpeg" rel="nofollow" target="_blank"&gt;https://github.com/oldfritter/ffmpeg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;使用例子&lt;/p&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"ffmpeg"&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;MyMovie&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;movie&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;ffmpeg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Movie&lt;/span&gt;&lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"/Users/leon/Downloads/4.mp4"&lt;/span&gt;
    &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;movie&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;movie&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>oldfritter</author>
      <pubDate>Wed, 18 May 2016 16:19:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/30062</link>
      <guid>https://ruby-china.org/topics/30062</guid>
    </item>
    <item>
      <title>微信的 oauth2，获取 access_token 接口返回空字符串，什么鬼</title>
      <description>&lt;p&gt;&lt;a href="https://open.weixin.qq.com/sns/oauth2/access_token?appid=wx111111111111&amp;amp;sercet=XXXXXX&amp;amp;code=XXXXXX&amp;amp;grant_type=authorization_code" rel="nofollow" target="_blank"&gt;https://open.weixin.qq.com/sns/oauth2/access_token?appid=wx111111111111&amp;amp;sercet=XXXXXX&amp;amp;code=XXXXXX&amp;amp;grant_type=authorization_code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;请求这个接口给我返回了一个#，response 的 body 是空。
初步怀疑是我的 appid 和 sercet 的问题，请教一下有经验的童鞋。&lt;/p&gt;</description>
      <author>oldfritter</author>
      <pubDate>Tue, 20 Oct 2015 15:56:07 +0800</pubDate>
      <link>https://ruby-china.org/topics/27752</link>
      <guid>https://ruby-china.org/topics/27752</guid>
    </item>
    <item>
      <title>Ruby China 的 Mac 客户端代码有分享么?</title>
      <description>&lt;p&gt;如题，
最近想试试 Mac OS 的应用开发，想学习一下&lt;/p&gt;

&lt;p&gt;&lt;a href="/Rei" class="user-mention" title="@Rei"&gt;&lt;i&gt;@&lt;/i&gt;Rei&lt;/a&gt;, &lt;a href="/lgn21st" class="user-mention" title="@lgn21st"&gt;&lt;i&gt;@&lt;/i&gt;lgn21st&lt;/a&gt;, &lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt;&lt;/p&gt;</description>
      <author>oldfritter</author>
      <pubDate>Mon, 23 Dec 2013 17:38:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/16382</link>
      <guid>https://ruby-china.org/topics/16382</guid>
    </item>
    <item>
      <title>基于 CloudFoundry 部署自己的私有 PaaS 云</title>
      <description>&lt;p&gt;自己做文档，已成功部署
这里介绍的是基于 bosh 的安装方式，使用多台 Server 架设集群，并非单点安装的 dev_setup 方式&lt;/p&gt;
&lt;h2 id="IaaS准备"&gt;IaaS 准备&lt;/h2&gt;
&lt;p&gt;首先要明确云平台是安装在虚拟化平台上的 (说句废话，假如改成每个节点装在一台真实的机子上，首先是硬件成本，其次是人力成本，得有多大的毅力才能维护这系统),节点的创建和管理是托管于 ruby 脚本 (就是那个 bosh)&lt;/p&gt;
&lt;h2 id="这里是用的硬件:"&gt;这里是用的硬件：&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;IBM3850 * 3 (安装 Esxi)&lt;/li&gt;
&lt;li&gt;工作站或者 PC 机  * 1 (安装 win server 2008, VCenter, VClient)&lt;/li&gt;
&lt;li&gt;交换机   * 1 (至少千兆)&lt;/li&gt;
&lt;li&gt;网线  如干 (7 类线)&lt;/li&gt;
&lt;li&gt;路由器  * 1&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="安装过程讲解"&gt;安装过程讲解&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;创建 bosh_cli 节点&lt;/li&gt;
&lt;li&gt;部署 micro bosh 节点&lt;/li&gt;
&lt;li&gt;通过 micro bosh 节点部署 bosh 的六个节点&lt;/li&gt;
&lt;li&gt;通过 director(bosh 六个节点中的一个) 部署 PaaS 云&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;安装命令和配置文件范例
&lt;a href="http://oldfritter.iteye.com/blog/1827599" rel="nofollow" target="_blank"&gt;http://oldfritter.iteye.com/blog/1827599&lt;/a&gt;&lt;/p&gt;</description>
      <author>oldfritter</author>
      <pubDate>Mon, 26 Aug 2013 22:46:57 +0800</pubDate>
      <link>https://ruby-china.org/topics/13648</link>
      <guid>https://ruby-china.org/topics/13648</guid>
    </item>
  </channel>
</rss>
