<?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>兔子窝边草</title>
	<atom:link href="http://yongzou.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yongzou.com</link>
	<description>“Unless you try to do something beyond what you have already mastered, you will never grow.” - Ralph Waldo Emerson</description>
	<lastBuildDate>Fri, 30 Mar 2012 16:11:58 +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>putty tab/dock 窗口管理工具</title>
		<link>http://yongzou.com/putty-tabdock-%e7%aa%97%e5%8f%a3%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7-35/</link>
		<comments>http://yongzou.com/putty-tabdock-%e7%aa%97%e5%8f%a3%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7-35/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 16:11:58 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=35</guid>
		<description><![CDATA[mremoteng，基于mremote的putty窗口管理工具，下载地址：http://www.mremoteng.org/home 原版nremote 08年后没有更新了，下载地址：http://www.mremote.org/wiki/Downloads.ashx nremote一直到了visionapp Remote Desktop]]></description>
			<content:encoded><![CDATA[<p>mremoteng，基于mremote的putty窗口管理工具，下载地址：<a href="http://www.mremoteng.org/home">http://www.mremoteng.org/home</a></p>
<p>原版nremote 08年后没有更新了，下载地址：<a href="http://www.mremote.org/wiki/Downloads.ashx">http://www.mremote.org/wiki/Downloads.ashx</a></p>
<p>nremote一直到了visionapp Remote Desktop</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/putty-tabdock-%e7%aa%97%e5%8f%a3%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7-35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>go语言1.0发布了</title>
		<link>http://yongzou.com/go%e8%af%ad%e8%a8%801-0%e5%8f%91%e5%b8%83%e4%ba%86-31/</link>
		<comments>http://yongzou.com/go%e8%af%ad%e8%a8%801-0%e5%8f%91%e5%b8%83%e4%ba%86-31/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 13:21:11 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=31</guid>
		<description><![CDATA[详见：http://golang.org/ Go is an open source programming environment that makes it easy to build simple, reliable, and efficient software. 下载地址：http://golang.org/doc/install]]></description>
			<content:encoded><![CDATA[<p>详见：<a href="http://golang.org/" target="_blank">http://golang.org/<br />
</a>Go is an open source programming environment that makes it easy to build simple, reliable, and efficient software.</p>
<p>下载地址：<a href="http://golang.org/doc/install" target="_blank">http://golang.org/doc/install</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/go%e8%af%ad%e8%a8%801-0%e5%8f%91%e5%b8%83%e4%ba%86-31/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>很好的程序语言/工具文档</title>
		<link>http://yongzou.com/%e5%be%88%e5%a5%bd%e7%9a%84%e7%a8%8b%e5%ba%8f%e8%af%ad%e8%a8%80%e5%b7%a5%e5%85%b7%e6%96%87%e6%a1%a3-29/</link>
		<comments>http://yongzou.com/%e5%be%88%e5%a5%bd%e7%9a%84%e7%a8%8b%e5%ba%8f%e8%af%ad%e8%a8%80%e5%b7%a5%e5%85%b7%e6%96%87%e6%a1%a3-29/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 13:19:04 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proramming]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=29</guid>
		<description><![CDATA[http://hyperpolyglot.org/ Programming Languages commonly used features in a side-by-side format Interpreted Languages: PHP, Perl, Python, Ruby Interpreted Languages: Tcl, Lua, JavaScript, Io Operating System Automation: POSIX Shell, AppleScript, PowerShell C++ Style Languages: C++, Objective C, Java, C# Pascal Style Languages: &#8230; <a href="http://yongzou.com/%e5%be%88%e5%a5%bd%e7%9a%84%e7%a8%8b%e5%ba%8f%e8%af%ad%e8%a8%80%e5%b7%a5%e5%85%b7%e6%96%87%e6%a1%a3-29/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://hyperpolyglot.org/">http://hyperpolyglot.org/</a></p>
<p>Programming Languages</p>
<div id="page-content">
<p><em>commonly used features in a side-by-side format</em></p>
<table>
<tbody>
<tr>
<td><strong>Interpreted Languages:</strong></td>
<td><a href="/scripting">PHP, Perl, Python, Ruby</a></td>
</tr>
<tr>
<td><strong>Interpreted Languages:</strong></td>
<td><a href="/embeddable">Tcl, Lua, JavaScript, Io</a></td>
</tr>
<tr>
<td><strong>Operating System Automation:</strong></td>
<td><a href="/shell">POSIX Shell, AppleScript, PowerShell</a></td>
</tr>
<tr>
<td><strong>C++ Style Languages:</strong></td>
<td><a href="/cpp">C++, Objective C, Java, C#</a></td>
</tr>
<tr>
<td><strong>Pascal Style Languages:</strong></td>
<td><a href="/pascal">Pascal, Ada, PL/pgSQL, MySQL</a></td>
</tr>
<tr>
<td><strong>Lisp Dialects:</strong></td>
<td><a href="/lisp">Common Lisp, Scheme, Clojure, Emacs Lisp</a></td>
</tr>
<tr>
<td><strong>Type Inference Languages:</strong></td>
<td><a href="/ml">Standard ML, OCaml, Scala, Haskell</a></td>
</tr>
<tr>
<td><strong>Untyped Declarative Languages:</strong></td>
<td><a href="/logic">Prolog, Erlang, Oz</a></td>
</tr>
<tr>
<td><strong>Concatenative Languages:</strong></td>
<td><a href="/stack">Forth, PostScript, Factor</a></td>
</tr>
</tbody>
</table>
<h1 id="toc0">Programming Tools</h1>
<table>
<tbody>
<tr>
<td><strong>Unix Shells:</strong></td>
<td><a href="/unix-shells">Bash, Dash, Ksh, Tcsh, Zsh</a></td>
</tr>
<tr>
<td><strong>Version Control:</strong></td>
<td><a href="/version-control">Git, Mercurial</a></td>
</tr>
<tr>
<td><strong>Tabular Data Selection:</strong></td>
<td><a href="/data">SQL, Awk, Pig</a></td>
</tr>
<tr>
<td><strong>Lightweight Markup</strong></td>
<td><a href="/lightweight-markup">Mediawiki, Wikidot, Markdown, Asciidoc, Confluence</a></td>
</tr>
<tr>
<td><strong>Computer Algebra Software:</strong></td>
<td><a href="/computer-algebra">Maxima, Pari/GP, Mathematica, Sage</a></td>
</tr>
<tr>
<td><strong>Numerical Analysis Software:</strong></td>
<td><a href="/numerical-analysis">Fortran, MATLAB, R, NumPy</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/%e5%be%88%e5%a5%bd%e7%9a%84%e7%a8%8b%e5%ba%8f%e8%af%ad%e8%a8%80%e5%b7%a5%e5%85%b7%e6%96%87%e6%a1%a3-29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase比较</title>
		<link>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/</link>
		<comments>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 13:49:35 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/</guid>
		<description><![CDATA[原文: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can&#8217;t even count &#8230; <a href="http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>原文:</p>
<p><a title="http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis" href="http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis">http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis</a></p>
<h3>Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison</h3>
<p>While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can&#8217;t even count the things that were forced into relational databases, but never really fitted them. </p>
<p>But the differences between &quot;NoSQL&quot; databases are much bigger than it ever was between one SQL database and another. This means that it is a bigger responsibility on <a href="http://kkovacs.eu/kristof-kovacs-software-architect-resume">software architects</a> to choose the appropriate one for a project right at the beginning. </p>
<p>In this light, here is a comparison of <a href="http://cassandra.apache.org/">Cassandra</a>, <a href="http://www.mongodb.org/">Mongodb</a>, <a href="http://couchdb.apache.org/">CouchDB</a>, <a href="http://redis.io/">Redis</a>, <a href="http://www.basho.com/Riak.html">Riak</a> and <a href="http://hbase.apache.org/">HBase</a>: </p>
<p>  <span id="more-27"></span><br />
<h4>CouchDB</h4>
<ul>
<li><strong>Written in:</strong> Erlang </li>
<li><strong>Main point:</strong> DB consistency, ease of use </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Bi-directional (!) replication, </li>
<li>continuous or ad-hoc, </li>
<li>with conflict detection, </li>
<li>thus, master-master replication. (!) </li>
<li>MVCC &#8211; write operations do not block reads </li>
<li>Previous versions of documents are available </li>
<li>Crash-only (reliable) design </li>
<li>Needs compacting from time to time </li>
<li>Views: embedded map/reduce </li>
<li>Formatting views: lists &amp; shows </li>
<li>Server-side document validation possible </li>
<li>Authentication possible </li>
<li>Real-time updates via _changes (!) </li>
<li>Attachment handling </li>
<li>thus, <a href="http://couchapp.org/">CouchApps</a> (standalone js apps) </li>
<li>jQuery library included </li>
</ul>
<p><strong>Best used:</strong> For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. </p>
<p><strong>For example:</strong> CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments. </p>
<h4>Redis</h4>
<ul>
<li><strong>Written in:</strong> C/C++ </li>
<li><strong>Main point:</strong> Blazing fast </li>
<li><strong>License:</strong> BSD </li>
<li><strong>Protocol:</strong> Telnet-like </li>
<li>Disk-backed in-memory database, </li>
<li>but since 2.0, it can swap to disk. </li>
<li>Master-slave replication </li>
<li>Simple keys and values, </li>
<li>but <a href="http://redis.io/commands">complex operations</a> like ZREVRANGEBYSCORE </li>
<li>INCR &amp; co (good for rate limiting or statistics) </li>
<li>Has sets (also union/diff/inter) </li>
<li>Has lists (also a queue; blocking pop) </li>
<li>Has hashes (objects of multiple fields) </li>
<li>Of all these databases, only Redis does transactions (!) </li>
<li>Values can be set to expire (as in a cache) </li>
<li>Sorted sets (high score table, good for range queries) </li>
<li>Pub/Sub and WATCH on data changes (!) </li>
</ul>
<p><strong>Best used:</strong> For rapidly changing data with a foreseeable database size (should fit mostly in memory). </p>
<p><strong>For example:</strong> Stock prices. Analytics. Real-time data collection. Real-time communication. </p>
<h4>MongoDB</h4>
<ul>
<li><strong>Written in:</strong> C++ </li>
<li><strong>Main point:</strong> Retains some friendly properties of SQL. (Query, index) </li>
<li><strong>License:</strong> AGPL (Drivers: Apache) </li>
<li><strong>Protocol:</strong> Custom, binary (BSON) </li>
<li>Master/slave replication </li>
<li>Queries are javascript expressions </li>
<li>Run arbitrary javascript functions server-side </li>
<li>Better update-in-place than CouchDB </li>
<li>Sharding built-in </li>
<li>Uses memory mapped files for data storage </li>
<li>Performance over features </li>
<li>After crash, it needs to repair tables </li>
</ul>
<p><strong>Best used:</strong> If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. </p>
<p><strong>For example:</strong> For all things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back. </p>
<h4>Cassandra</h4>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Best of BigTable and Dynamo </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> Custom, binary (Thrift) </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Querying by column, range of keys </li>
<li>BigTable-like features: columns, column families </li>
<li>Writes are much faster than reads (!) </li>
<li>Map/reduce possible with Apache Hadoop </li>
<li>I admit being a bit biased against it, because of the bloat and complexity it has partly because of Java (configuration, seeing exceptions, etc) </li>
</ul>
<p><strong>Best used:</strong> When you write more than you read (logging). If every component of the system must be in Java. (&quot;No one gets fired for choosing Apache&#8217;s stuff.&quot;) </p>
<p><strong>For example:</strong> Banking, financial industry (though not necessarily for financial transactions, but these industries are much bigger than that.) Writes are faster than reads, so one natural niche is real time data analysis. </p>
<h4>Riak</h4>
<ul>
<li><strong>Written in:</strong> Erlang &amp; C, some Javascript </li>
<li><strong>Main point:</strong> Fault tolerance </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Pre- and post-commit hooks, </li>
<li>for validation and security. </li>
<li>Built-in full-text search </li>
<li>Map/reduce in javascript or Erlang </li>
<li>Comes in &quot;open source&quot; and &quot;enterprise&quot; editions </li>
</ul>
<p><strong>Best used:</strong> If you want something Cassandra-like (Dynamo-like), but no way you&#8217;re gonna deal with the bloat and complexity. If you need very good single-site scalability, availability and fault-tolerance, but you&#8217;re ready to pay for multi-site replication. </p>
<p><strong>For example:</strong> Point-of-sales data collection. Factory control systems. Places where even seconds of downtime hurt. </p>
<h4>HBase</h4>
<p>(With the help of ghshephard) </p>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Billions of rows X millions of columns </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST (also Thrift) </li>
<li>Modeled after BigTable </li>
<li>Map/reduce with Hadoop </li>
<li>Query predicate push down via server side scan and get filters </li>
<li>Optimizations for real time queries </li>
<li>A high performance Thrift gateway </li>
<li>HTTP supports XML, Protobuf, and binary </li>
<li>Cascading, hive, and pig source and sink modules </li>
<li>Jruby-based (JIRB) shell </li>
<li>No single point of failure </li>
<li>Rolling restart for configuration changes and minor upgrades </li>
<li>Random access performance is like MySQL </li>
</ul>
<p><strong>Best used:</strong> If you&#8217;re in love with BigTable. <img src='http://yongzou.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And when you need random, realtime read/write access to your Big Data. </p>
<p><strong>For example:</strong> Facebook Messaging Database (more general example coming soon) </p>
<p>Of course, all systems have much more features than what&#8217;s listed here. I only wanted to list the key points that I base my decisions on. Also, development of all are very fast, so things are bound to change. I&#8217;ll do my best to keep this list updated. </p>
<p>&#8211; Kristof </p>
<p>&#160;</p>
<p>CouchDB   <br />语言 Erlang    <br />特征 数据库一致性，易于使用    <br />适合 积累性的、较少改变的数据。或者是需要文档的多版本支持（？这句话翻译不好 Places where versioning is important）    <br />场合 CRM CMS    </p>
<p>Redis   <br />语言 c/c++    <br />特征 非常快    <br />适合 总数据集快速变化且总量可预测    <br />场合 股票价格、实时分析、实时数据收集、实时通信    </p>
<p>MongoDB   <br />语言 c++    <br />特征 与sql风格类似（查询/索引）    <br />适合 动态查询; 索引比map/reduce方式更合适时; 需要CouchDB但数据变动更多时    <br />场合 任何用Mysql/PostgreSQL，但是无法忍受预先定义好所有列的时候    </p>
<p>Cassandra   <br />语言 java    <br />适合 写入比查询多    <br />略 （我个人也觉得不靠谱）</p>
<p>Riak   <br />语言 c++/erlang javascript    <br />据说有开源版和企业版    <br />特征 容错    <br />适合 需要Cassandra式的扩展性，但是不想惹麻烦    <br />场合 销售数据收集 &#8230; 反正坏一秒就很麻烦的场合    </p>
<p>hbase   <br />语言 java    <br />类似 bigtable    <br />适用 随机读取</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>17 Useful Htaccess Tricks and Tips</title>
		<link>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/</link>
		<comments>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 02:36:47 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/</guid>
		<description><![CDATA[Introduction Some people might not aware of the power of htaccess, I have 17 htaccess methods in this article which I have used or tested it before, and I think some of them are essential tricks and tips to protect &#8230; <a href="http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h4>Introduction</h4>
<p>Some people might not aware of the power of htaccess, I have 17 htaccess methods in this article which I have used or tested it before, and I think some of them are essential tricks and tips to protect your webserver against malicious attacks and other would able to perform simple tasks efficiently such as redirection and web server optimization.</p>
<p>Last but not least, if you have been looking for <a href="http://glowhost.com/">web hosting</a> services, you might want to have a look at this <a href="http://glowhost.com/hosting/shared/unlimited-hosting.php">unlimited web hosting</a>. <img src='http://yongzou.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>General</h4>
<p>The following htaccess will able to help you to achieve simple task such as redirection and web server optimization.</p>
<h4>1. Set Timezone</h4>
<p>Sometimes, when you using date or mktime function in php, it will show you a funny message regarding timezone. This is one of the way to solve it. Set timezone for your server. A list of supported timezone can be found <b><a href="http://www.php.net/manual/en/timezones.php">here</a></b></p>
<pre>SetEnv TZ Australia/Melbourne</pre>
<h4>2. SEO Friendly 301 Permanent Redirects</h4>
<p>Why it&#8217;s SEO friendly? Nowadays, some modern serach engine has the capability to detect 301 Permanent Redirects and update its existing record.</p>
<pre>Redirect 301 http://www.queness.com/home http://www.queness.com/</pre>
<h4>3. Skip the download dialogue</h4>
<p>Usually when you try to download something from a web server you get a request asking whether you want to save the file or open it. To avoid that you can use the below code on your .htaccess file</p>
<pre>AddType application/octet-stream .pdf
AddType application/octet-stream .zip
AddType application/octet-stream .mov</pre>
<h4>4. Skip www</h4>
<p>One of the SEO guideline is, make sure there is only one URL pointing to your website. Therefore, you will need this to redirect all www traffic to non-ww, or the other way around.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.queness.com [NC]
RewriteRule ^(.*)$ http://queness.com/$1 [L,R=301]</pre>
<h4>5. Custom Error page</h4>
<p>Create a custom error page for each of the error codes.</p>
<pre>ErrorDocument 401 /error/401.php
ErrorDocument 403 /error/403.php
ErrorDocument 404 /error/404.php
ErrorDocument 500 /error/500.php</pre>
<h4>6. Compress files</h4>
<p>Optimize your website loading time by compressing files into smaller size.</p>
<pre># compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript</pre>
<h4>7. Cache files</h4>
<p>File caching is another famous approach in optimizing website loading time</p>
<pre>&lt;FilesMatch &quot;.(flv|gif|jpg|jpeg|png|ico|swf|js|css|pdf)$&quot;&gt;
Header set Cache-Control &quot;max-age=2592000&quot;
&lt;/FilesMatch&gt;</pre>
<h4>8. Disable caching for certain file type</h4>
<p>Well, in the other hand, you can disable caching for certain file type.</p>
<pre># explicitly disable caching for scripts and other dynamic files
&lt;FilesMatch &quot;.(pl|php|cgi|spl|scgi|fcgi)$&quot;&gt;
Header unset Cache-Control
&lt;/FilesMatch&gt;</pre>
<h4>Security</h4>
<p>The following htaccess code will able to enhance the security level of your webserver. Hotlinking protection is pretty useful to avoid other people using images that stored in your server.</p>
<h4>1. Hotlinking protection with .htaccess</h4>
<p>Hate it when people stealing bandwidth from your website by using images that are hosted in your web server? Use this, you will able to prevent it from happening.</p>
<pre>RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?queness.com/.*$ [NC]
RewriteRule .(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]</pre>
<h4>2. Prevent hacks</h4>
<p>If you want to increase the security level of your website, you can chuck these few lines of codes to prevent some common hacking techniques by detecting malicious URL patterns.</p>
<pre>RewriteEngine On

# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]

# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]

# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]

# Block out any script that includes a &lt;script&gt; tag in URL
RewriteCond %{QUERY_STRING} (&lt;|%3C).*script.*(&gt;|%3E) [NC,OR]

# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]

# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})

# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]</pre>
<h4>3. Block access to your .htaccess file</h4>
<p>The following code will prevent user to access your .htaccess file. Also, you can block multiple file type as well.</p>
<pre># secure htaccess file
&lt;Files .htaccess&gt;
order allow,deny
deny from all
&lt;/Files&gt;

# prevent viewing of a specific file
&lt;Files secretfile.jpg&gt;
 order allow,deny
 deny from all
&lt;/Files&gt;

# multiple file types
&lt;FilesMatch &quot;.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$&quot;&gt;
 Order Allow,Deny
 Deny from all
&lt;/FilesMatch&gt;</pre>
<h4>4. Rename htaccess files</h4>
<p>You can also rename your .htaccess file name to something else to prevent access.</p>
<pre>AccessFileName htacc.ess</pre>
<h4>5. Disable directory browsing</h4>
<p>Avoid the server from displaying directory index, or the opposite.</p>
<pre># disable directory browsing
Options All -Indexes

# enable directory browsing
Options All +Indexes</pre>
<h4>6. Change default Index page</h4>
<p>You can change the default page index.html, index.php or index.htm to something else.</p>
<pre>DirectoryIndex business.html</pre>
<h4>7. Block unwanted visitor based on referring domain</h4>
<pre># block visitors referred from indicated domains
&lt;IfModule mod_rewrite.c&gt;
 RewriteEngine on
 RewriteCond %{HTTP_REFERER} scumbag.com [NC,OR]
 RewriteCond %{HTTP_REFERER} wormhole.com [NC,OR]
 RewriteRule .* - [F]

&lt;/ifModule&gt;</pre>
<h4>8. Blocking request based on User-Agent Header</h4>
<p>This method could save your bandwidth quota by blocking certain bots or spiders from crawling your website.</p>
<pre># block visitors referred from indicated domains
&lt;IfModule mod_rewrite.c&gt;
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
&lt;/ifModule&gt;</pre>
<h4>9. Secure directories by disabling execution of scripts</h4>
<pre># secure directory by disabling script execution
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI</pre>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extra Packages for Enterprise Linux (EPEL)</title>
		<link>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/</link>
		<comments>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 14:05:00 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/</guid>
		<description><![CDATA[EPEL Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for Red Hat Enterprise (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux. Fedora &#8230; <a href="http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>EPEL</h3>
<p>Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for <a href="http://fedoraproject.org/wiki/Red_Hat_Enterprise_Linux">Red Hat Enterprise</a> (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux. Fedora is the upstream of RHEL and add-on packages for EPEL are sourced from the Fedora repository primarily and built against RHEL. </p>
<p>&#160;</p>
<p>EPEL有很多额外的包，centos的yum库里软件和rh的一样，EPEL里面有很多有用的软件。更多详情：</p>
<p><a title="http://fedoraproject.org/wiki/EPEL" href="http://fedoraproject.org/wiki/EPEL">http://fedoraproject.org/wiki/EPEL</a></p>
<p>安装方法：</p>
<p>su -c &#8216;rpm -Uvh <a href="http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'">http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm&#8217;</a> </p>
<p>&#8230; </p>
<p>su -c &#8216;yum install foo&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>logrotate for nginx</title>
		<link>http://yongzou.com/logrotate-for-nginx-22/</link>
		<comments>http://yongzou.com/logrotate-for-nginx-22/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:52:56 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/logrotate-for-nginx-22/</guid>
		<description><![CDATA[如果手动编译安装nginx并不会安装logrotate配置。如果用yun安装nginx会自动安装/etc/logrotate.d/nginx配置文件： /var/log/nginx/*log { &#160;&#160;&#160; daily &#160;&#160;&#160; rotate 10 &#160;&#160;&#160; missingok &#160;&#160;&#160; notifempty &#160;&#160;&#160; compress &#160;&#160;&#160; sharedscripts &#160;&#160;&#160; postrotate &#160;&#160;&#160;&#160;&#160;&#160;&#160; [ ! -f /var/run/nginx.pid ] &#124;&#124; kill -USR1 `cat /var/run/nginx.pid` &#160;&#160;&#160; endscript }]]></description>
			<content:encoded><![CDATA[<p>如果手动编译安装nginx并不会安装logrotate配置。如果用yun安装nginx会自动安装/etc/logrotate.d/nginx配置文件：</p>
<p>/var/log/nginx/*log {   <br />&#160;&#160;&#160; daily    <br />&#160;&#160;&#160; rotate 10    <br />&#160;&#160;&#160; missingok    <br />&#160;&#160;&#160; notifempty    <br />&#160;&#160;&#160; compress    <br />&#160;&#160;&#160; sharedscripts    <br />&#160;&#160;&#160; postrotate    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`    <br />&#160;&#160;&#160; endscript    <br />}</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/logrotate-for-nginx-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WIN7 中的God Mode “上帝模式”</title>
		<link>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/</link>
		<comments>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 16:02:07 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=16</guid>
		<description><![CDATA[Windows 7的这个God Mode彩蛋是个实用的蛋，只需要建立一个目录，命名为：GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 就可以啦。介绍如下 <a href="http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Windows 7的这个<strong>God Mode</strong>彩蛋是个实用的蛋，只需要建立一个目录，命名为：<strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong> 就可以啦。</p>
<p>介绍如下：</p>
<p>Windows 7系统中隐藏了一个秘密的“<strong>God Mode</strong>”，字面上译为“上帝模式”。其实就是一个简单的文件夹窗口，但包含了几乎所有Windows 7系统的设置，如控制面板的功能、界面个性化、辅助功能选项&#8230;方方面面的控制设置，用户只需通过这一个窗口就能实现所有的操控，而不必再去为调整一个小小的系统设置细想半天究竟该在什么地方去打开设置窗口。</p>
<p>首先你可以在任何地方创建一个新文件夹，这个操作对于几乎所有电脑用户来说都非常简单，然后重要的是，将这个新文件夹重命名为“<strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong>”。大家最好直接复制过去，避免手动输入出错。接下来一回车，惊喜立即出现在你面前。</p>
<p>双击打开<strong>God Mode</strong>窗口，可以看到这里包括了方方面面的系统设置选项和工具，而且每一个项目所对应的功能也都清晰显示，一眼明了，使用起来非常方便。God Mode可以创建在桌面上、C盘中、任意文件夹内，总之方便自己使用就好，从这一个窗口中，你就可以轻松完成各项设置。(转自水木）</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>冲动是魔鬼</title>
		<link>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/</link>
		<comments>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 14:58:21 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/</guid>
		<description><![CDATA[今天冲动了，去中关村准备换块硬盘，出现坏道了，还有几天就满一年了。 去的路上被中介拉去看了看农大南路的房子，麒麟家园，99平米。看着还可以，就犹豫啊犹豫了一阵，被中介忽悠了一阵，就冲动交了定金。当时没啥感觉，现在回到家，反倒好紧张，不知道是不是买在了最高的，跟我40多块的中石油似的：（ 神啊！]]></description>
			<content:encoded><![CDATA[<p>今天冲动了，去中关村准备换块硬盘，出现坏道了，还有几天就满一年了。<br />
去的路上被中介拉去看了看农大南路的房子，麒麟家园，99平米。看着还可以，就犹豫啊犹豫了一阵，被中介忽悠了一阵，就冲动交了定金。当时没啥感觉，现在回到家，反倒好紧张，不知道是不是买在了最高的，跟我40多块的中石油似的：（</p>
<p>神啊！</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>重新开始</title>
		<link>http://yongzou.com/new-start-5/</link>
		<comments>http://yongzou.com/new-start-5/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 13:26:34 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=5</guid>
		<description><![CDATA[重装了服务器，忘了导出数据库了，以前的内容都没啦！没了也好，正好可以装一个最新的WordPress。以前版本太久，升级几次都不成功。 FeedBurner里面视乎还能看到部分内容：http://feeds.feedburner.com/zouyong 以前用的主题atahualpa 2.21版本，现在都升级到3.4.4啦！嗯，接着用。]]></description>
			<content:encoded><![CDATA[<p>重装了服务器，忘了导出数据库了，以前的内容都没啦！没了也好，正好可以装一个最新的WordPress。以前版本太久，升级几次都不成功。</p>
<p>FeedBurner里面视乎还能看到部分内容：<a href="http://feeds.feedburner.com/zouyong">http://feeds.feedburner.com/zouyong</a></p>
<p>以前用的主题atahualpa 2.21版本，现在都升级到3.4.4啦！嗯，接着用。</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/new-start-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

