<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wayne</title>
	<atom:link href="http://zhengwei.name/feed/" rel="self" type="application/rss+xml" />
	<link>http://zhengwei.name</link>
	<description>在思考中成长, :)</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:47:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mac 下使用 rvm 安装 ree 报段错误</title>
		<link>http://zhengwei.name/2012/01/mac-%e4%b8%8b%e4%bd%bf%e7%94%a8-rvm-%e5%ae%89%e8%a3%85-ree-%e6%8a%a5%e6%ae%b5u%e9%94%99%e8%af%af/</link>
		<comments>http://zhengwei.name/2012/01/mac-%e4%b8%8b%e4%bd%bf%e7%94%a8-rvm-%e5%ae%89%e8%a3%85-ree-%e6%8a%a5%e6%ae%b5u%e9%94%99%e8%af%af/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 16:44:14 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=262</guid>
		<description><![CDATA[背景 系统版本：Mac OS X Lion 使用 rvm install ree 报错：./ext/purelib.rb:2: [BUG] Segmentation fault 解决方法 export CC=/usr/bin/gcc-4.2 如果还是无法安装，请尝试先 rvm remove ree 后再行安装，即： rvm remove ree export CC=/usr/bin/gcc-4.2 rvm install ree 参考 《Segmentation fault in (RVM) REE installation》 《Segmentation fault while installing &#8230; <a href="http://zhengwei.name/2012/01/mac-%e4%b8%8b%e4%bd%bf%e7%94%a8-rvm-%e5%ae%89%e8%a3%85-ree-%e6%8a%a5%e6%ae%b5u%e9%94%99%e8%af%af/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>背景</strong></p>
<p>系统版本：Mac OS X Lion<br />
使用 rvm install ree 报错：./ext/purelib.rb:2: [BUG] Segmentation fault</p>
<p><strong>解决方法</strong></p>
<blockquote><p>export CC=/usr/bin/gcc-4.2</p></blockquote>
<p>如果还是无法安装，请尝试先 rvm remove ree 后再行安装，即：</p>
<blockquote><p>rvm remove ree<br />
export CC=/usr/bin/gcc-4.2<br />
rvm install ree</p></blockquote>
<p><strong>参考</strong></p>
<ul>
<li><a href="https://gist.github.com/1098549" target="_blank">《Segmentation fault in (RVM) REE installation》</a></li>
<li><a href="http://groups.google.com/group/emm-ruby/browse_thread/thread/b58b617d9bc7a222" target="_blank">《Segmentation fault while installing REE on OS X 10.6.7》</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2012/01/mac-%e4%b8%8b%e4%bd%bf%e7%94%a8-rvm-%e5%ae%89%e8%a3%85-ree-%e6%8a%a5%e6%ae%b5u%e9%94%99%e8%af%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>多版本环境下，将PHP扩展编译安装至指定版本目录下</title>
		<link>http://zhengwei.name/2011/12/%e5%a4%9a%e7%89%88%e6%9c%ac%e7%8e%af%e5%a2%83%e4%b8%8b%ef%bc%8c%e5%b0%86php%e6%89%a9%e5%b1%95%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e8%87%b3%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9b%ae%e5%bd%95/</link>
		<comments>http://zhengwei.name/2011/12/%e5%a4%9a%e7%89%88%e6%9c%ac%e7%8e%af%e5%a2%83%e4%b8%8b%ef%bc%8c%e5%b0%86php%e6%89%a9%e5%b1%95%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e8%87%b3%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9b%ae%e5%bd%95/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 17:15:52 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Mac OS]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=259</guid>
		<description><![CDATA[今晚在 MBP 上装 mongo 开发环境时遇到了个问题，在此记录下。 环境 MacOS Lion 自带PHP 5.3.6，安装在 /usr 下，另外自己又编译安装了PHP 5.3.8，安装在 /opt/php 下，也就是说目前系统存在两个版本的 PHP，根据 $PATH 的查询顺序，默认的 PHP 版本为系统自带的 5.3.6 问题 &#38; 解决方法 在编译安装 mongo 扩展时发现在 make install 时，扩展会被安装至 /usr/lib/php/extensions/no-debug-non-zts-20090626/，这并非我要的结果，原先想直接 copy 到 5.3.8 版本目录下，后来想想编译环境可能会不同，怕会有版本差异导致运行不稳定，还是研究下吧。 重新解压缩源码，使用 5.3.8 版本的 phpize 配置完后发现目录下的 &#8230; <a href="http://zhengwei.name/2011/12/%e5%a4%9a%e7%89%88%e6%9c%ac%e7%8e%af%e5%a2%83%e4%b8%8b%ef%bc%8c%e5%b0%86php%e6%89%a9%e5%b1%95%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e8%87%b3%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9b%ae%e5%bd%95/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今晚在 MBP 上装 mongo 开发环境时遇到了个问题，在此记录下。</p>
<p><strong>环境</strong></p>
<p>MacOS Lion 自带PHP 5.3.6，安装在 /usr 下，另外自己又编译安装了PHP 5.3.8，安装在 /opt/php 下，也就是说目前系统存在两个版本的 PHP，根据 $PATH 的查询顺序，默认的 PHP 版本为系统自带的 5.3.6</p>
<p><strong>问题 &amp; 解决方法</strong></p>
<p>在编译安装 mongo 扩展时发现在 make install 时，扩展会被安装至 /usr/lib/php/extensions/no-debug-non-zts-20090626/，这并非我要的结果，原先想直接 copy 到 5.3.8 版本目录下，后来想想编译环境可能会不同，怕会有版本差异导致运行不稳定，还是研究下吧。</p>
<p>重新解压缩源码，使用 5.3.8 版本的 phpize 配置完后发现目录下的 configure.in 文件被更新了，打开粗阅了下发现和 php-config 有关，经过尝试后得出解决方法：</p>
<blockquote><p>cd mongo-1.2.6<br />
/opt/php/bin/phpize<br />
./configure &#8211;prefix=/opt/php &#8211;with-php-config=/opt/php/bin/php-config<br />
make<br />
make install</p></blockquote>
<p>关键在于第三行指定 php-config 语句。最终 make install 执行后显示：</p>
<blockquote><p>Installing shared extensions:     /opt/php/lib/php/extensions/no-debug-non-zts-20090626/</p></blockquote>
<p>至此问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/12/%e5%a4%9a%e7%89%88%e6%9c%ac%e7%8e%af%e5%a2%83%e4%b8%8b%ef%bc%8c%e5%b0%86php%e6%89%a9%e5%b1%95%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e8%87%b3%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9b%ae%e5%bd%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacOS 中的扩展属性</title>
		<link>http://zhengwei.name/2011/12/macos-%e4%b8%ad%e7%9a%84%e6%89%a9%e5%b1%95%e5%b1%9e%e6%80%a7/</link>
		<comments>http://zhengwei.name/2011/12/macos-%e4%b8%ad%e7%9a%84%e6%89%a9%e5%b1%95%e5%b1%9e%e6%80%a7/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 03:03:38 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Mac OS]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=258</guid>
		<description><![CDATA[在终端中输入 ls -l 常常可以看到部分文件的结尾含有@符号，如： -rw-r&#8211;r&#8211;@  1 Wayne  staff   14789551 10 13 20:59 php-5.3.8.tar.gz 平时在忙工作就没细究，直到今天在v2ex看到有朋友提出了这个问题，参考了回帖中提及的资料做了此份笔记。 它是什么 文件的扩展属性标记 存放文件的元数据信息，存储在HFS文件系统内 常规浏览时不可见 许多流行的文件系统都支持这类元数据 除了@，还有+，表明文件拥有非标准的权限集，这些权限集在一些ACLs系统中使用 查看元数据属性的方式 ls -@ 即可。 注：com.apple.quarantine 属性表面文件是从互联网下载到本地的，在首次打开文件时候会弹出提示框要求用户是否确认要打开此文件，如果选“是”，此属性即被清除 如何管理 xattr用于访问和管理这些元数据，用法如下： xattr &#60;file&#62; 打印元数据 xattr -l &#60;file&#62; 打印详细的元数据信息，如：文件下载工具、下载时间 xattr -w &#60;attr&#62; &#60;file&#62; &#8230; <a href="http://zhengwei.name/2011/12/macos-%e4%b8%ad%e7%9a%84%e6%89%a9%e5%b1%95%e5%b1%9e%e6%80%a7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>在终端中输入 ls -l 常常可以看到部分文件的结尾含有@符号，如：</p>
<blockquote><p>-rw-r&#8211;r&#8211;<span style="color: #ff0000;">@</span>  1 Wayne  staff   14789551 10 13 20:59 php-5.3.8.tar.gz</p></blockquote>
<p>平时在忙工作就没细究，直到今天在v2ex看到有朋友提出了这个问题，参考了回帖中提及的<a href="http://psionides.eu/2008/06/30/ls-on-mac-and-extended-file-attributes/">资料</a>做了此份笔记。</p>
<p><strong>它是什么</strong></p>
<p>文件的扩展属性标记</p>
<ul>
<li>存放文件的元数据信息，存储在HFS文件系统内</li>
<li>常规浏览时不可见</li>
<li>许多流行的文件系统都支持这类元数据</li>
<li>除了@，还有+，表明文件拥有非标准的权限集，这些权限集在一些ACLs系统中使用</li>
<li>查看元数据属性的方式 ls -@ 即可。<br />
注：com.apple.quarantine 属性表面文件是从互联网下载到本地的，在首次打开文件时候会弹出提示框要求用户是否确认要打开此文件，如果选“是”，此属性即被清除</li>
</ul>
<p><strong>如何管理</strong></p>
<p>xattr用于访问和管理这些元数据，用法如下：</p>
<ul>
<li>xattr &lt;file&gt; 打印元数据</li>
<li>xattr -l &lt;file&gt; 打印详细的元数据信息，如：文件下载工具、下载时间</li>
<li>xattr -w &lt;attr&gt; &lt;file&gt; 新增元数据</li>
<li>xattr -d &lt;attr&gt; &lt;file&gt; 删除元数据</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/12/macos-%e4%b8%ad%e7%9a%84%e6%89%a9%e5%b1%95%e5%b1%9e%e6%80%a7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修正招行专业版客户端在 Windows 7 中乱码的问题（Parallels Desktop）</title>
		<link>http://zhengwei.name/2011/11/%e4%bf%ae%e6%ad%a3%e6%8b%9b%e8%a1%8c%e4%b8%93%e4%b8%9a%e7%89%88%e5%ae%a2%e6%88%b7%e7%ab%af%e5%9c%a8-windows-7-%e4%b8%ad%e4%b9%b1%e7%a0%81%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%88parallels-desktop%ef%bc%89/</link>
		<comments>http://zhengwei.name/2011/11/%e4%bf%ae%e6%ad%a3%e6%8b%9b%e8%a1%8c%e4%b8%93%e4%b8%9a%e7%89%88%e5%ae%a2%e6%88%b7%e7%ab%af%e5%9c%a8-windows-7-%e4%b8%ad%e4%b9%b1%e7%a0%81%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%88parallels-desktop%ef%bc%89/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 03:56:04 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Mac OS]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=256</guid>
		<description><![CDATA[平台 Windows 7 简体中文版，基于 Parallels Desktop 问题一：安装过程、登录界面及菜单乱码 控制面版 -&#62; 时钟语言区域 -&#62; 更改显示语言 -&#62; 切换为“管理”标签 -&#62; 在非Unicode程序的语言中点击“更改系统区域设置”改为“中文（简体 中国）” -&#62; 确定 -&#62; 重新启动电脑 -&#62; 重新安专业版网银 问题二：转账过程中提醒时间错误 控制面板 -&#62; 区域设置 -&#62; 将时间格式从 yyyy/mm/dd 修改为 yyyy-mm-dd 原文：http://blog.sina.com.cn/s/blog_549097390100qaf2.html]]></description>
			<content:encoded><![CDATA[<p><strong>平台</strong></p>
<p>Windows 7 简体中文版，基于 Parallels Desktop</p>
<p><strong>问题一：安装过程、登录界面及菜单乱码</strong></p>
<p>控制面版 -&gt; 时钟语言区域 -&gt; 更改显示语言 -&gt; 切换为“管理”标签 -&gt; 在非Unicode程序的语言中点击“更改系统区域设置”改为“中文（简体 中国）” -&gt; 确定 -&gt; 重新启动电脑 -&gt; 重新安专业版网银</p>
<p><strong>问题二：转账过程中提醒时间错误</strong></p>
<p>控制面板 -&gt; 区域设置 -&gt; 将时间格式从 yyyy/mm/dd 修改为 yyyy-mm-dd</p>
<p>原文：http://blog.sina.com.cn/s/blog_549097390100qaf2.html</p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/11/%e4%bf%ae%e6%ad%a3%e6%8b%9b%e8%a1%8c%e4%b8%93%e4%b8%9a%e7%89%88%e5%ae%a2%e6%88%b7%e7%ab%af%e5%9c%a8-windows-7-%e4%b8%ad%e4%b9%b1%e7%a0%81%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%88parallels-desktop%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>launchctl 笔记</title>
		<link>http://zhengwei.name/2011/11/lanunchctl-notes/</link>
		<comments>http://zhengwei.name/2011/11/lanunchctl-notes/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 05:54:26 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Mac OS]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=254</guid>
		<description><![CDATA[相关目录 /System/Library/LaunchDaemons 操作系统，用户登录前生效，以 root 身份执行任务 /System/Library/LaunchAgents 操作系统，用户登录后生效，以 root 身份执行任务 /Library/LaunchDaemons 系统管理员，用户登录前生效，以 root 身份执行任务 /Library/LaunchAgents 系统管理员，用户登录后生效，以 root 身份执行任务 ~/Library/LaunchAgents 当前用户，用户登录后生效，以当前登录用户身份执行任务 使任务生效 将 plist 文件按需要放置在上文的相关目录中 launchctl load &#60;plist path&#62; 执行上述操作后任务会立即生效，且重启系统后也会自动生效。如果 plist 没有放在指定的目录，重启系统后不会再生效。 如果 plist 存在 Key Disabled，且其值为 true，launchctl load 会提示 nothing found to load，系统启动时也不会自动生效人物，如果要手动强制启动，忽略 &#8230; <a href="http://zhengwei.name/2011/11/lanunchctl-notes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>相关目录</strong></p>
<ul>
<li>/System/Library/LaunchDaemons 操作系统，用户登录前生效，以 root 身份执行任务</li>
<li>/System/Library/LaunchAgents 操作系统，用户登录后生效，以 root 身份执行任务</li>
<li>/Library/LaunchDaemons 系统管理员，用户登录前生效，以 root 身份执行任务</li>
<li>/Library/LaunchAgents 系统管理员，用户登录后生效，以 root 身份执行任务</li>
<li>~/Library/LaunchAgents 当前用户，用户登录后生效，以当前登录用户身份执行任务</li>
</ul>
<p><strong>使任务生效</strong></p>
<ol>
<li>将 plist 文件按需要放置在上文的相关目录中</li>
<li>launchctl load &lt;plist path&gt;</li>
</ol>
<p>执行上述操作后任务会立即生效，且重启系统后也会自动生效。如果 plist 没有放在指定的目录，重启系统后不会再生效。</p>
<p>如果 plist 存在 Key Disabled，且其值为 true，launchctl load 会提示 nothing found to load，系统启动时也不会自动生效人物，如果要手动强制启动，忽略 Disabled 为 true 带来的影响，传递 -wF 参数给 launchctl 即可。</p>
<p><strong>使任务失效</strong></p>
<ol>
<li>launchctl unload &lt;plist path&gt;</li>
<li>将相关 plist 文件从原有目录中移除</li>
</ol>
<p>执行上述操作后，任务会立即失效，plist 文件不会被移除，但是如果不将其从相关目录移走的话，重启系统后任务仍然会自动生效。</p>
<p>plist 文件范例</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;name.zhengwei.test&lt;/string&gt;

  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;/Users/Wayne/Desktop/test.sh&lt;/string&gt;
  &lt;/array&gt;

  &lt;key&gt;Nice&lt;/key&gt;
  &lt;integer&gt;1&lt;/integer&gt;

  &lt;key&gt;StartInterval&lt;/key&gt;
  &lt;integer&gt;10&lt;/integer&gt;

  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;

  &lt;key&gt;StandardErrorPath&lt;/key&gt;
  &lt;string&gt;/tmp/test.err&lt;/string&gt;

  &lt;key&gt;StandardOutPath&lt;/key&gt;
  &lt;string&gt;/tmp/test.out&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
<ul>
<li>XML 节点层级为 plist &gt; dict &gt; key / value</li>
<li>key /value 以节点的形式交替出现，value 支持的数据格式有 integer、string、array、true、false 等等</li>
<li>Label、Program和ProgramArguments 三个 Key 必须存在</li>
<li>Program 为要启动的应用程序或脚本路径</li>
<li>ProgramArguments 为传给依次传给 Program 的参数集合</li>
</ul>
<p><strong>参考链接</strong></p>
<ul>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html">launchctl 手册</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html">plist 文档</a></li>
</ul>
<p><strong>TODO</strong></p>
<p><strong></strong>KeepAlive</p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/11/lanunchctl-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos上如何yum安装git?</title>
		<link>http://zhengwei.name/2011/11/centos%e4%b8%8a%e5%a6%82%e4%bd%95yum%e5%ae%89%e8%a3%85git/</link>
		<comments>http://zhengwei.name/2011/11/centos%e4%b8%8a%e5%a6%82%e4%bd%95yum%e5%ae%89%e8%a3%85git/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 05:40:22 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=250</guid>
		<description><![CDATA[需要先添加EPEL(Extra Packages for Enterprise Linux) repository： rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm 然后使用yum安装即可： yum install git From：http://51hired.com/questions/13038/centos%E4%B8%8A%E5%A6%82%E4%BD%95yum%E5%AE%89%E8%A3%85git 参考：什么是EPEL]]></description>
			<content:encoded><![CDATA[<p>需要先添加EPEL(Extra Packages for Enterprise Linux) repository：</p>
<blockquote><p>rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm</p></blockquote>
<p>然后使用yum安装即可：</p>
<blockquote><p>yum install git</p></blockquote>
<p>From：http://51hired.com/questions/13038/centos%E4%B8%8A%E5%A6%82%E4%BD%95yum%E5%AE%89%E8%A3%85git</p>
<p>参考：<a href="http://fedoraproject.org/wiki/EPEL">什么是EPEL</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/11/centos%e4%b8%8a%e5%a6%82%e4%bd%95yum%e5%ae%89%e8%a3%85git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>给 git push 和 git pull 设置默认仓库</title>
		<link>http://zhengwei.name/2011/10/%e7%bb%99-git-push-%e5%92%8c-git-pull-%e8%ae%be%e7%bd%ae%e9%bb%98%e8%ae%a4%e4%bb%93%e5%ba%93/</link>
		<comments>http://zhengwei.name/2011/10/%e7%bb%99-git-push-%e5%92%8c-git-pull-%e8%ae%be%e7%bd%ae%e9%bb%98%e8%ae%a4%e4%bb%93%e5%ba%93/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 06:02:34 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=248</guid>
		<description><![CDATA[git config &#8211;global branch.master.remote origin git config &#8211;global branch.master.merge refs/heads/master 参考： git pull的默认地址 How do you get git to always pull from a specific branch?]]></description>
			<content:encoded><![CDATA[<p>git config &#8211;global branch.master.remote origin<br />
git config &#8211;global branch.master.merge refs/heads/master</p>
<p>参考：<br />
<a href="http://www.cnblogs.com/lbsx/archive/2010/10/16/1853193.html">git pull的默认地址</a><br />
<a href="http://stackoverflow.com/questions/658885/how-do-you-get-git-to-always-pull-from-a-specific-branch">How do you get git to always pull from a specific branch?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/10/%e7%bb%99-git-push-%e5%92%8c-git-pull-%e8%ae%be%e7%bd%ae%e9%bb%98%e8%ae%a4%e4%bb%93%e5%ba%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>博客文章开启评论</title>
		<link>http://zhengwei.name/2011/10/%e5%8d%9a%e5%ae%a2%e6%96%87%e7%ab%a0%e5%bc%80%e5%90%af%e8%af%84%e8%ae%ba/</link>
		<comments>http://zhengwei.name/2011/10/%e5%8d%9a%e5%ae%a2%e6%96%87%e7%ab%a0%e5%bc%80%e5%90%af%e8%af%84%e8%ae%ba/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 09:50:31 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[announcement]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=244</guid>
		<description><![CDATA[早期主机在国内的时候，由于众所周知的原因， 不得以全面关闭了文章的评论功能。如今已搬迁至香港机房，安全了，所以开启评论，：） PS：感谢易联主机提供空间！]]></description>
			<content:encoded><![CDATA[<p>早期主机在国内的时候，由于众所周知的原因， 不得以全面关闭了文章的评论功能。如今已搬迁至香港机房，安全了，所以开启评论，：）</p>
<p>PS：感谢<a title="易联主机" href="http://www.elinkhost.com" target="_blank">易联主机</a>提供空间！</p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/10/%e5%8d%9a%e5%ae%a2%e6%96%87%e7%ab%a0%e5%bc%80%e5%90%af%e8%af%84%e8%ae%ba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz X2 插件设计流程概要</title>
		<link>http://zhengwei.name/2011/10/discuz-x2-%e6%8f%92%e4%bb%b6%e8%ae%be%e8%ae%a1%e6%b5%81%e7%a8%8b%e6%a6%82%e8%a6%81/</link>
		<comments>http://zhengwei.name/2011/10/discuz-x2-%e6%8f%92%e4%bb%b6%e8%ae%be%e8%ae%a1%e6%b5%81%e7%a8%8b%e6%a6%82%e8%a6%81/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 04:11:32 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[discuz]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=241</guid>
		<description><![CDATA[基本方法 编辑 config/config_global.php，在页面底部新增如下内容以开启插件开发者模式 // 为2则会在页面上输出所有的嵌入点 $_config['plugindeveloper'] = 1; 登录到后台，完成以下工作 插件 -&#62; 设计新插件，填入插件信息，提交 插件列表 -&#62; 设计 -&#62; 模块，新增“页面嵌入 &#8211; 普通版”类型的模块，程序模块可自定，这里设置为 main.class.php 插件列表 -&#62; 设计 -&#62; 变量，设置好插件所需要的变量（可选操作） 插件列表 -&#62; 启用插件，方便后续调试 在插件目录下新建 main.class.php，包含全局嵌入点类和脚本嵌入点类，查看详细信息 特别注意：调试时注意随时在后台清空页面缓存 手机版 新建 mobile.class.php，类名前缀改为 mobileplugin_，其余同上 插件列表 -&#62; 设计 -&#62; 模块，新增“页面嵌入 &#8230; <a href="http://zhengwei.name/2011/10/discuz-x2-%e6%8f%92%e4%bb%b6%e8%ae%be%e8%ae%a1%e6%b5%81%e7%a8%8b%e6%a6%82%e8%a6%81/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>基本方法</strong></p>
<ol>
<li>编辑 config/config_global.php，在页面底部新增如下内容以开启插件开发者模式<br />
<blockquote><p>// 为2则会在页面上输出所有的嵌入点<br />
$_config['plugindeveloper'] = 1;</p></blockquote>
</li>
<li>登录到后台，完成以下工作
<ol>
<li>插件 -&gt; 设计新插件，填入插件信息，提交</li>
<li>插件列表 -&gt; 设计 -&gt; 模块，新增“页面嵌入 &#8211; 普通版”类型的模块，程序模块可自定，这里设置为 main.class.php</li>
<li>插件列表 -&gt; 设计 -&gt; 变量，设置好插件所需要的变量（可选操作）</li>
<li>插件列表 -&gt; 启用插件，方便后续调试</li>
</ol>
</li>
<li>在插件目录下新建 main.class.php，包含全局嵌入点类和脚本嵌入点类，<a title="查看详细信息" href="http://dev.discuz.org/wiki/index.php?title=%E9%A1%B5%E9%9D%A2%E5%B5%8C%E5%85%A5%E6%A8%A1%E5%9D%97%E5%BC%80%E5%8F%91" target="_blank">查看详细信息</a></li>
</ol>
<p><strong>特别注意：调试时注意随时在后台清空页面缓存</strong></p>
<p><strong>手机版</strong></p>
<ol>
<li>新建 mobile.class.php，类名前缀改为 mobileplugin_，其余同上</li>
<li>插件列表 -&gt; 设计 -&gt; 模块，新增“页面嵌入 &#8211; 手机版”类型的模块，填入 mobile.class.php</li>
<li>导出 xml 文件，将插件和 xml 文件上传至服务器，后台执行“升级”操作即可</li>
</ol>
<p><strong>更新历史</strong></p>
<p>[2012.01.19] 新增手机版插件的开发方法</p>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/10/discuz-x2-%e6%8f%92%e4%bb%b6%e8%ae%be%e8%ae%a1%e6%b5%81%e7%a8%8b%e6%a6%82%e8%a6%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Bitbucket 使用方法</title>
		<link>http://zhengwei.name/2011/10/git-bitbucket-%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95/</link>
		<comments>http://zhengwei.name/2011/10/git-bitbucket-%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 11:52:47 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://zhengwei.name/?p=238</guid>
		<description><![CDATA[将本地代码推送到远程仓库 本地生成SSH key，并设定密码 ssh-keygen 将/.ssh/id_rsa添加到你账户下的公钥列表中 Git 中添加远程仓库 git remote add &#60;name&#62;  git@bitbucket.org:lanisle/repo_name.git 推送代码 git push &#60;name&#62; master 把代码从远程仓库拖回本地 mkdir &#60;repo_dir&#62; cd &#60;repo_dir&#62; 初始化 git init Git 中添加远程仓库 git remote add &#60;name&#62; git@bitbucket.org:lanisle/repo_name.git 拉回代码 git pull &#60;name&#62; master PS： &#60;name&#62;表示远程仓库在本地的标识，如果为origin表示为缺省配置，可直接git push，不需要附带标识 &#60;repo_name&#62;表示远程仓库名称。]]></description>
			<content:encoded><![CDATA[<p><strong>将本地代码推送到远程仓库</strong></p>
<ol>
<li>本地生成SSH key，并设定密码<br />
ssh-keygen</li>
<li>将/.ssh/id_rsa添加到你账户下的公钥列表中</li>
<li>Git 中添加远程仓库<br />
git remote add &lt;name&gt;  git@bitbucket.org:lanisle/repo_name.git</li>
<li>推送代码<br />
git push &lt;name&gt; master</li>
</ol>
<p><strong>把代码从远程仓库拖回本地</strong></p>
<ol>
<li>mkdir &lt;repo_dir&gt;</li>
<li>cd &lt;repo_dir&gt;</li>
<li>初始化<br />
git init</li>
<li>Git 中添加远程仓库<br />
git remote add &lt;name&gt; git@bitbucket.org:lanisle/repo_name.git</li>
<li>拉回代码<br />
git pull &lt;name&gt; master</li>
</ol>
<p>PS：</p>
<ul>
<li>&lt;name&gt;表示远程仓库在本地的标识，如果为origin表示为缺省配置，可直接git push，不需要附带标识</li>
<li>&lt;repo_name&gt;表示远程仓库名称。</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zhengwei.name/2011/10/git-bitbucket-%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

