<?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>兔子窝边草 &#187; Linux</title>
	<atom:link href="http://yongzou.com/category/linux/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>很好的程序语言/工具文档</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>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>
	</channel>
</rss>

