<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>AskApache Web Fire</title>
	
	<link>http://www.askapache.com</link>
	<description>.htaccess, Net Security, Server Tech, Web Development, Tutorials and Articles. Come through in something amazing.. blazing.</description>
	<lastBuildDate>Tue, 23 Feb 2010 10:24:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<feedburner:info uri="apache/htaccess" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://www.askapache.com</link><url>http://www.askapache.com/nlogo.png</url><title>AskApache Web Fire</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.askapache.com/apache/htaccess" /><feedburner:emailServiceId>apache/htaccess</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.askapache.com/apache/htaccess" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:browserFriendly>Thanks for your Interest, you are very nice!</feedburner:browserFriendly><item>
		<title>PortaPutty Auto-Reconnecting SSH Tunnels on an Encrypted TrueCrypt Portable USB Key w GPG</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/gQt9eNHOBbI/ssh-tunnels-truecrypt-gpg.html</link>
		<comments>http://www.askapache.com/hacking/ssh-tunnels-truecrypt-gpg.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:11:11 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WiredTree]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[GPG]]></category>
		<category><![CDATA[PortaPutty]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh tunnels]]></category>
		<category><![CDATA[TrueCrupt]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[USB Drives]]></category>

		<guid isPermaLink="false">http://askapache.com/?p=4001</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/hacking/ssh-tunnels-truecrypt-gpg.html"><img src="http://uploads.askapache.com/2010/02/K24-9114-main-sp-116x116.jpg" alt="" title="K24-9114-main-sp" width="116" height="116" class="alignnone size-thumbnail wp-image-4019" /></a>Ok I just came back up to write the intro.. I'm trying to keep it short to avoid getting bogged down by the coolness of each step.  Here is what goes on.   When I logon to my XP machine at work, I bring my usb key and plug it in first.  On logging a window pops up first and it's a password prompt to mount my encrypted drive leonardo.  It also checks a keyfile that is located on my usb key, but all I do now is type in my password.  That causes my encrypted folder to be accessible to me like a normal drive, and it autoruns a startup batch file. <br /><br />The batch file causes <strong>Portable</strong> versions of Firefox (<em>all my bookmarks, my settings</em>) to load, and launches <strong>Portable</strong> Mozilla Thunderbird (IMAP makes this work well), which is my favorite program (<em>great GPG features and open-source!</em>).  Also Some Adobe CS4 software is loaded from the hard drive, like DreamWeaver.  In the background, a service we created executes a PortaPuttY plink command to create forwarded tunnels from various remote servers and accounts, all using key-based encryption.  These tunnels are automatically reconnected if they are disconnected, meaning you can use a socks 5 if you want or even better!<br class="C" /></p>
<p><strong>Part 1 of 5</strong></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=4329073&#038;CatId=3786" title="This ones over $400 dollars! 128GB!"><img src="http://uploads.askapache.com/2010/02/K24-9114-main-sp.jpg" alt="" title="K24-9114-main-sp" width="300" height="300" class="alignnone size-full wp-image-4019" /></a>Ok I just came back up to write the intro.. I&#8217;m trying to keep it short to avoid getting bogged down by the coolness of each step.  Here is what goes on.   When I logon to my XP machine at work, I bring my usb key and plug it in first.  On logging a window pops up first and it&#8217;s a password prompt to mount my encrypted drive leonardo.  It also checks a keyfile that is located on my usb key, but all I do now is type in my password.  That causes my encrypted folder to be accessible to me like a normal drive, and it autoruns a startup batch file.  The batch file causes <strong>Portable</strong> versions of Firefox (<em>all my bookmarks, my settings</em>) to load, and launches <strong>Portable</strong> Mozilla Thunderbird (IMAP makes this work well), which is my favorite program (<em>great GPG features and open-source!</em>).  Also Some Adobe CS4 software is loaded from the hard drive, like DreamWeaver.  In the background, a service we created executes a PortaPuttY plink command to create forwarded tunnels from various remote servers and accounts, all using key-based encryption.  These tunnels are automatically reconnected if they are disconnected, meaning you can use a socks 5 if you want or even better!  The software is plink from the portaputty package, controlled as a windows service using <a href="http://nemesis2.qx.net">MyEnTunnel</a> and a custom windows batch install script I wrote.</p>
<p>The tunnels are very important to making things easy while improving security.  It&#8217;s not easy to understand at first, but basically it means <strong>you can now connect to ANY IP address:port as if you were on that very machine connecting to localhost, like if you pinged yourself!</strong>.  The result is any traffic you want is now encrypted, and you can set up your servers to only accept connections from localhost, which could save you tons of memory, bandwidth, and security attack vectors to think about.   So I configure everything to use these tunnels as proxies, like Mozilla Thunderbird and Chrome, Firefox, Pidgeon, all portable versions and running from my encrypted usb drive.  This means you can walk into my house with that usb key, plug into any computer here, and surf the web/check your emails all across SSH&#8230; I know for a fact <strong>I wouldn&#8217;t be able to snoop that</strong> traffic!  There is a lot of exciting things going on around here, new servers and all.. Its going to take a couple more posts for me to finish this up, enjoy the article and comment.<br class="C" /></p>
<h2>Buy a couple USB Mini Drives</h2>
<p>The first thing to do, is purchase a USB thumb drive..   My favorite store, <a href="http://www.tigerdirect.com/applications/category/category_slc.asp?Recs=30&amp;Nav=|c:379|lp:0.01:hp:24.99|&amp;Sort=4" title="Highly recommended, this is not an affiliate link">TigerDirect.com</a>, has over 104 tiny usb drives for under $24.. I&#8217;ve used them since the late 90&#8217;s.</p>
<p>I bought some 4GB PNY&#8217;s the size of a fingernail at a gas station and they are amazing, way faster than say a dvd drive.  Just try to do some research of the differences between the 16GB vs the $4 1GB drives.. You want speed because the whole drive will be encrypted.   <em>If you can afford the super excellent and crazy fast ones, hey send me one!</em> Buying cheap means you can buy 3 or 4 so you can always have backups.  This device will make you Internationally mobile, untethered from a box, maybe getting some work done at a cafe in Florenze, or at a beach hotel in Miami.  Keep dreaming, but that is more possible with a better organized system.</p>
<h3>Backup the USB Drive</h3>
<p>You only need to know 1 way that works, there are several.  The way I do backups is to copy the entire disk image of the usb, that way I can always access it in case of usb key failure, which does happen.  Free software like <a href="http://clonezilla.org/">CloneZilla live CD</a> with its crazy cluster computing power, or Self Image, which is free for both linux and Windows.  And you could never go wrong with <a href="http://www.symantec.com/norton/ghost">GHOST</a>, one of the first to make mega bucks in the market.. it&#8217;s some seriously impressive software <em>but not open-source</em>.  Even easier for some is to just set a cron job for dd to pipe the entire drive image to a remote computer using netcat, or sshfs, or curlftpfs, or just <strong>simple ssh</strong> like below.  Once setup (without stupid, bulky, dangerous software), the files on your encrypted usb don&#8217;t change often, otherwise I would want to sync a backup to happen automatically every X number of logins or days (<em>test logfile time in bash_profile?</em>)..</p>
<h4>SSH Back-ups To Remote Server</h4>
<p>Files and data on your drives slow it down tremendously, meaning a web server storing backups locally is slower than one storing them externally.</p>
<p>Notice how much safer this command is by optimizing both the <a href="http://www.askapache.com/linux-unix/optimize-nice-ionice.html">CPU and DISK I/O</a>..  Though it&#8217;s much smarter to create a new separate ssh user, one with no shell and a passwordless safer key-based encryption.  Then in your /etc/security/limits.conf file or your initscript you can cause that user to have <code>nice -19</code> and <code>ionice -c2 -n7</code> priority set all the time automatically, since sshd, compression, and disk writing are this accounts only job.  turboslow is an alias defined in a ssh_config file so you don&#8217;t have to type the host, port, and settings each time.</p>
<pre>
#
# much better ways to do this on google!!!!!!!
#
ionice -c2 -n7 nice -n 19 dd if=/dev/sdb2 bs=1k conv=sync,noerror | gzip -c | ssh turboslow "dd of=sdb2.gz bs=1k"
</pre>
<p>Note that you may decide it would be better to configure the ssh connection to a less CPU intensive algorithm, perhaps even <em>protocol 1</em> and <em>DES</em>.  That&#8217;s perfectly alright, but the tradeoff is that the encryption can be broken much quicker, and so you would have to implement a cron job to create new keys on both ends of the tunnel every few hours.. It&#8217;s really not a big deal to setup, kind of sweet way to use key-based encryption.  Also, important files ( those containing passwords, any database ) are encrypted before transport using private GPG keys, which don&#8217;t need to be changed.  The other thing to think about too is only letting your main PC send/write on the backup host, so the backup host is only authorized to rx and can never login back to yours. </p>
<p>Hey! the Internet is a dangerous place you better believe it!  And it&#8217;s only going to get more interesting with cloud computing&#8217;s breakthrough&#8217;s&#8230; More people who know they&#8217;re way around&#8230; I can always use an extra server, I&#8217;d love to expand my network another node without having to pay for it (free cloud computing?), so make sure your servers are locked up strenuously.  Not super perfect, just a little unique or creative in your defense to avoid any coming super-worm&#8217;s that may be employing vast arsenals of the deadliest attack-engines like metasploit..  Scarry rumors.</p>
<h4>Compression Speeds: PBZip2, Rzip, Lzop, Gzip</h4>
<p>Probably the fastest is to use rsync over ssh, which is what I&#8217;m doing, since the algorithms used by rsync are much faster and safer.  <a href="http://www.askapache.com/security/mirror-using-rsync-ssh.html">Rsync also lets you specify a compression program</a>, so depending on your machine you will want pbzip2 (for multi processors) or rzip which are the 2 fastest I know of, though I have had some reliability issues with rzip for gigabyte transfers.  Pbzip2 is amazing, blew me away the first time being 8x faster (8 CPUs) then <strong>anything</strong>.  You can get it and compile a static binary for your thumb drive if want at <a href="http://compression.ca/pbzip2/">Parallel BZIP2 (PBZIP2)</a>. Heavy code, re: this note by Jeff Gilchrist</p>
<p><quote><strong>NOTE</strong>: If you are looking for a parallel BZIP2 that works on cluster machines, you should check out <strong>MPIBZIP2</strong> <strong>which was designed for a distributed-memory message-passing architecture</strong>.</quote></p>
<pre>
tar cpf "$G" &#45;-use-compress-prog=pbzip2 ./
</pre>
<p><a href="http://uploads.askapache.com/2010/02/pbzip2.gif"><img src="http://uploads.askapache.com/2010/02/pbzip2.gif" alt="Parallel BZIP2 (PBZIP2)" title="pbzip2" class="size-medium wp-image-4002" /></a></p>
<h4>Benchmarking for Performance</h4>
<p>Finally a couple tips, you should get an idea what the device can do, format it a few times for linux and test it on windows, and vice versa.. Some drives are too small or too old and can only support fat32 filesystems on winblows, you DO NOT want fat32 because this drive is going to be 100% encrypted and then 100% transparently decrypted as you use it, </p>
<pre>
# note this is 512MB
dd if=/dev/sda1 of=/dev/null bs=512 count=1000000
512000000 bytes (512 MB) copied, 5.16588 s, 99.1 MB/s
</pre>
<h2>Part II:  Encrypted AutoRunning USB Key with TrueCrypt</h2>
<p>Now this section anyone can do, it&#8217;s so easy on Windows.   What I&#8217;m going to show you how to do is get setup the right way super-fast.  There are many ways to use TrueCrypt, it&#8217;s one of the nicest built software programs&#8217;s I&#8217;ve ever used&#8230; Sadly, it is not licensed open-source, and that is often a deal-breaker for security-conscious folks or anti-pirate anarchists.  From the very helpful TrueCrypt web site:</p>
<blockquote cite="">
<ul type="disc">
<li>Creates a <strong>virtual encrypted disk</strong> within a file and mounts  it as a real disk. </li>
<li>Encrypts an<strong> entire partition or storage device</strong> such as USB flash drive or hard drive.</li>
<li>Encrypts a <strong>partition or drive where Windows is installed</strong> (<a href="http://www.truecrypt.org/docs/?s=system-encryption">pre-boot authentication</a>).</li>
<li>Encryption is <a href="http://www.truecrypt.org/docs/"><strong>automatic</strong>, <strong>real-time</strong> (on-the-fly) and <strong>transparent</strong></a>.</li>
<li> <a href="http://www.truecrypt.org/docs/?s=parallelization">Parallelization</a> and <a href="http://www.truecrypt.org/docs/?s=pipelining">pipelining</a> allow data to be read and written as fast as if the drive was not encrypted.</li>
<li>Provides <strong><a href="http://www.truecrypt.org/docs/?s=plausible-deniability">plausible deniability</a></strong>, in case an adversary  forces you to reveal the password: <strong><a href="http://www.truecrypt.org/hiddenvolume">Hidden volume</a></strong> (steganography) and <strong><a href="http://www.truecrypt.org/docs/?s=hidden-operating-system">hidden operating system</a></strong>.</li>
<li><a href="http://www.truecrypt.org/docs/?s=encryption-algorithms">Encryption algorithms</a>: <a href="http://www.truecrypt.org/docs/?s=aes">AES-256</a>, <a href="http://www.truecrypt.org/docs/?s=serpent">Serpent</a>, and <a href="http://www.truecrypt.org/docs/?s=twofish">Twofish</a>.  Mode of operation: <a href="http://www.truecrypt.org/docs/?s=modes-of-operation">XTS</a>.</li>
</ul>
</blockquote>
<h2>Further Reading</h2>
<ul>
<li><a href="http://ultra.ap.krakow.pl/~bar/DOC/ssh_backup.html">Network File Copy using SSH</a></li>
<li>Check out the trunk version of PuTTY:<code>~ svn co svn://svn.tartarus.org/sgt/putty</code>
</ul>
<hr class="C" />
<p>The real fun doesn&#8217;t start till all the automation starts, automating all of that from a couple batch files I wrote, one click setup.  Kind of like building your own knoppix for when you have to use Windows.  To begin this tutorial, setup a truecrypt traveller setup on your usb and also install the portaputty package onto the usb.  You do this by creating a 3GB or whatever file on the usb and then mounting that file like you would mount an iso file.   I will show the Windows Batch file I use and the tricks with Windows Volume names and how to consistently make it all work.   Then we will setup MyEnTunnel with a customized batch file that forces all puttys to use portaputty (<code>sweet hack stolen from sysinternals pagedefrag tool</code>).<strong>Stay Tuned!</strong></p>
<p><a href="http://www.askapache.com/hacking/ssh-tunnels-truecrypt-gpg.html">PortaPutty Auto-Reconnecting SSH Tunnels on an Encrypted TrueCrypt Portable USB Key w GPG</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/jLGykEjTjRjVWM5fZPCox2UembA/0/da"><img src="http://feedads.g.doubleclick.net/~a/jLGykEjTjRjVWM5fZPCox2UembA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jLGykEjTjRjVWM5fZPCox2UembA/1/da"><img src="http://feedads.g.doubleclick.net/~a/jLGykEjTjRjVWM5fZPCox2UembA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=gQt9eNHOBbI:qv-7kNlrM5o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=gQt9eNHOBbI:qv-7kNlrM5o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=gQt9eNHOBbI:qv-7kNlrM5o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=gQt9eNHOBbI:qv-7kNlrM5o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=gQt9eNHOBbI:qv-7kNlrM5o:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/hacking/ssh-tunnels-truecrypt-gpg.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.askapache.com/hacking/ssh-tunnels-truecrypt-gpg.html</feedburner:origLink></item>
		<item>
		<title>grilled cheese jam session now online</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/8Vdh5D5uBx0/grilled-cheese-jam-session-back-online.html</link>
		<comments>http://www.askapache.com/music/grilled-cheese-jam-session-back-online.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:12:24 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[SilverSun Pickups]]></category>
		<category><![CDATA[WiredTree]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3861</guid>
		<description><![CDATA[<div><div><div style="width:530px;height:405px;display:block;overflow:hidden;float:left;"><div id="youtubekillinzombies"></div></div>The skull looks like it says <strong style="color:blue;">HACK MAGIK</strong>..   You've probably heard a tiny part of this song on TV..  It's that song from THE coolest video game commercial I've ever seen.. Such style!  I don't play any video-games (<em>at least not professionally</em>) anymore, but this commercial is tempting me back to the <acronym title="Major League Gamers">MLG</acronym>..  Games are games today, but in the future Gaming Skill will be highly sought after.. So I check in with the gaming world occasionally, I'd hate to miss something like a new Duke-Nukem.<br /><br />I have 5 new posts I'm trying to finish for ya .. "trying" is the right word since my writing is awfuly terrble.  But stick around..  I'm going in for the kill, I'm doing it for the thrill, and I'm <a href="http://www.askapache.com/about/#partnerup">already looking for partners</a> (both investors and linux/code kungfu masters).<br /><br /><br /> Seriously...  coming out with some new stuff for old hats..  SSH, DNS, failover, memory, cpu, compression, backups, logging, security, speed, 90% unix -- but I am also writing 3 articles for Windows users (like my work pcs), and one of them made my pc 3x faster.. the trick is I have to figure out a simpler way to do it, or else it'd be impossible for most to do, I only got it after trying to figure it out for the last 10 years.. and failing hundreds of times..<br /><br /><strong>KILLER posts</strong>... (kills bills, our ignorance, and evildoers ;)<br /><br /><strong>DANGEROUS posts</strong> (to those making profit from naiveté)..  <br /><br /><strong>SOON.</strong><br /><br /><em>Wanna know how I control this youtube vid to autostart and all that?  Search my javascript (this site only has 1 js file) for "youtubekillinzombies".  Other than some feature enhancements, thats as good as I can do youtube embeds.</em><br class="C" /></p></div></div>

]]></description>
			<content:encoded><![CDATA[<div>
<div style="width:243px;height:200px;display:block;overflow:hidden;float:left;">
<div id="youtubegrilledcheese"></div>
</div>
<div style="width:243px;height:200px;display:block;overflow:hidden;float:right;">
<div id="youtubegrilledcheese2"></div>
</div>
<div style="width:530px;height:405px;display:block;overflow:hidden;float:left;">
<div id="youtubekillinzombies"></div>
</div>
<p><br class="C" /></div>
<p>Nice example of chaotic beats, but they make melody somehow, it&#8217;s rather an addictive beat. </p>
<p>What random chaos have I spent the last 6 months on?  Experiments with DNS, Fail-over technology for MySQL/DNS/WWW/MAIL servers for free or for very cheap, chrooting servers and of course testing new security idea&#8230;. But the exciting stuff for me personally is some very cool ways to make sure you are never unable to remotely access your server in case of catastrophic failure.. That&#8217;s what it&#8217;s all about for me you know, making things work so well that they run themselves and free up time for life!   I&#8217;m around a 1/4 of a century old..  I&#8217;m done playing around, it&#8217;s time to make some cash before they put me in an old-folks home..  My time is short, my cause is just.. We will prevail!    lol..  I&#8217;m 25 and I still got jokes!</p>
<p><strong>For 2010</strong> I have a few choice articles and ideas I&#8217;m debating about publishing.. I don&#8217;t want to give the wrong kind of people power, I want to give the power to the people &#8212; but at a certain point it takes a serious investment to actually empower yourself, whereas a company could afford to actually bring it to reality.. So who does the knowledge benefit then?  No, the only way is to get serious myself and beat the profiteers to the punch so to offer a service that would be dirt-cheap if it weren&#8217;t in the hands of gluttons.</p>
<p>I&#8217;ve been pursuing research into several new areas of web technology (no not a smartphone app!) over the past year trying to increase my business profits and quailty of service, and I am becoming more aware every day that I can do it better and cheaper!  Any industry always has those at the top who enjoy knowing things that keep them on top,  and try to prevent others from doing what they did..   It&#8217;s not like the information is so wizard-like that it&#8217;s just not possible for average folks to comprehend..   It&#8217;s just only discussed behind closed doors, masked in schools by tenure and a defined curriculum.  But since this is the Wild Wild Web the barriers can always be circumvented.   Stick around, I am <a href="http://www.askapache.com/about/#partnerup">already looking for partners</a> (both investors and linux/code kungfu masters).</p>
<p><strong>Enjoy the jam session ;)</strong><br class="C" /></p>
<p><a href="http://www.askapache.com/music/grilled-cheese-jam-session-back-online.html">grilled cheese jam session now online</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/v1bS248MGzwclwFoWqwO8wsekr8/0/da"><img src="http://feedads.g.doubleclick.net/~a/v1bS248MGzwclwFoWqwO8wsekr8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/v1bS248MGzwclwFoWqwO8wsekr8/1/da"><img src="http://feedads.g.doubleclick.net/~a/v1bS248MGzwclwFoWqwO8wsekr8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=8Vdh5D5uBx0:tIRU1fKLvj4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=8Vdh5D5uBx0:tIRU1fKLvj4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=8Vdh5D5uBx0:tIRU1fKLvj4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=8Vdh5D5uBx0:tIRU1fKLvj4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=8Vdh5D5uBx0:tIRU1fKLvj4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/music/grilled-cheese-jam-session-back-online.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/music/grilled-cheese-jam-session-back-online.html</feedburner:origLink></item>
		<item>
		<title>Vetted – Top 3 WordPress Speed Plugins</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/SBHiZIMT-YQ/fastest-caching-plugins.html</link>
		<comments>http://www.askapache.com/wordpress/fastest-caching-plugins.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 19:14:16 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[AskApache Crazy Cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[DB-Cache Reloaded]]></category>
		<category><![CDATA[WordPress Optimizing]]></category>
		<category><![CDATA[WordPress Speed]]></category>
		<category><![CDATA[WP-Super Cache]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3701</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/wordpress/fastest-caching-plugins.html" title="Top 3 WordPress Plugins for a Faster Blog"><img src="http://uploads.askapache.com/2009/11/db-cache-reloaded-116x64.png" alt="DB Cache Reloaded" title="DB Cache Reloaded" width="116" height="64" /></a>There are so many WordPress plugins out there now that I wanted to post my favorite 3 plugins for speeding up a WP-Powered blog.  These are the 3 plugins that I install for pretty much all of my WP-Powered sites, which I run about 300 now.  They work together to provide a very optimized blog for speed.<br /><br /><strong>DB-Cache Reloaded does something entirely different</strong>, it saves the mysql queries that are made to the WP-database, as well as the mysql results to static files, and then through php serves those cached-files instead of re-querying the mysql database. Most mysql databases are stored on separate servers, and although many are on the same local network there is a limit to how many queries, and how many connections can take place.<br /><br />So DB-Cache Reloaded basically makes WP-Super Cache work alot faster when generating the cache files, and DB-Cache Reloaded helps in a number of areas un-related to WP-Super Cache, like in the admin panel.  And DB-Cache without WP-Super-Cache is a joke because it still uses the application-level and php for everything.  <em>Gotta use both (or just WPSC)</em>.<br class="C" /></p>
]]></description>
			<content:encoded><![CDATA[<p>There are so many WordPress plugins out there now that I wanted to post my favorite 3 plugins for speeding up a WP-Powered blog (including one of <a href="http://wordpress.org/extend/plugins/profile/askapache">my plugins</a>).  These are the 3 plugins that I install for pretty much all of my WP-Powered sites, which I run about 300 now.  They work together to provide a very optimized blog for speed.</p>
<h2>Top 3 WordPress Speed Plugins</h2>
<ol class="TOC">
<li><a href="http://www.askapache.com/wordpress/fastest-caching-plugins.html#db-cache-reloaded">DB Cache Reloaded</a></li>
<li><a href="http://www.askapache.com/wordpress/fastest-caching-plugins.html#wp-super-cache">WP Super Cache</a></li>
<li><a href="http://www.askapache.com/wordpress/fastest-caching-plugins.html#crazy-cache">AskApache Crazy Cache</a></li>
</ol>
<h2>WP Caching Overview</h2>
<p>Each request to your blog has to fire up the php interpreter and query the mysql database to create the output that you see in your browser.  Using a plugin like WP Super Cache simply saves the output of that request as a static HTML file and serves that to a request instead of using php and mysql every time.  DB Cache Reloaded takes this a step further by optimizing the mysql queries.  Finally, AskApache Crazy Cache is used to keep a cache fully primed and ready.</p>
<h3>Why Caching?</h3>
<p>If you have a private server, or you want to keep your MEMORY, BANDWIDTH, and CPU usage down for your server, these plugins will be dramatic.  If you have a site that is updated maybe once a month and gets a very small amount of traffic, then the AskApache Crazy Cache would be redundant.  That plugin is geared for the heaviest traffic sites.</p>
<h3>Request and Response</h3>
<p>Most HTTP communication is initiated by a user agent (browser) and consists of a request to a resource on some origin server. In the simplest case, this may be accomplished via a single connection (v) between the user agent (UA) and the origin server (O).</p>
<pre>
             request chain &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&gt;
          UA &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-v&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- O
             &lt;&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- response chain
</pre>
<p>If a browser requests a WP-driven page, the server generates the response (the outputted html) by loading a php interpreter or module to read the WP php files and load all the settings.  WP stores the settings in a mysql database and has to query the mysql database for all the data (like the content of your post that becomes html).  Finally php sends the output through the server back to the browser.  This is the norm for most PHP applications.  Every time an interpreter is loaded additional CPU and Memory are used.  And perhaps even more troublesome for shared-hosting using a virtual or network filesystem, each load causes many hard-disk accesses, additional processes, etc.</p>
<h3>Cache PHP</h3>
<p>By saving the php-generated output of a page to a static html file, your server can entirely skip loading a php interpreter or other process.  Originally servers were needed and created to essentially open a static file on disk and send that file back to the requesting user.  So servers are specialized for this as it&#8217;s their core function.</p>
<p><strong>WP-Super cache does this for you by saving the output into a static html file</strong>, and by instructing the server to skip loading php.  It basically only uses php for creating the cached version, in the same way that you can save this webpage as an html file, WP-Super cache saves all the WP-blog permalinks to static files.</p>
<p><strong>DB-Cache Reloaded does something entirely different</strong>, it saves the mysql queries that are made to the WP-database, as well as the mysql results to static files, and then through php serves those cached-files instead of re-querying the mysql database. Most mysql databases are stored on separate servers, and although many are on the same local network there is a limit to how many queries, and how many connections can take place.  But mysql is maybe the fastest thing I&#8217;ve seen, so your bottlenecks almost never happen there (if configured correctly).</p>
<p>So DB-Cache Reloaded basically makes WP-Super Cache work alot faster when generating the cache files, and DB-Cache Reloaded helps in a number of areas un-related to WP-Super Cache, like in the admin panel.  And DB-Cache without WP-Super-Cache is a joke because it still uses the application-level and php for everything.  <em>Gotta use both (or just WPSC)</em>.</p>
<p><strong>AskApache Crazy Cache is a plugin I wrote</strong> to do one thing very well, it runs at intervals via the WP-cron and forces WP-Super-Cache to create a static cache file for all the posts, pages, etc. on your site.  Without this WPSC likes to do dumb things like try to manage it&#8217;s own cache with stale files and expired files, which equals a lot more php interpreters getting loaded instead of cached static files.  For sites with more than a visit/page/10minutes this plugin keeps a full primed cache built by WPSC.</p>
<h3>Compression and WP-Super Cache</h3>
<p><strong>Enabling compression in WP-Super Cache</strong> is almost always a great idea.  I&#8217;ve never had a problem other than some php compat issues with not-updated php installations.  This option basically lets WP-Super Cache compress the generated output of a page and save that to the static file.  Normally Apache, Lighttpd, Nginx, etc. open the static file and compress it before it is sent to the browser, then the browser automatically decompresses it to view.  This happens so fast because it is run by the server.</p>
<p>This lets WPSC instruct your server to send the compressed version to all browsers that accept compression, and send the uncompressed static file to any other browsers.  So this is helpful because it eliminates your server having to do any transparent compressing, it can instead just focus on what it does best, serving static files.</p>
<p>PHP is an application so it requires memory, hard-drive access, and CPU time.  Check out the protocol hierarchy:</p>
<pre>
       +&#45;&#45;-&#45;&#45;-+ +&#45;&#45;&#45;--+ +&#45;&#45;&#45;--+       +&#45;&#45;&#45;--+
       |Telnet| | FTP | |Voice|  &#46;..  |     |  Application Level
       +&#45;&#45;-&#45;&#45;-+ +&#45;&#45;&#45;--+ +&#45;&#45;&#45;--+       +&#45;&#45;&#45;--+
             |   |         |             |
            +&#45;&#45;&#45;--+     +&#45;&#45;&#45;--+       +&#45;&#45;&#45;--+
            | TCP |     | RTP |  &#46;..  |     |  Host Level
            +&#45;&#45;&#45;--+     +&#45;&#45;&#45;--+       +&#45;&#45;&#45;--+
               |           |             |
            +&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-+
            |    Internet Protocol &amp; ICMP   |  Gateway Level
            +&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-+
                           |
              +&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-+
              |   Local Network Protocol  |    Network Level
              +&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-+
</pre>
<p><a id="db-cache-reloaded" name="db-cache-reloaded"></a></p>
<h3>DB Cache Reloaded</h3>
<p><a href="http://wordpress.org/extend/plugins/db-cache-reloaded/">DB Cache Reloaded Plugin Page</a> &#8211; <a href="http://wordpress.org/tags/db-cache-reloaded?forum_id=10">News</a></p>
<p><a class="IFL" href="http://uploads.askapache.com/2009/11/db-cache-reloaded.png"><img src="http://uploads.askapache.com/2009/11/db-cache-reloaded-116x64.png" alt="DB Cache Reloaded" title="DB Cache Reloaded" width="116" height="64" /></a>This plugin caches every database query with given lifetime. It is much faster than other html caching plugins and uses less disk space for caching.</p>
<p>I think you&#8217;ve heard of WP-Cache or WP Super Cache, they are both top plugins for WordPress, which make your site faster and responsive. Forget about them &#8211; with DB Cache Reloaded your site will work much faster and will use less disk space for cached files. Your visitors will always get actual information in sidebars and server CPU loads will be as low as possible.<br class="C" /></p>
<blockquote cite="http://wordpress.org/extend/plugins/db-cache-reloaded/faq/">
<h4>Why is DB Cache Reloaded better than WP Super Cache?</h4>
<p>This plugin is based on a fundamentally different principle of caching queries to database instead of full pages, which optimises WordPress from the very beginning and uses less disk space for cache files because it saves only useful information. It saves information separately and also caches hidden requests to database.</p>
</blockquote>
<p><a id="wp-super-cache" name="wp-super-cache"></a></p>
<h3>WP Super Cache</h3>
<p><a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache Plugin Page</a> &#8211; <a href="http://wordpress.org/tags/wp-super-cache?forum_id=10">News</a></p>
<p><a class="IFL" href="http://uploads.askapache.com/2009/11/wp-super-cache.png"><img src="http://uploads.askapache.com/2009/11/wp-super-cache-116x61.png" alt="WP Super Cache" title="WP Super Cache" width="116" height="61" /></a>This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.</p>
<p>The static html files will be served to the vast majority of your users, but because a user&#8217;s details are displayed in the comment form after they leave a comment those requests are handled by PHP. Static files are served to:</p>
<p>&middot; Users who are not logged in.<br />&middot; Users who have not left a comment on your blog.<br />&middot; Or users who have not viewed a password protected post.</p>
<p>99% of your visitors will be served static html files. Those users who don&#8217;t see the static files will still benefit because they will see regular WP-Cache cached files and your server won&#8217;t be as busy as before. This plugin will help your server cope with a front page appearance on digg.com or other social networking site.<br class="C" /></p>
<blockquote cite="http://wordpress.org/extend/plugins/wp-super-cache/faq/">
<h4>Why is WP-Super-Cache better than WP-Cache?</h4>
<p>This plugin is based on the excellent WP-Cache plugin and therefore brings all the benefits of that plugin to WordPress. On top of that it creates copies of every page that is accessed on a blog in a form that is quickly served by the web server. It&#8217;s almost as quick as if the you had saved a page in your browser and uploaded it to replace your homepage.</p>
</blockquote>
<blockquote cite="http://wordpress.org/extend/plugins/wp-super-cache/faq/">
<h4>Will the Super Cache compression slow down my server?</h4>
<p>No, it will do the opposite in fact. Super Cache files are compressed and stored that way so the heavy compression is done only once. These files are generally much smaller and are sent to a visitor&#8217;s browser much more quickly than uncompressed html. As a result, your server spends less time talking over the network which saves CPU time and bandwidth, and can also serve the next request much more quickly.</p>
</blockquote>
<p><a id="crazy-cache" name="crazy-cache"></a></p>
<h3>AskApache Crazy Cache</h3>
<p><a href="http://wordpress.org/extend/plugins/askapache-crazy-cache/">AskApache Crazy Cache Plugin Page</a> &#8211; <a href="http://wordpress.org/tags/askapache-crazy-cache?forum_id=10">News</a></p>
<blockquote cite="http://wordpress.org/extend/plugins/askapache-crazy-cache/">
<p>
<p><a class="IFL" href="http://uploads.askapache.com/2009/11/askapache-crazy-cache.png"><img src="http://uploads.askapache.com/2009/11/askapache-crazy-cache-116x36.png" alt="AskApache Crazy Cache" title="AskApache Crazy Cache" width="116" height="36" /></a>This sweet little plugin does one thing very well. It caches all the posts on your entire blog at the same time, if you are using WP-Cache, WP-Super-Cache, or Hyper-Cache.<br class="C" /></p>
</p>
</blockquote>
<pre>

                              +&#45;&#45;-&#45;&#45;-&#45;&#45;-+ &#45;&#45;-&#45;&#45;-&#45;&#45;-\      active OPEN
                              |  CLOSED |            \    &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
                              +&#45;&#45;-&#45;&#45;-&#45;&#45;-+&lt;&#45;&#45;-&#45;&#45;-&#45;&#45;-\   \   create TCB
                                |     ^              \   \  snd SYN
                   passive OPEN |     |   CLOSE        \   \
                   &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- |     | &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-       \   \
                    create TCB  |     | delete TCB         \   \
                                V     |                      \   \
                              +&#45;&#45;-&#45;&#45;-&#45;&#45;-+            CLOSE    |    \
                              |  LISTEN |          &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- |     |
                              +&#45;&#45;-&#45;&#45;-&#45;&#45;-+          delete TCB |     |
                   rcv SYN      |     |     SEND              |     |
                  &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--   |     |    &#45;&#45;-&#45;&#45;&#45;-            |     V
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+      snd SYN,ACK  /       \   snd SYN          +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
 |         |&lt;&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--           &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&gt;|         |
 |   SYN   |                    rcv SYN                     |   SYN   |
 |   RCVD  |&lt;&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--|   SENT  |
 |         |                    snd ACK                     |         |
 |         |&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-           &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-|         |
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+   rcv ACK of SYN  \       /  rcv SYN,ACK       +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
   |           &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--   |     |   &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
   |                  x         |     |     snd ACK
   |                            V     V
   |  CLOSE                   +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
   | &#45;&#45;-&#45;&#45;&#45;-                  |  ESTAB  |
   | snd FIN                  +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
   |                   CLOSE    |     |    rcv FIN
   V                  &#45;&#45;-&#45;&#45;&#45;-   |     |    &#45;&#45;-&#45;&#45;&#45;-
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+          snd FIN  /       \   snd ACK          +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
 |  FIN    |&lt;&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--           &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&gt;|  CLOSE  |
 | WAIT-1  |&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-                              |   WAIT  |
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+          rcv FIN  \                            +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
   | rcv ACK of FIN   &#45;&#45;-&#45;&#45;&#45;-   |                            CLOSE  |
   | &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--   snd ACK   |                           &#45;&#45;-&#45;&#45;&#45;- |
   V        x                   V                           snd FIN V
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+                  +&#45;&#45;-&#45;&#45;-&#45;&#45;-+                   +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
 |FINWAIT-2|                  | CLOSING |                   | LAST-ACK|
 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+                  +&#45;&#45;-&#45;&#45;-&#45;&#45;-+                   +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
   |                rcv ACK of FIN |                 rcv ACK of FIN |
   |  rcv FIN       &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- |    Timeout=2MSL &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- |
   |  &#45;&#45;-&#45;&#45;&#45;-              x       V    &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-        x       V
    \ snd ACK                 +&#45;&#45;-&#45;&#45;-&#45;&#45;-+delete TCB         +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
     &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&gt;|TIME WAIT|&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&gt;| CLOSED  |
                              +&#45;&#45;-&#45;&#45;-&#45;&#45;-+                   +&#45;&#45;-&#45;&#45;-&#45;&#45;-+
&nbsp;
                      TCP Connection State Diagram
</pre>
<p><a href="http://www.askapache.com/wordpress/fastest-caching-plugins.html">Vetted &#8211; Top 3 WordPress Speed Plugins</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/F-UFyDyfGSsfHLOTFVGJ5PDq-fw/0/da"><img src="http://feedads.g.doubleclick.net/~a/F-UFyDyfGSsfHLOTFVGJ5PDq-fw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/F-UFyDyfGSsfHLOTFVGJ5PDq-fw/1/da"><img src="http://feedads.g.doubleclick.net/~a/F-UFyDyfGSsfHLOTFVGJ5PDq-fw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=SBHiZIMT-YQ:Ke-kTKoY07k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=SBHiZIMT-YQ:Ke-kTKoY07k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=SBHiZIMT-YQ:Ke-kTKoY07k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=SBHiZIMT-YQ:Ke-kTKoY07k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=SBHiZIMT-YQ:Ke-kTKoY07k:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/fastest-caching-plugins.html/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.askapache.com/wordpress/fastest-caching-plugins.html</feedburner:origLink></item>
		<item>
		<title>Custom bash_profile for Advanced Shell Users</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/-67b1YGaPtY/bash_profile-functions-advanced-shell.html</link>
		<comments>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:32:26 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[.bashrc]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash alias]]></category>
		<category><![CDATA[bash_profile]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3183</guid>
		<description><![CDATA[<p>Looking for some <strong>advanced uses for the shell</strong>?  Here is <del>some of</del> my best.  The shell is where 70% of my work takes place, and I have at least one terminal open almost 100% of the time, for viewing tailing color-coded logs, and of course for the SSH Tunnels that I use to route various networking through, like my email.  So I decided that to standardize and create a bash_profile containing the most time-saving and helpful functions that I could use on all the various hosting environments would really be some sweet sugar, so here is my constant Work-in-progress.</p>
<p>It works for all shells I encounter, including BackTrack, Debian, Knoppix, Arch Linux, etc.   Also works for many hosting environments I use including DreamHost, HostGator, WiredTree, and pretty much any linux VPS.</p>
<p>I also rely on this heavily from within shell scripts I write to access all the functions and stuff in this .bash_profile, and to do that I just do like:</p>
<pre>
#!/bin/bash

source ~/.bash_profile &#038;>/dev/nulll

pm "PM is a function to output nice messages with color"
yn "Are you enjoying the shell" &#038;& pm "Thats great!" &#124;&#124; pm "Perhaps you're better suited for DOS"
yn "Show Calendar" &#038;& aa_calendar
yn "Show Fortune" &#038;& aa_fortune
</pre>]]></description>
			<content:encoded><![CDATA[<p>Looking for some <strong>advanced uses for the shell</strong>?  Here is <del>some of</del> my best.  Works for all shells I encounter, including BackTrack, Debian, Knoppix, Arch Linux, etc.   Also works for many hosting environments I use including DreamHost, HostGator, WiredTree, and pretty much any linux VPS.</p>
<p class="anote">Want to get started?  Type the following in your shell to download the script and run it.  You should go over the code first and then you can just save it as your .bash_profile &#8211; whenever you want to get updated to the latest version just type aaup, a cool update function that auto dos2unix&#8217;s and runs via an exec command.</p>
<pre>
curl -O http://static.askapache.com/askapache-bash-profile.txt &amp;&amp; source askapache-bash-profile.txt
Or if you trust me and my hosting provider (and you aren&#039;t on production)
curl -o ~/.bash_profile http://static.askapache.com/askapache-bash-profile.txt &amp;&amp; exec bash -l
</pre>
<p>For those of you power users and server admins that use Bash, ksh, csh, vanilla sh, etc.., or if you are just passionate about shell scripting, because it allows you to get advanced tasks done fast and efficiently, not to mention automated automatically.  I give you my .bash_profile file.   You should edit it to fit your needs, (especially the exported vars like PATH, LDFLAGS, if you don&#8217;t understand something just comment it out) but it&#8217;s pretty universal because I work on alot of other people&#8217;s servers not to mention many different distros and platforms, and when I get hired to do some server work through a shell, I bring this script along for the ride.</p>
<h2>askapache-bash-profile.txt</h2>
<p>You can download the latest version: <a href="http://static.askapache.com/askapache-bash-profile.txt">http://static.askapache.com/askapache-bash-profile.txt</a></p>
<p>The functions and variables below are the way bash sees them, using declare -f, and alias, to make it easier for you to read and understand them.    The actual file at <a href="http://static.askapache.com/askapache-bash-profile.txt">http://static.askapache.com/askapache-bash-profile.txt</a> will always be the most updated version, as I use it personally.  And it has the whole file the way I wrote it, meaning many extra notes and much simpler to follow. Enjoy!</p>
<h2>Gist of the Script..</h2>
<p>I also rely on this heavily from within shell scripts I write to access all the functions and stuff in this .bash_profile, and to do that I just do like:</p>
<pre>
#!/bin/bash
&nbsp;
source ~/.bash_profile &amp;&gt;/dev/nulll
&nbsp;
pm "PM is a function to output nice messages with color"
yn "Are you enjoying the shell" &amp;&amp; pm "Thats great!" || pm "Perhaps you&#039;re better suited for DOS"
yn "Show Calendar" &amp;&amp; aa_calendar
yn "Show Fortune" &amp;&amp; aa_fortune
</pre>
<pre>
alias chmod=&#039;command chmod -c&#039;
alias cpr=&#039;command cp -rpv&#039;
alias df=&#039;command df -kTh&#039;
alias df1=&#039;command df -iTa&#039;
alias diff=&#039;diff -up&#039;
alias dsiz=&#039;du -sk * | sort -n &#45;-&#039;
alias du=&#039;command du -kh&#039;
alias du1=&#039;echo *|tr " " "\n" |xargs -iFF command du -hs FF|sort&#039;
alias env=&#039;command env | sort&#039;
alias h=&#039;history&#039;
alias inice=&#039;ionice -c3 -n7 nice&#039;
alias j=&#039;jobs -l&#039;
alias la=&#039;command ls -Al &#45;-color=auto&#039;
alias lc=&#039;command ls -lAcr &#45;-color=auto&#039;
alias less=&#039;vless&#039;
alias lessc=&#039;ccze -A |`type -P less` -R&#039;
alias lk=&#039;command ls -lASr &#45;-color=auto&#039;
alias llh=&#039;ll -h&#039;
alias lll=&#039;stat -c %a\ %N\ %G\ %U ${PWD}/*|sort&#039;
alias lr=&#039;command ls -lAR &#45;-color=auto&#039;
alias lt=&#039;command ls -lAtr &#45;-color=auto&#039;
alias lu=&#039;command ls -lAur &#45;-color=auto&#039;
alias lx=&#039;command ls -lAXB &#45;-color=auto&#039;
alias mann=&#039;command man -H&#039;
alias n=&#039;/usr/bin/nano3&#039;
alias p=&#039;command ps -HAcl -F S -A f|uniq -w3&#039;
alias path=&#039;echo -e ${PATH//:/\\n}&#039;
alias php=&#039;php -d report_memleaks=1 -d report_zend_debug=1 -d log_errors=0 -d ignore_repeated_errors=0 -d ignore_repeated_source=0 -d error_reporting=30719 -d display_startup_errors=1 -d display_errors=1&#039;
alias pp=&#039;command ps -HAcl -F S -A f&#039;
alias ps1=&#039;command ps -lFA&#039;
alias ps2=&#039;command ps -H&#039;
alias resetw=&#039;echo $&#039;\&#039;&#039;\33[H\33[2J&#039;\&#039;&#039;&#039;
alias subash=&#039;sudo sh -c &#039;\&#039;&#039;export HOME=/root; cd /root; exec bash -l&#039;\&#039;&#039;&#039;
alias top=&#039;top -c&#039;
alias tree=&#039;command tree -Csuflapi&#039;
alias updatedb=&#039;( ( updatedb 2&gt;/dev/null ) &amp; )&#039;
alias vim=&#039;command vim &#45;-noplugin&#039;
alias who=&#039;command who -ar -pld&#039;
alias wtf=&#039;watch -n 1 w -hs&#039;
</pre>
<pre>
aa_aliases ()
{
    local F=`for i in $(alias|awk -F= &#039;{print $1}&#039;);do echo $i;done|sed -e :a -e &#039;s/^.\{1,15\}$/&amp; /;ta&#039;|tr &#039; &#039; &#039;\032&#039;`;
    i=1;
    for f in ${F};
    do
        echo -en "$f";
        (( $i % 4 ==0 )) &amp;&amp; echo -en "\n";
        i=$(( $i + 1));
    done | tr &#039;\032&#039; " "
}
aa_beep ()
{
    local i;
    for i in `seq 1 ${1:-5}`;
    do
        echo -en "\a" &amp;&amp; sleep 1;
    done
}
aa_calendar ()
{
    [[ -d /usr/share/calendar/ ]] &amp;&amp; echo -en "\n${CC[4]}" &amp;&amp; ( sed = $(echo /usr/share/calendar/calendar*) | sed -n "/$(date +%m\\/%d\\\|%b\*\ %d)/p" ) &amp;&amp; echo -en "${R}"
}
aa_current_users ()
{
    echo -n "`command who -q |sed &#039;/^# users=\([0-9]*\).*/!d; s//\1/;q&#039;`"
}
aa_find_exec ()
{
    find -L ${1:-.} -type f -perm +0100 2&gt;$N6 | xargs file | sed -e &#039;s%^\([^:]*\):\([^,]*\).*$%\1:\2%g&#039;
}
aa_fortune ()
{
    local FORTUNE=`command type -P fortune`;
    [[ -x $FORTUNE ]] &amp;&amp; echo -en "\n${CC[5]}" &amp;&amp; $FORTUNE -s &amp;&amp; echo -en "${R}";
    [[ -x $FORTUNE ]] &amp;&amp; echo -en "\n${CC[6]}" &amp;&amp; $FORTUNE -s &amp;&amp; echo -en "${R}";
    [[ -x $FORTUNE ]] &amp;&amp; echo -en "\n${CC[7]}" &amp;&amp; $FORTUNE -s &amp;&amp; echo -en "${R}";
    [[ -x $FORTUNE ]] &amp;&amp; echo -en "\n${CC[8]}" &amp;&amp; $FORTUNE -s &amp;&amp; echo -e "${R}"
}
aa_free_mem ()
{
    echo -n "`[[ -r /proc/meminfo ]] &amp;&amp; sed &#039;/^MemFree: */!d; s///;q&#039; /proc/meminfo`"
}
aa_functions ()
{
    local F=`for i in $(declare -F | sed -e &#039;s/declare -f //g&#039;); do echo $i; done| sed -e :a -e &#039;s/^.\{1,25\}$/&amp; /;ta&#039;|tr &#039; &#039; &#039;\032&#039;`;
    i=1;
    for f in ${F};
    do
        echo -en "$f";
        (( $i % 4 ==0 )) &amp;&amp; echo -en "\n";
        i=$(( $i + 1));
    done | tr &#039;\032&#039; " "
}
aa_getsrc ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME &lt;url&gt;" 1&gt;&amp;2 &amp;&amp; return 2;
    [[ -z "$CPPFLAGS" ]] &amp;&amp; pm "Setting CPPFLAGS" &amp;&amp; export CPPFLAGS="-I/usr/local/include/libxml2 -I/opt/libiconv/include";
    [[ -z "$LD_FLAGS" ]] &amp;&amp; pm "Setting LD_FLAGS" &amp;&amp; export LD_FLAGS="-L/usr/local/lib -L/usr/local/lib/python2.4/site-packages -L/usr/local/lib -lxml2 -lz -L/opt/libiconv/lib -liconv -lm";
    function aa_err ()
    {
        echo &#039;&#039;;
        local s;
        echo -en "\n [ ${1:-Press any key to continue} ]\n";
        read -n 1 s
    };
    function aa_install ()
    {
        ./configure &#45;-help;
        ./configure &#45;-prefix=/usr/local "$*" &amp;&amp; make -j3 &amp;&amp; sudo make install || aa_err;
        echo -en "\a"
    };
    function aa_extract ()
    {
        case $1 in
            *.tar.bz2)
                tar xjf $1
            ;;
            *.tar.gz)
                tar xzf $1
            ;;
            *.tar)
                tar xf $1
            ;;
            *.tbz2)
                tar xjf $1
            ;;
            *.tgz)
                tar xzf $1
            ;;
            *.bz2)
                bunzip2 $1
            ;;
            *.rar)
                unrar x $1
            ;;
            *.gz)
                gunzip $1
            ;;
            *.zip)
                unzip $1
            ;;
            *.Z)
                uncompress $1
            ;;
            *.7z)
                7z x $1
            ;;
            *)
                aa_err
            ;;
        esac
    };
    local OD=`pwd -L`;
    local FN=$(echo $1 | sed -e &#039;s/^.*\/\([^\/]\{3,\}\)$/\1/g&#039;);
    local SN=$(echo $FN |  sed -e &#039;s/\(.\{1\}\)\([^-.]\{1,\}\).*/\1\2/g&#039;);
    echo -e "OD: $OD \n1: $1 \nFN: $FN \nSN: $SN" &amp;&amp; sleep 1;
    cd /opt/dist;
    ( curl -# -L -f -b c.txt &#45;-cookie-jar c.txt -m 400 -O -H &#039;Accept: */*&#039; -s -S -A &#039;Mozilla/5.0 (Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/2009 Firefox/3.5.5&#039; -e "$1" &#45;-url "$1" || v_err "CURL FAILED for $1" );
    [[ -f "$FN" ]] &amp;&amp; aa_extract "$FN" || aa_err "EXTRACTING FAILED for $FN, go manual it";
    [[ -d "/opt/$SN" ]] &amp;&amp; mv -v /opt/$SN /opt/.old-$SN;
    mv -v /opt/source/`echo $1|sed -e &#039;s/.*\/\(.*\)\.\([tgz7bar2v]*\)\(\.[tgz7bar2v]*\)$/\1/g&#039;` /opt/$SN || aa_err "Please mv $1 to /opt/$SN";
    cd /opt/$SN &amp;&amp; command ls -lABls1c $AAC &amp;&amp; aa_install;
    cd $OD
}
</pre>
<pre>
aa_hexdump ()
{
    local EX;
    [[ $# -eq 1 ]] &amp;&amp; EX=exec;
    [[ -f "$1" ]] &amp;&amp; EX=&#039;cat "$1"&#039;;
    case ${2:-1} in
        0)
            $EX hexdump -C
        ;;
        1)
            $EX hexdump -Cc
        ;;
        2)
            $EX hexdump -Cx
        ;;
        3)
            $EX hexdump -C -e &#039;""  10/1 "&#039;\&#039;&#039;%_c&#039;\&#039;&#039;\t" "\n"&#039; -e &#039;"" 10/1 "0x%02x\t" "\n\n"&#039;
        ;;
        4)
            $EX hexdump -e &#039;""  10/1 "&#039;\&#039;&#039;%_c&#039;\&#039;&#039;\t" "\n"&#039;
        ;;
        5)
            $EX hexdump -e &#039;""  10/1 "&#039;\&#039;&#039;%_c&#039;\&#039;&#039;\t" "\n"&#039; -e &#039;"" 10/1 "0x%04x\t" "\n\n"&#039;
        ;;
        6)
            $EX hexdump -e &#039;90/1 "%_p" "\n"&#039;
        ;;
        7)
            $EX hexdump -e &#039;1/1 "%04_u" "%4_p" "   " 1/1 "%04x" "  " 1/1 "%04_c"  "\n"&#039;
        ;;
        8)
            $EX hexdump -v -e &#039;"x" 1/1 "%02X" " "&#039;
        ;;
        9)
            $EX od -Ax -tx1 -v
        ;;
        10)
            $EX od -t o1z -w1 -Ao -v
        ;;
        11)
            $EX xxd -
        ;;
        12)
            $EX xxd -c1
        ;;
        13)
            $EX xxd -h
        ;;
        14)
            $EX
        ;;
    esac
}
aa_ips ()
{
    ahave ip &amp;&amp; ip -o -f inet addr 2&gt;&amp;1 | sed -e &#039;s/.*inet \([^/]*\).*/\1/g&#039; | sort -u;
    ahave ss &amp;&amp; ss -n 2&gt;&amp;1 | sed -e &#039;s/[^:]*\ \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)\:.*/\1/&#039; -e &#039;/^\([^0-9]\|127\.\|10\.\|172\.\)/d&#039; | sort -u;
    [[ -f "$HOME/.cpanel/datastore/_sbin_ifconfig_-a" ]] &amp;&amp; sed -e &#039;/inet/!d&#039; -e &#039;s/.*addr:\([0-9\.]*\).*/\1/g&#039; "$HOME/.cpanel/datastore/_sbin_ifconfig_-a" | sort -u;
    sed -e &#039;s/^\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/&#039; -e &#039;/^\([^0-9]\|127\.\|10\.\|172\.\|$\)/d&#039; /etc/hosts | sort -u
}
aa_isalpha ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME str" 1&gt;&amp;2 &amp;&amp; return 2;
    case $1 in
        *[!a-zA-Z]* | "")
            return -1
        ;;
        *)
            return 0
        ;;
    esac
}
aa_isdigit ()
{
    case $1 in
        *[!0-9]* | "")
            return -1
        ;;
        *)
            return 0
        ;;
    esac
}
aa_mkdir ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    local e=0;
    for f in ${1+"$@"};
    do
        set fnord `echo ":$f"|sed -e &#039;s/^:\//%/&#039; -e &#039;s/^://&#039; -e &#039;s/\// /g&#039; -e &#039;s/^%/\//&#039;`;
        shift;
        p=;
        for d in ${1+"$@"};
        do
            p="$p$d";
            case "$p" in
                -*)
                    p=./$p
                ;;
                ?:)
                    p="$p/";
                    continue
                ;;
            esac;
            [[ ! -d "$p" ]] &amp;&amp; mkdir -v "$p" || e=$?;
            p="$p/";
        done;
    done;
    return $e
}
aa_motd ()
{
    [[ -r /etc/motd &amp;&amp; `cat /etc/motd |wc -l` -gt 7 ]] &amp;&amp; ( echo -e "\n\n${CC[2]}`head -n 7 /etc/motd | tail -n 6`${R}\n" ) &amp;&amp; return;
    ahave figlet &amp;&amp; figlet $HOSTNAME
}
aa_num_procs ()
{
    echo -n `command ps aux|wc -l`
}
aa_prompt ()
{
    AAPS[0]=&#039;\n\e[1;30m[\e[0;37m${SHLVL}\e[1;30m:\e[0;37m\j:\!\e[1;30m][\e[1;34m\u\e[0;34m@\e[1;34m\h\e[1;30m:\e[1;37m${SSHTTY/\/dev\/}\e[1;30m]\e[0;37m[\e[0;37m\w\e[0;37m]\e[1;30m\n\[${R}\]\$ &#039;;
    AAPS[1]=&#039;\n\e[1;30m[\e[0;37m${SHLVL}\e[1;30m:\e[0;37m\j:\!\e[1;30m][\e[0;32m\u\e[1;32m@\e[0;32m\h\e[1;30m:\e[1;37m${SSHTTY/\/dev\/}\e[1;30m]\e[0;37m[\e[0;37m\w\e[0;37m]\e[1;30m\n\[${R}\]\$ &#039;;
    AAPS[2]=&#039;\n\e[1;30m[\e[0;37m${SHLVL}\e[1;30m:\e[0;37m\j:\!\e[1;30m][\e[0;35m\u\e[1;35m@\e[0;35m\h\e[1;30m:\e[1;37m${SSHTTY/\/dev\/}\e[1;30m]\e[0;37m[\e[0;37m\w\e[0;37m]\e[1;30m\n\[${R}\]\$ &#039;;
    : ${PLVL=0};
    [[ "${#AAPS[@]}" -lt "$PLVL" || "${#AAPS[@]}" -eq "$PLVL" ]] &amp;&amp; PLVL=0;
    export PS1=${AAPS[$PLVL]} &amp;&amp; (( PLVL++ )) &amp;&amp; export PLVL;
    echo "PLVL=$PLVL"
}
aa_random_under ()
{
    echo $(( $RANDOM % ${1:-$RANDOM} + 1 ))
}
aa_safe_aliases ()
{
    local MYMVR=$(command type -t mymvmymv);
    [[ "$MYMVR" == "alias" ]] &amp;&amp; echo "Turning Safe Aliases Off" &amp;&amp; for fa in "chmod" "mkdir" "rm" "cp" "mv" "mymv";
    do
        unalias $fa;
    done &amp;&amp; return;
    echo "Turning Safe Aliases On";
    alias chmod=&#039;command chmod -c&#039;;
    alias mkdir=&#039;command mkdir -pv&#039;;
    alias rm=&#039;command rm -v&#039;;
    alias cp=&#039;command cp -v&#039;;
    alias mv=&#039;command mv -v&#039;;
    alias mymv=&#039;echo&#039;
}
</pre>
<pre>
aa_savehist ()
{
    history ${HISTCMD:-5000} | sed -e &#039;s/^[ 0-9]*\(.*\)/\1/g&#039; | tee -a $HISTFILEMASTER_C &gt;&gt;$HISTFILEMASTER;
    cat $HISTFILE | tee -a $HISTFILEMASTER_C &gt;&gt;$HISTFILEMASTER;
    history -w;
    echo
}
aa_show_all_colors ()
{
    for c in `seq 0 255`;
    do
        t=5;
        [[ $c -lt 108 ]] &amp;&amp; t=0;
        for i in `seq $t 5`;
        do
            echo -e "\e[0;48;$i;${c}m|| $i:$c `seq -s+0 $(($COLUMNS/2))|tr -d &#039;[0-9]&#039;`\e[0m";
        done;
    done;
    echo;
    echo Table for 16-color terminal escape sequences.;
    echo Replace ESC with \\033 in bash.;
    echo;
    echo "Background | Foreground colors";
    echo "&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-";
    for ((bg=40; bg&lt;=47; bg++))
    do
        for ((bold=0; bold&lt;=1; bold++))
        do
            echo -en "\033[0m"" ESC[${bg}m   | ";
            for ((fg=30; fg&lt;=37; fg++))
            do
                if [ $bold == "0" ]; then
                    echo -en "\033[${bg}m\033[${fg}m [${fg}m  ";
                else
                    echo -en "\033[${bg}m\033[1;${fg}m [1;${fg}m";
                fi;
            done;
            echo -e "\033[0m";
        done;
        echo "&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- ";
    done;
    echo;
    echo
}
aa_sleep ()
{
    echo -en "${CC[6]}${3:-.}";
    while `command ps -p $1 &amp;&gt;/dev/null`; do
        echo -n "${3:-.}";
        sleep ${3:-1};
    done;
    echo -e "$R$X" &amp;&amp; sleep 1 &amp;&amp; pd
}
aa_try_for_path ()
{
    local GP=$HOME/bin:$HOME/sbin;
    [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]] &amp;&amp; export PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games";
    local P=$PATH:$HOME/libexec;
    [[ "$EUID" -eq 0 ]] &amp;&amp; P="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11";
    P=${P}:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games;
    P=${P}:/bin:/etc:/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/bin/mh:/usr/libexec;
    P=${P}:/usr/X11R6/bin:/usr/libexec:/etc/X11:/etc/X11/xinit;
    [[ "$DREAMHOST" == "yes" ]] &amp;&amp; ( P=${P}:/usr/local/dh/apache/template/bin:/usr/local/dh/apache2/template/bin;
    P=${P}:/usr/local/dh/apache2/template/build:/usr/local/dh/apache2/template/sbin;
    P=${P}:/usr/local/dh/bin:/usr/local/dh/java/bin:/usr/local/dh/java/jre/bin;
    P=${P}:/usr/lib/ruby/gems/1.8/bin:$HOME/.gem/ruby/1.8/bin );
    P=${P}:/usr/local/php5/bin;
    for p in ${P//:/ };
    do
        [[ -d "${p}" &amp;&amp; -x "${p}" ]] &amp;&amp; GP=${GP}:$p;
    done;
    export PATH=$( echo -en "${GP//:/\\n}" | sed -n &#039;G; s/\n/&amp;&amp;/; /^\([ -~]*\n\).*\n\1/d; h; P&#039; | tr "\n" : ).
}
aa_uniqhistory ()
{
    ( echo $HISTFILE;
    find $HISTFILEMASTER_DIR -type f 2&gt;$N6 ) | xargs -iFFF cat FFF 2&gt;$N6 | sed -e &#039;s/^[ \t]*//;s/[ \t]*$//&#039; -e &#039;/[^ \t]\{1,\}/!d&#039; | tr &#45;-squeeze &#039; &#039; | sort -u
}
aa_weather ()
{
    ahave lynx || return;
    local city weather=$HOME/.weather;
    echo -e "${CC[3]}";
    local res=`pkill -9 -f 15m &amp;&gt;$N6 || echo -n`;
    [[ -r $weather ]] &amp;&amp; cat $weather &amp;&amp; ( ( sleep 15m &amp;&amp; command rm $HOME/.weather &gt;&amp;$N6 ) &amp; );
    [[ ! -r $weather ]] &amp;&amp; ( ( ( city=`lynx -dump http://api.hostip.info/get_html.php|sed -e &#039;/^City/!d&#039; -e &#039;s/City: \([^,]*\), \(.*\)/\1+\2/g&#039;` &amp;&amp; lynx -dump "http://www.google.com/search?hl=en&amp;q=weather+${city}" | sed -n &#039;/Weather for/,/Search Res/p&#039; | tr -d &#039;\260&#039; | sed -e &#039;/iGoogle/d&#039; -e &#039;s/^[ \t]*//;s/[ \t]*$//&#039; | sed &#039;$d&#039; | head -n 6 &gt;$weather ) &amp;  &gt;&amp;/dev/null ) );
    echo -e $R
}
aaup ()
{
    curl3 -0 -o ~/.bash_profile http://static.askapache.com/askapache-bash-profile.txt &amp;&amp; dos2unix -dv ~/.bash_profile &amp;&amp; ( rm -rf ~/{.bash_logout,.toprc,.lynxrc,.ncftp} || echo;
    echo ) &amp;&amp; aa_savehist &amp;&amp; exec bash -l
}
ahave ()
{
    unset -v ahave;
    command command type $1 &gt;&amp;$N6 &amp;&amp; ahave="yes" || return 1
}
ahelp ()
{
    unset -v ahelp;
    [[ "$#" -gt "0" ]] &amp;&amp; [[ "$1" == "-h" || "$1" == "&#45;-h" || "$1" == "&#45;-help" || "$1" == "-help" || "$1" == "-?" ]] &amp;&amp; ahelp="yes"
}
arepeat ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    local i max=$1;
    shift;
    for ((i=1; i &lt;= max ; i++))
    do
        eval "$@";
    done
}
ascript_title ()
{
    ahave tput &amp;&amp; tput cup 0 3;
    clear;
    lin 0;
    echo -e "| ${CC[${1:-2}]}                ___       __    ___                 __                  ${CC[0]} |";
    echo -e "| ${CC[${1:-2}]}               / _ | ___ / /__ / _ | ___  ___ _____/ /  ___             ${CC[0]} |";
    echo -e "| ${CC[${2:-9}]}              / __ |(_-&lt;/  &#039;_// __ |/ _ \/ _ \`/ __/ _ \/ -_)            ${CC[0]} |";
    echo -e "| ${CC[${2:-9}]}             /_/ |_/___/_/\_\/_/ |_/ .__/\_,_/\__/_//_/\__/             ${CC[0]} |";
    echo -e "| ${CC[${2:-9}]}                                  /_/                                   ${CC[0]} |";
    lin 1;
    lin 2 "${USER} ";
    lin 2 "${1:-$AAPN} ";
    lin 2 "Version ${2:-$AAPV} - Built: ${3:-$AAPT} ";
    lin 3
}
asetup_colors ()
{
    create_colors;
    ahave dircolors &amp;&amp; eval "`dircolors -b`";
    export GREP_COLOR=&#039;
cho $R;
    [[ -r $HOME/.dircolors ]] &amp;&amp; eval "`dircolors $HOME/.dircolors`" || dircolors &#45;-print-database &gt;$HOME/.dircolors;
    local L="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31";
    L="${L}:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31";
    L="${L}:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35";
    L="${L}:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35";
    L="${L}:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.cpio=01;31";
    export LS_COLORS="${L}:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.htaccess=01;31:*.htpasswd=01;31:*.htpasswda1=01;31:*config.php=01;31:*wp-config.php=01;31:"
}
</pre>
<pre>
asetup_history ()
{
    export HISTFILE=${HISTFILE:-$HOME/.bash_history};
    export HISTCONTROL=${HISTCONTROL:-&#039;ignoreboth&#039;};
    export HISTSIZE=500;
    export HISTFILESIZE=500;
    export HISTIGNORE=&#039;clear:ls:ll:updatedb:top:h2:h1:h3:dir:cd ..:date:exit&#039;;
    unset HISTTIMEFORMAT;
    HISTFILEMASTER_DIR=$HOME/backups/.history;
    [[ ! -d "$HISTFILEMASTER_DIR/" ]] &amp;&amp; mkdir -pv $HISTFILEMASTER_DIR;
    [[ ! -r ${HISTFILE} ]] &amp;&amp; history -w $HISTFILE;
    HISTFILEMASTER=${HISTFILEMASTER_DIR}/combined.log;
    [[ ! -f $HISTFILEMASTER ]] &amp;&amp; history -r &amp;&amp; history -w $HISTFILEMASTER &amp;&amp; history -c &amp;&amp; echo "" &gt;$HISTFILE;
    export HISTFILEMASTER;
    HISTFILEMASTER_C=$HISTFILEMASTER_DIR/combined-uniq.log;
    [[ ! -f "$HISTFILEMASTER_C" ]] &amp;&amp; echo "" &gt;$HISTFILEMASTER_C;
    export HISTFILEMASTER_C
}
askapache ()
{
    ascript_title;
    aa_motd;
    aa_weather;
    ahave who &amp;&amp; pm "Users" &amp;&amp; pm "Logged In" 3;
    command who -ar -pld &amp;&amp; pm "Current Limits" 3;
    command ulimit -a;
    pm "Machine stats";
    ahave uptime &amp;&amp; pm "uptime" 3 &amp;&amp; command uptime;
    [[ -d /proc ]] &amp;&amp; [[ -f /proc/meminfo ]] &amp;&amp; cat /proc/meminfo;
    ahave who &amp;&amp; pm "Users" 3 &amp;&amp; command who;
    pm "Networking";
    ahave ip &amp;&amp; pm "interfaces" 3 &amp;&amp; ip -o addr | sed -e &#039;s/ \{1,\}/\t/g&#039;;
    [[ -r /proc/net/sockstat ]] &amp;&amp; pm "Sockets" 3 &amp;&amp; head -n 2 /proc/net/sockstat;
    ahave ss &amp;&amp; pm "Networking Stats" 3 &amp;&amp; ss -s;
    ahave netstat &amp;&amp; pm "Routing Information" 3 &amp;&amp; netstat -r;
    pm "Disk";
    pm "Mounts" 3;
    command df -hai;
    ahave iostat &amp;&amp; pm "I/O on Disks" &amp;&amp; iostat -p ALL;
    pm "Processes";
    pm "process tree" 3;
    command ps -HAcl -F S -A f | uniq -w3;
    ahave procinfo &amp;&amp; pm "procinfo" 3 &amp;&amp; procinfo | head -n 13 | tail -n 11;
    pm "Functions";
    aa_functions;
    pm "Aliases";
    aa_aliases
}
clean_exit ()
{
    lin 0;
    lin 1;
    lin 2 "COMPLETED SUCCESSFULLY";
    lin 1;
    lin 3
}
cont ()
{
    local ans;
    echo -en "\n\n ${CC[15]}[ ${1:-Press any key to continue} ]$R\n\n";
    read -n 1 ans;
    aa_beep 1
}
create_colors ()
{
    for i in `seq 0 7`;
    do
        ii=$(($i+7));
        CC[$i]="\033[1;3${i}m";
        CC[$ii]="\033[0;3${i}m";
    done;
    CC[15]="\033[30;42m";
    export R=`tput sgr0`;
    export X=&#039;&#039;;
    export CC
}
</pre>
<pre>
curl1 ()
{
    command curl -A &#039;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5&#039; -e -L -H &#039;Accept: */*&#039; "$@"
}
curl2 ()
{
    ( echo "\n\nurl_effective:\t\t%{url_effective}\ncontent_type:\t\t%{content_type}";
    echo "http_code:\t\t%{http_code}\t\tThe numerical code that was found in the last retrieved HTTPS page";
    echo "http_connect:\t\t%{http_connect}\t\tThe numerical code that was found in the last response from a proxy to a curl CONNECT request";
    echo "time_total:\t\t%{time_total}\t\tThe time will be displayed with millisecond resolution";
    echo "time_namelookup:\t%{time_namelookup}\t\tThe time, in seconds, it took from the start until the name resolving was completed";
    echo "time_connect:\t\t%{time_connect}\t\tThe time, in seconds, it took from the start until the connect to the remote host or proxy was completed";
    echo "time_pretransfer:\t%{time_pretransfer}\t\tThe time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations to the particular protocols involved";
    echo "time_redirect:\t\t%{time_redirect}\t\tThe time, in seconds, it took for all redirection steps. time_redirect shows the complete execution time for multiple redirections";
    echo "time_starttransfer:\t%{time_starttransfer}\t\tThe time, in seconds, it took from the start until the first byte is just about to be transferred. This includes time_pretransfer and also the time the server needs to calculate the result";
    echo "size_download:\t\t%{size_download}\t\tThe total amount of bytes that were downloaded";
    echo "size_upload:\t\t%{size_upload}\t\tThe total amount of bytes that were uploaded";
    echo "size_header:\t\t%{size_header}\t\tThe total amount of bytes of the downloaded headers";
    echo "size_request:\t\t%{size_request}\t\tThe total amount of bytes that were sent in the HTTP request";
    echo "speed_download:\t\t%{speed_download}\tThe average download speed that curl measured for the complete download";
    echo "speed_upload:\t\t%{speed_upload}\t\tThe average upload speed that curl measured for the complete upload";
    echo "num_connects:\t\t%{num_connects}\t\tNumber of new connects made in the recent transfer" ) | curl "$@" -w &#039;@-&#039;
}
curl3 ()
{
    ahave curl &amp;&amp; ( curl -A &#039;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5&#039; -e -L -b ~/.curl_cookie.$$ &#45;-cookie-jar ~/.curl_cookie.$$ -H &#039;Accept: */*&#039; "$@" );
    ahave curl || ( command wget `sed -e &#039;s/^-o /-O /g&#039; -e &#039;s/ -o / -O /g&#039; -e &#039;s/^&#45;-output /&#45;-output-file /g&#039; -e &#039;s/ &#45;-output / &#45;-output-file /g&#039; &lt;&lt;&lt; "$@"` )
}
cuttail ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    sed -n -e :a -e "1,${2:-10}!{P;N;D;};N;ba" $1
}
diffdirs ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    [[ "$#" -lt "2" ]] &amp;&amp; echo "Usage: $FUNCNAME dir1 dir2" 1&gt;&amp;2 &amp;&amp; return 2;
    ahave colordiff &amp;&amp; colordiff -urp -w $1 $2
}
dirty_exit ()
{
    echo "See ya..";
    sleep 1;
    exit
}
do_sleep ()
{
    local E D;
    echo -en "${CC[6]}${3:-.}";
    while `command ps -p $RJ &amp;&gt;$N6`; do
        sleep ${2:-3};
        echo -en "${3:-.}";
    done;
    echo -e "${CC[0]}" &amp;&amp; sleep 1 &amp;&amp; pd
}
dos2unixx ()
{
    [[ $# -eq 0 ]] &amp;&amp; exec tr -d &#039;\015\032&#039; || [[ ! -f "$1" ]] &amp;&amp; echo "Not found: $1" &amp;&amp; return;
    for f in "$@";
    do
        [[ ! -f "$f" ]] &amp;&amp; continue;
        tr -d &#039;\015\032&#039; &lt;"$f" &gt;"$f.t" &amp;&amp; cmp "$f" "$f.t" &gt;$N6 &amp;&amp; rm -f "$f.t" || ( touch -r "$f" "$f.t" &amp;&amp; mv "$f" "$f.b" &amp;&amp; mv "$f.t" "$f" &amp;&amp; rm -f "$f.b" ) &gt;&amp;$N6;
    done
}
dump_ps_environment ()
{
    command ps aux | command grep ${USER:0:3} | command awk &#039;{print $2}&#039; | xargs -t -ipid /bin/sh -c &#039;test -r /proc/pid/environ &amp;&amp; cat /proc/pid/environ | tr "\000" " "&#039;
}
ex ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    until [[ -z "$1" ]]; do
        if [[ -f "$1" ]]; then
            pm "Extracting $1 &#46;..";
            case $1 in
                *.tar.bz2)
                    tar xjf $1
                ;;
                *.tar.gz)
                    tar xzf $1
                ;;
                *.tar)
                    tar xf $1
                ;;
                *.tbz2)
                    tar xjf $1
                ;;
                *.tgz)
                    tar xzf $1
                ;;
                *.bz2)
                    bunzip2 $1
                ;;
                *.rar)
                    unrar x $1
                ;;
                *.gz)
                    gunzip $1
                ;;
                *.zip)
                    unzip $1
                ;;
                *.Z)
                    uncompress $1
                ;;
                *.7z)
                    7z x $1
                ;;
                *)
                    pm "Don&#039;t know how to extract &#039;$1&#039;"
                ;;
            esac;
        else
            pm "&#039;$1&#039; is not a valid file";
        fi;
        shift;
    done
}
exitall ()
{
    aa_savehist;
    pkill -9 -t "${SSH_TTY/\/dev\/}"
}
figtest ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME word" &amp;&amp; return 2;
    for a in /usr/share/figlet/*.flf;
    do
        r=`basename ${a%%.flf}`;
        echo -e "${r}";
        figlet -t -f "$r" "$1";
    done
}
find_symlinks ()
{
    local O=$IFS;
    IFS=&#039;&#039;;
    for file in "$( find ${1:-`pwd`} -type l )";
    do
        echo "$file";
    done | sort
}
get_crypt_user ()
{
    ahave gpg || return;
    local U=`gpg &#45;-list-keys|sed -e &#039;/^uid /!d&#039; -e &#039;s/^uid[ ]*\(.*\)/\1/g&#039;` || unknown;
    [[ $# -ne 0 ]] &amp;&amp; U=${U//\&lt;*};
    echo -n $U
}
get_latest_revision ()
{
    local URL=${1:-http://svn.automattic.com/wordpress/trunk};
    svn info $URL | grep ^Rev | sed -e &#039;s/Revision: \([0-9]*\)/\1/g&#039;
}
grepc ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    command grep &#45;-color=always "$@"
}
grepp ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    command grep -i &#45;-color=always "$@" -r .
}
</pre>
<pre>
h2 ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME query" 1&gt;&amp;2 &amp;&amp; return 2;
    command grep -h "$@" $HISTFILEMASTER_C
}
h2c ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME query" 1&gt;&amp;2 &amp;&amp; return 2;
    command grep &#45;-color=always -h "$@" $HISTFILEMASTER_C
}
h2i ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME query" 1&gt;&amp;2 &amp;&amp; return 2;
    command grep -h -i "$@" $HISTFILEMASTER_C
}
histfilemaster ()
{
    set -vx;
    history -a;
    [[ "`wc -l &lt; $HISTFILE`" -gt "$HISTSIZE" ]] &amp;&amp; ( cat $HISTFILE &gt;&gt;$HISTFILEMASTER;
    cat $HISTFILE &gt;`date +$HISTFILEMASTER_DIR/%m-%d-%y.history`;
    cat $HISTFILE $HISTFILEMASTER_C | sort | uniq &gt;$HISTFILEMASTER_DIR/hc.tmp;
    [[ "`wc -l &lt; $HISTFILEMASTER_DIR/hc.tmp`" -gt "`wc -l &lt; $HISTFILEMASTER_C`" ]] &amp;&amp; mv $HISTFILEMASTER_DIR/hc.tmp $HISTFILEMASTER_C || cat $HISTFILE &gt;&gt;$HISTFILEMASTER_C;
    echo "" &gt;$HISTFILE );
    set +vx
}
kill_jobs ()
{
    for i in `command jobs -p`;
    do
        kill -9 $i;
    done
}
l ()
{
    command ls -AhFp $AAC "$@"
}
la ()
{
    command du -kh * | awk &#039;{print $2,$1}&#039; | sort -n | tr &#039; &#039; "\t"
}
lin ()
{
    local L2 L1=&#039;__________________________________________________________________________&#039;;
    case ${1:-1} in
        0)
            echo -e "\n ${CC[0]}${L1}"
        ;;
        1)
            L2=`echo &#039;                                                                          &#039;`;
            echo -e "${CC[0]}|${CC[34]}${L2}${CC[0]}|"
        ;;
        2)
            echo -en "${CC[0]}|${CC[34]}";
            echo -en "${2:-1}" | sed -e :a -e &#039;s/^.\{1,72\}$/ &amp; /;ta&#039; -e "s/\(.*\)/\1/";
            echo -e "${CC[0]} |"
        ;;
        3)
            echo -e "${CC[0]} ${L1} $R$X\n\n"
        ;;
    esac
}
ll ()
{
    command ls -lABls1c $AAC "$@"
}
locate1 ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    command locate "$@" | xargs -iFF stat -c %a\ %A\ \ A\ %x\ \ M\ %y\ \ C\ %z\ \ %N FF
}
make_ionice ()
{
    ahave ionice || return;
    local theclass thenicelevel thepid;
    thepid=${1:-$$};
    theclass=${2:-3};
    thenicelevel=${3:-7};
    pm "Making IONice class: $theclass, nicelevel: $thenicelevel, process: $thepid";
    pm 0 0;
    command ionice -c$theclass -n$thenicelevel -p $thepid;
    pd
}
make_nice ()
{
    ahave renice || return;
    local thenicelevel thepid;
    thepid=${1:-$$};
    thenicelevel=${2:-19};
    pm "Making process $thepid $thenicelevel nice.";
    pm 0 0;
    command renice $thenicelevel -p $theppid;
    pd
}
nh ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME &lt;command&gt;" 1&gt;&amp;2 &amp;&amp; return 2;
    nohup "$@" &gt;&amp;$N6 &amp; echo
}
nicest ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    local ncmd icmd=&#039;&#039;;
    ahave ionice &amp;&amp; icmd=&#039;ionice -c3 -n7&#039;;
    ahave nice &amp;&amp; ncmd=&#039;nice -n 19&#039;;
    $icmd $ncmd "$@";
    ahave ionice
}
nob ()
{
    [[ $# -eq 0 ]] &amp;&amp; exec grep -v ^$ | sed -e &#039;/[^ \t]\{1,\}/!d&#039;
}
nobb ()
{
    [[ $# -eq 0 ]] &amp;&amp; exec sed -e &#039;s/^[ \t]*//;s/[ \t]*$//&#039; -e &#039;/[^ \t]\{1,\}/!d&#039;
}
nobl ()
{
    [[ $# -eq 0 ]] &amp;&amp; exec sed -e &#039;s/^[ \t]*//&#039;
}
nobt ()
{
    [[ $# -eq 0 ]] &amp;&amp; exec sed -e &#039;s/[ \t]*$//&#039;
}
pd ()
{
    echo -e "\n ${CC[15]} ${1:-DONE} $R\n\n"
}
pm ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    local I=${1:-3};
    echo -en "$R\n";
    case ${2:-1} in
        0)
            echo -en "${CC[6]}&#45;- $X$R"
        ;;
        1)
            echo -e "${CC[2]}&gt;&gt;&gt; $X$I$R"
        ;;
        2)
            echo -en "${CC[4]} &gt; $X$I$R"
        ;;
        3)
            echo -e "${CC[4]} :: $X$I$R"
        ;;
    esac
}
print_ascii_chart ()
{
    for i in `seq 0 256`;
    do
        echo -e "\\0$(( $i/64*100 + $i%64/8*10 + $i%8 ))";
    done
}
procinfo1 ()
{
    PI=($(strace -s1 procinfo -a 2&gt;&amp;1|sed -e &#039;/^op/!d&#039; -e &#039;/pro/!d&#039; -e &#039;/= -1/d&#039;|sed -e &#039;s%o.*"/proc/\(.*\)".*% \1%g&#039;));
    for i in ${PI[*]};
    do
        echo -e "\n&#45;&#45;-===[  /proc/$i  ]\n" &amp;&amp; cat /proc/$i &amp;&amp; echo -e "\n\n";
    done
}
ps ()
{
    [[ -z "$1" ]] &amp;&amp; command ps -Hacl -F S -A f &amp;&amp; return;
    command ps "$@"
}
pss ()
{
    local U PPS PL PX PXX UUS=($(command ps uax|awk &#039;{print $1}&#039;|command tail -n +2|sort|uniq));
    UL=$((${#UUS[@]} - 1));
    exec 6&gt;&amp;1;
    exec &gt;~/proc.$$;
    ps aux | grep ${USER:0:3} | awk &#039;{print $2}&#039; | xargs -t -ipid cat /proc/pid/environ;
    for UX in $(seq 0 1 $UUS);
    do
        U=${UUS[$UX]};
        PPS=($(pgrep -u ${U}));
        PL=$((${#PPS[@]} - 1));
        for PX in $(seq 0 1 $PL);
        do
            PXX=${PPS[$PX]};
            echo -e "\n\n\n&#45;&#45;&#45;-- PROCESS ID: ${PXX} &#45;&#45;&#45;--\n\n";
            cat /proc/${PXX}/cmdline 2&gt;$N6 || echo;
            echo -e "\n\n";
            command tree -Csuflapi /proc/Q/${PXX};
        done;
    done;
    exec 1&gt;&amp;6 6&gt;&amp;-;
    cat ~/proc.$$ | more
}
psu ()
{
    command ps -Hcl -F S f -u ${1:-$USER}
}
pwd ()
{
    command pwd -LP "$@"
}
rmb ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME dirnametoremove" 1&gt;&amp;2 &amp;&amp; return 2;
    ( ( command rm -rf "$@" &gt;&amp;$N6 ) &amp; )
}
set_window_title ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    echo -n -e "\033]0;$*\007"
}
sleeper ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME &lt;process id&gt;" 1&gt;&amp;2 &amp;&amp; return 2;
    echo -en "\n${2:-.}";
    while `command ps -p $1 &amp;&gt;$N6`; do
        echo -n "${2:-.}";
        sleep ${3:-1};
    done;
    echo
}
stat1 ()
{
    local D=${1:-$PWD/*};
    stat -c %a\ %A\ \ A\ %x\ \ M\ %y\ \ C\ %z\ \ %N ${D} | sed -e &#039;s/ [0-9:]\{8\}\.[0-9]\{9\} -[0-9]\+//g&#039; | tr -d "\`\&#039;" | sort -r
}
stat2 ()
{
    local D=${1:-$PWD/*};
    stat -c %a\ %A\ \ A\ %x\ \ M\ %y\ \ C\ %z\ \ %N ${D} | sed -e &#039;s/\.[0-9]\{9\} -[0-9]\+//g&#039; | tr -d "\`\&#039;" | sort -r
}
tard ()
{
    [[ "$#" -lt "2" ]] &amp;&amp; echo "Usage: $FUNCNAME dest-file (auto adds tgz" 1&gt;&amp;2 &amp;&amp; return 2;
    yn "Tarring $2 to $1" &amp;&amp; ( ( command tar -zcpf "$1" "$2" &gt;&amp;$N6 ) &amp; )
}
test_colors ()
{
    echo -e "$R";
    ahave tput &amp;&amp; tput sgr0;
    for ((i=0; i&lt;=${#CC[@]} - 1; i++))
    do
        echo -e "${CC[$i]}[$i]\n$R";
    done
}
uniq2 ()
{
    [[ -f "$1" ]] &amp;&amp; sed = $1 | sed -n &#039;G; s/\n/&amp;&amp;/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P&#039;
}
uniqf ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    awk &#039;!($0 in a) {a[$0];print}&#039; "$1"
}
uptime1 ()
{
    command uptime | sed &#039;/.*,  \([0-9]*\) users,  load average: \(.*\)/!d; s//[ \2, \1 users ]/;q&#039;
}
vless ()
{
    [[ $# -eq 0 ]] &amp;&amp; command vim &#45;-cmd &#039;let no_plugin_maps = 1&#039; -c &#039;runtime! macros/less.vim&#039; -;
    [[ $# -eq 0 ]] || command vim &#45;-cmd &#039;let no_plugin_maps = 1&#039; -c &#039;runtime! macros/less.vim&#039; "$@"
}
wcdir ()
{
    [[ "$#" -gt "0" &amp;&amp; $1 == *-h* ]] &amp;&amp; ahelp $1 &amp;&amp; echo "Usage: $FUNCNAME" &amp;&amp; return 2;
    find ${1:-.} -mindepth 1 -type d -print0 | xargs -0 -iFF sh -c &#039;echo `find "FF"/ -type f 2&gt;/dev/null|wc -l;echo "FF"`&#039; | sort -n | sed -e &#039;s/^\([0-9]*\) \(.*\)$/ \1\t\2/g&#039;
}
yes_no ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME Question" 1&gt;&amp;2 &amp;&amp; return 2;
    local a YN=65;
    echo -en "${1:-Answer} [Y/n] ?";
    read -n 1 a;
    case $a in
        [yY])
            YN=0
        ;;
    esac;
    return $YN
}
yn ()
{
    [[ "$#" -lt "1" ]] &amp;&amp; echo "Usage: $FUNCNAME " 1&gt;&amp;2 &amp;&amp; return 2;
    local a YN=65;
    echo -en "\n ${CC[6]}@@ ${1:-Q} $R$X[y/N] ?$R";
    read -n 1 a;
    echo;
    case $a in
        [yY])
            echo -n "Y";
            YN=0
        ;;
        *)
            echo -n "N"
        ;;
    esac;
    return $YN
}
</pre>
<p><a href="http://uploads.askapache.com/2009/08/askapache-bash_profile.png"><img src="http://uploads.askapache.com/2009/08/askapache-bash_profile.png" alt="askapache-bash_profile" title="askapache-bash_profile" width="571" height="2879" /></a></p>
<p><a href="http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html">Custom bash_profile for Advanced Shell Users</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/BDteRvrayW1XmrbHUdw1LseMofE/0/da"><img src="http://feedads.g.doubleclick.net/~a/BDteRvrayW1XmrbHUdw1LseMofE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BDteRvrayW1XmrbHUdw1LseMofE/1/da"><img src="http://feedads.g.doubleclick.net/~a/BDteRvrayW1XmrbHUdw1LseMofE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=-67b1YGaPtY:VofqY4LVTRU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=-67b1YGaPtY:VofqY4LVTRU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html</feedburner:origLink></item>
		<item>
		<title>Update: Best Free Online Banking</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/nkschTaxZmw/free-online-banking.html</link>
		<comments>http://www.askapache.com/making-money/free-online-banking.html#comments</comments>
		<pubDate>Thu, 22 Oct 2009 04:12:35 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[ally bank]]></category>
		<category><![CDATA[Chase Bank]]></category>
		<category><![CDATA[JP Morgan Chase]]></category>
		<category><![CDATA[Online Banking]]></category>
		<category><![CDATA[WaMu]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3548</guid>
		<description><![CDATA[<p><strong>WaMu Reincarnation!</strong></p>
<p>Man I was bummed about WaMu folding, they had the best banking site I've seen, and I've worked on a few myself.  And of course the biggest reason to love WaMu was that they actually paid YOU to borrow your money to lend to other people.  Can you even imagine that level of decency existing in the world?  It's been taken to such a low level by Chase I almost forget how to spell it.</p>

<p>So I picked up my October issue of <a href="http://www.wired.com/">Wired</a> to try and forget about such tragedies, and on the first page I flipped to was a 1/3 page advertisement for a bank that didn't beat around the bush at all.  No fine print of any kind, just loud and clear message that they will pay you to be their banking customer.  I wasted no time and quickly checked out the site, and within 5 minutes of landing on their homepage I was a customer, and a very happy one.  Even the name of this bank makes it clear they are not in the Microsoft Family Business with Chase and the other corporate pirates.</p>]]></description>
			<content:encoded><![CDATA[<p>Way back when I wrote about my <a href="http://www.askapache.com/webmaster/best-free-online-banking.html">favorite free banking which was WaMu</a>.  I also mentioned how JP Morgan Chase basically ripped me off with fees.  I to this day hate them for so easily putting into practice a policy of ripping people off.  So guess what happened since then?  WaMu went bankrupt due to getting way overextended with NorthWest Mortgages, and guess who swooped in and bought them?  JP Morgan Chase.  I cried myself to sleep for weeks because I knew if Chase now had control over my WaMu account is was only a matter of time before they start charging me money to let others borrow my money.</p>
<p>Today something great and something horrible happened within 5 minutes of each other.  I got a letter from Chase and opened it in front of my computer as i am always prepared for the worst when dealing with scum like that.  So I quickly scanned the friendly letter and almost exploded, it was a very polite letter happily informing me that my 1.9% APR on my credit card originally gotten from WaMu is from now on going to be <strong>29.99%</strong>.  That is not a typo.</p>
<h2><img src="http://uploads.askapache.com/2009/10/logo.png" alt="logo" title="logo" width="72" height="41" class="alignnone size-full wp-image-3550" /> ally bank</h2>
<p><img src="http://uploads.askapache.com/2009/10/Compare_panel.jpg" alt="Compare_panel" title="Compare_panel" width="737" height="180" class="alignnone size-full wp-image-3551" /></p>
<p>One of the main reasons I wanted to share this on my blog is because take a look at that website!  Someone sure knows how to make money, there is alot to admire about this site for you marketers and developers alike.  But seriously, getting a money-market account with no minimums, no monthly fees, no direct-deposit requirements, and none of all those other made-up pirate words is pretty unheard of.  If I was a journalist I would want to know who it is that is behind this.  But knowing how the banking industry is it&#8217;s probably their idea of a &#8220;lead-generating-tool&#8221; that they can later just buy outright and stick it to all the &#8220;leads&#8221;.   It&#8217;s basically the same setup as PayPal and their optional money market account that I use, except unlike paypal you can send and receive money without them taking a big chunk.  And who ever heard of such a thing as a no-penalty CD that doesn&#8217;t have hidden costs?</p>
<p class="anote">Have you heard congress wants to make it legally required to inform your blog readers if you are getting paid to promote a product?<br />Well don&#8217;t worry about me, I never have been paid and I literally just opened my account 20 minutes ago.  I&#8217;m just anal about not having to pay a bank to let them lend it to others.  ally vs Chase is the same thing as Open Source vs Microsoft.</p>
<p>Any other ideas?</p>
<p><a href="http://www.askapache.com/making-money/free-online-banking.html">Update: Best Free Online Banking</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/Pl47iQRH80YXJ3EBHwxphdmISN4/0/da"><img src="http://feedads.g.doubleclick.net/~a/Pl47iQRH80YXJ3EBHwxphdmISN4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Pl47iQRH80YXJ3EBHwxphdmISN4/1/da"><img src="http://feedads.g.doubleclick.net/~a/Pl47iQRH80YXJ3EBHwxphdmISN4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=nkschTaxZmw:IPoB95Mo_Ek:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=nkschTaxZmw:IPoB95Mo_Ek:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/making-money/free-online-banking.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/making-money/free-online-banking.html</feedburner:origLink></item>
		<item>
		<title>Firefox Add-ons for Web Developers</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/9k_EdNItqeQ/best-firefox-addons-webdev.html</link>
		<comments>http://www.askapache.com/firefox/best-firefox-addons-webdev.html#comments</comments>
		<pubDate>Mon, 19 Oct 2009 00:14:07 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox Addons]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[YSlow]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3301</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html" class="IFL"><img src="http://uploads.askapache.com/2009/10/askapache-firefox-cache-116x102.png" alt="askapache favorite addons" title="askapache favorite addons" width="116" height="102" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created since I'm always trying new Addons out and using multiple computers and I wanted a quick and easy way to install my favorite's and keep a running list.  Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.<br /><br />I like the idea of the last.fm but it's not as powerful as the site, which is awesome.  <em>Lately listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>...</em><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment"><img src="https://addons.mozilla.org/en-US/firefox/images/collection_icon/27412/1253649941" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created for myself to make finding and installing my favorite Firefox Add-ons simple and easy.</p>
<h2>My Setup</h2>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/askapache-firefox-cache.png" alt="askapache favorite addons" title="askapache favorite addons" width="283" height="250" />As this screenshot shows, I only use a handful of add-ons at a time.  These buttons allow me to clear the DNS/Cookies/Cache for whichever site I&#8217;m on when I click it.  Very very helpful for me as a web designer.  The 4th button there is just a restart button.  Other than those, Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.</p>
<p>I like the idea of the last.fm but it&#8217;s not as powerful as the site, which is awesome.  Lately I&#8217;ve been listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>&#8230; <br class="C" /></p>
<h2>Slow Firefox</h2>
<p><strong>The more add-ons you have</strong>, disabled or not, the slower Firefox is. (<em>unless you are running your profile folder in TMPFS</em>).   Also, bookmarks and settings like that have a performance hit.  I have been using Firefox since it launched way back when, and I have always kept my bookmarks when moving to new machines and new installations..  So with over 5 thousand bookmarks I finally did some debugging and discovered that was a huge cause of Firefox acting slow.  Now I am trying to migrate them all over to Google&#8217;s Gmarks, which knowing Google will be awesome eventually.</p>
<h2>Multiple Firefox Installations, Sorta</h2>
<p>The solution to all these problems is to use <strong>separate Firefox profiles</strong> which use separate folders to store your profile-specific extensions and settings.  So I have profiles with upwards of 40 Addons installed and enabled, and another profile that is built for speed&#8230; It&#8217;s very very slow to be running Firebug and have multiple tabs open..  You can use the profilemanager to load them specific profiles from the command line.  I personally use separate icons on my Windows Quick Launch that I just modified the shortcut pointing to firefox to also have the profile commandline.   Note also that you can have multiple profiles open and running simultaneously.. This lets you do some crazy networking and other random hacks like having many Firefox instances running each of which is configured to use a separate SOCKS Proxy or network interface, so you can really open up those pipes for some intense txrx.</p>
<p>You can do some very powerful things with Firefox that most people are unaware of, if you are interested start with these:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/Setting_up_extension_development_environment">Setting up an extension development environment</a></li>
<li><a href="https://developer.mozilla.org/en/Command_Line_Options">Firefox Command Line Options</a></li>
</ul>
<hr class="C" />
<h3>About This Collection</h3>
<p>Web Development Add-ons for Advanced Web Developers.  I personally use these to work on Sites, Servers, WordPress, Javascript, PHP, CSS, XHTML, validation, page-loading, SEO, optimizing, and much more.  <a href="https://addons.mozilla.org/en-US/firefox/users/login?to=en-US%2Ffirefox%2Fcollection%2Fadvanced-webdevelopment%3Fadvancedsearch%3D1%26show%3D100">Add this collection</a>.</p>
<p><strong>Created by:</strong><a href="https://addons.mozilla.org/en-US/firefox/user/145961">AskApache</a></p>
<p><strong>Updated:</strong>September 22, 2009 </p>
<h3>Share this Collection</h3>
<ul>
<li class="digg"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=digg">Digg this!</a></li>
<li class="facebook"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=facebook">Post to Facebook</a></li>
<li class="delicious"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=delicious">Add to Delicious</a></li>
<li class="myspace"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=myspace">Post to MySpace</a></li>
<li class="friendfeed"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=friendfeed">Share on FriendFeed</a></li>
<li class="twitter"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=twitter">Post to Twitter</a></li>
</ul>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13316?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">History Tree</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13316/1254409345" alt="" height="32" width="32" class="IFL" />Find any page you have visited quickly and easily. Shows your browsing history as a tree of tabs, with thumbnail screenshots of the web-pages in every tab you have opened. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4882?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Scope</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview and navigate tab contents through popup. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1480?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Control</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Take control of your tabs!  Purposely lightweight extension with the following features&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ShareThis</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5000/1248389010" alt="" height="32" width="32" class="IFL" />ShareThis makes sharing any online content quick and easy. The ShareThis plugin allows you to share to any contact via email, text message, Facebook, Twitter and more.  You can also store your shares for later to reshare with the ShareThis ShareBox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12377?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FirePalette</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12377/1244736178" alt="" height="32" width="32" class="IFL" />Adds a color picker to Firebug&#8217;s CSS panel. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab History Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13000/1252809752" alt="" height="32" width="32" class="IFL" />When click on the selected tab, a history menu corresponding to it will display. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8426?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyncPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8426/1252087590" alt="" height="32" width="32" class="IFL" />Synchronizes your bookmarks, passwords and password exceptions between browsers. Uses your own (or third party) web or ftp server so you have complete control and privacy. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10704?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CSS Usage</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10704/1255464704" alt="" height="32" width="32" class="IFL" />Firebug extension to view which CSS rules are actually used. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9641?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder for Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9641/1246025189" alt="" height="32" width="32" class="IFL" />Inline Code Finder is an add-on to Firebug, to be able to find HTML elements<br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides some additional capabilities to firebug to find inline code as opposed to external files.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4723?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Save Complete</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Saves a webpage completely, providing a better alternative to the flawed built-in save functionality of Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Another of my personal favorites, modifies the &#8220;Save complete page&#8221; option of firefox to truly be more complete, I don&#8217;t understand why firefox doesn&#8217;t already do this.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10615?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireDownload</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10615/1249999245" alt="" height="32" width="32" class="IFL" />The FireDownload extension for Firefox and Wyzo lets you manage and accelerate your web downloads up to 10x faster! With FireDownload, download acceleration is seamlessly displayed within the downloads window. Try the ultimate download accelerator! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty nice and unobtrusive download enhancer.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13255?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Xmarks BYOS Edition</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13255/1248393038" alt="" height="32" width="32" class="IFL" />Bookmark Sync &#8220;Bring Your Own Server&#8221; Edition (BYOS). For expert users who wish to sync their bookmarks and passwords using their own FTP or WebDAV server. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13128?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FormBug</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An extension to Firebug to make dealing with forms easier <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13135?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Widerbug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13135/1247888469" alt="" height="32" width="32" class="IFL" />Firebug Evolved. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11588?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyntaxHighlighter</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />a syntax highlighter, based on SyntaxHighlighter(http://code.google.com/p/syntaxhighlighter/), support lots of program languages. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds syntax highlighting, somewhat intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2318?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Total Validator</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2318/1252747670" alt="" height="32" width="32" class="IFL" />Perform multiple validations and take screen shots in one go. This 5-in-1 validator works with external, internal, or local web pages using the Total Validator service or local copy of the desktop tool&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/115?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ReloadEvery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/115/1250716156" alt="" height="32" width="32" class="IFL" />Reloads web pages every so many seconds or minutes. The function is accessible via the context menu (menu you get when you right click on a web page) or via a drop down menu on the reload button &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Love this plugin, replaces the reload button with a look-alike button with a drop-down menu that lets you enable automatic reloading of a tab (or all tabs) and set the number of seconds between reloads.  I&#8217;ve found it very useful for checking cookie behaviour and cache setups, its also nice if you want to keep checking a page for updates.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1985?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Window Resizer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Resize your browser to various standard resolution sizes&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quickly resize your window to the common sizes to see what a site looks like for users with that resolution.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4415?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Font Finder</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Get all CSS styles of selected text in Firefox / Thunderbird&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Locate the fonts that are in use on a webpage.  Small and unobtrusive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12632?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireQuery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12632/1248402877" alt="" height="32" width="32" class="IFL" />Firebug enhancements for jQuery (requires Firebug 1.3+) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds jquery support, I usually keep disabled even though I personally use jquery for web development.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Alexa Sparky</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5362/1255562428" alt="" height="32" width="32" class="IFL" />Alexa Internet&#8217;s official add-on for Firefox!  Get Alexa data in your status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Shows the alexa rank of a site, I like it but it does make new HTTP requests for each page, so I disable it alot for privacy or speed.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5392?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Dust-Me Selectors</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5392/1246551563" alt="" height="32" width="32" class="IFL" />Finds unused CSS selectors. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the newer add-ons I&#8217;ve been using.  Lets you find which CSS rules are actually in use on a page, thus helping you to minimize and streamline CSS.  Very cool but it is a little resource intensive so by default I keep it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ToggleUseDocColors</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Toggles Tools-&gt;Options-&gt;Content-&gt;Colors:Allow pages to choose their own colors&#8230; option with a single keystroke (Ctrl+M) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Use the documents colors or other.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3606?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />FoxTor: Anonymous Web Browsing using the encrypted TOR network&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10434?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bing</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10434/1247527217" alt="" height="32" width="32" class="IFL" />This is the only officially supported Bing add-on, provided by the Bing team in Microsoft. Bing is a search engine that finds and organizes the answers you need so you can make faster, more informed decisions. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9640?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9640/1245858044" alt="" height="32" width="32" class="IFL" />Inline Code Finder is a tool to traverse through all elements in a web page, and when it finds a HTML element with any of these, it will highlight them: * Inline JavaScript events * Inline style * javascript: links <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2648?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MM3-ProxySwitch</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2648/1233685187" alt="" height="32" width="32" class="IFL" />In the Firefox Browser (and other Mozilla programs) you can per default configure only the setting for one internet connection. With the MM3-ProxySwitch you can manage different configurations and simply switch over between these. <br class="C" /></p>
<blockquote class="publisher-comment"><p>If like me you often connect to websites by proxying firefox through SSH Tunnels, then you can use this MM3-ProxySwitch add-on to run 3 different instances of firefox (by using multiple firefox profiles) that EACH use a different Proxy.  This is useful if you want to MAX out your download speed by downloading using multiple tunnels to do the work. </p>
<p>            Also useful for just plain multiple proxy configurations, very easy, and super extremely unobtrusive and low-resource intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6683?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firecookie</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6683/1251484013" alt="" height="32" width="32" class="IFL" />Firecookie is an extension for Firebug that makes possible to view and manage cookies in your browser <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds a tab to firebug that lets you view live cookies being set, deleted, and updated, and lets you edit, and delete cookies of a page LIVE.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RESTClient</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9780/1250817670" alt="" height="32" width="32" class="IFL" />RESTClient is a firefox extension use to visit and test RESTful/WebDav services. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5403?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Java Console 6.0.02</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5403/1189002765" alt="" height="32" width="32" class="IFL" />Java Console Extension for Java SE 1.6.0_02 (version 6 update 2). <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2325?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RSS Ticker</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />RSS Ticker loads your Live Bookmarks and scrolls their entries across your screen while you surf. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Amazingly awesome add-on that scrolls rss feeds across a small area, helpful to keep track of various feeds and your own sites feeds.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6535?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6535/1244499111" alt="" height="32" width="32" class="IFL" />Displays previews of your tabs in your sidebar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>I like this one more than the tab preview add-ons, lets me find a tab quickly but only when I want by opening the sidebar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12065?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CryptoFox</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12065/1255638751" alt="" height="32" width="32" class="IFL" />CryptoFox is an encryption/decryption tool for Mozilla Firefox, with dictionary attack support for cracking MD5 passwords. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Current Tab Set</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds options to quickly bookmark all tabs in a window and store them in a bookmark folder that is given the date (and optionally the time) as its name. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Update Scanner</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3362/1252360045" alt="" height="32" width="32" class="IFL" />Monitors web pages for updates. Useful for websites that don&#8217;t provide Atom or RSS feeds. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/139?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Image Zoom</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/139/1231445959" alt="" height="32" width="32" class="IFL" />Adds zoom functionality for images&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Simple image zooming functionality.  Small and useful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FaviconizeTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3780/1218612666" alt="" height="32" width="32" class="IFL" />This extension adds a new &#8220;FaviconizeTab&#8221; option to the context menu of the tab&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Nice to Faviconize your most-often-used sites</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2489?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CacheViewer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extenion is GUI Front-end of &#8220;about:cache&#8221;&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Just a shortcut to the about:cache area.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6366?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireGestures</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6366/1254150116" alt="" height="32" width="32" class="IFL" />A customizable mouse gestures extension which enables you to execute various commands and user scripts with five types of gestures. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7189?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug Net History Panel Overlay</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds history functionality to firebug net panel. Requires Firebug 1.2.0b4 or 1.2.0b6 For Firebug versions 1.1.* please use Net Panel Add-on Version 0.2.1 <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3880?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add Bookmark Here ²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3880/1253393237" alt="" height="32" width="32" class="IFL" />Add a menuitem &#8220;Add Bookmark Here&#8230;&#8221; to Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5914?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DNS Cache</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5914/1246397200" alt="" height="32" width="32" class="IFL" />Allows you to disable and enable the DNS Cache of Firefox <br class="C" /></p>
<blockquote class="publisher-comment"><p>The final caching add-on that I absolutely LOVE.  Lets you add anywhere on your toolbar to clear the DNS cache of firefox.  I have  this, clear cache, and clear cookies next to each other on the far left of my bookmarks toolbar, I use them ALOT.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7907?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Manage Folders</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7907/1248060550" alt="" height="32" width="32" class="IFL" />Places a &#8220;Manage Folder&#8221; item on the context menu of bookmark folders, which opens the &#8220;Places Organizer&#8221; expanded to that folder. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2214?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Dependencies</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />View Dependencies adds a tab to the Page Info window, in which it lists all the files which were loaded to show the current page. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Torbutton</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2275/1249863832" alt="" height="32" width="32" class="IFL" />Torbutton provides a button to securely and easily enable or disable the browser&#8217;s use of Tor. It is currently the only addon that will safely manage your Tor browsing to prevent IP address leakage, cookie leakage, and general privacy attacks. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quick way to switch firefox to use the TOR network (I recommend the free vidalia suite) which is useful for web developers that rely on an IP address in certain programming and setups.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5447?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Kit</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5447/1249227762" alt="" height="32" width="32" class="IFL" />Tab grouping, vertical tab tree, multi-rows, and various tweaks for power users. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3559?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickRestart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3559/1241624360" alt="" height="32" width="32" class="IFL" />Ever needed to restart Firefox after enabling or disabling an extension, switching to a new theme, or modifying configuration files (such as userChrome.css or user.js)? This simple extension adds a &#8220;Restart Firefox&#8221; item to the &#8220;File&#8221; menu. You can also use the Ctrl+Alt+R keyboard shortcut, or the included toolbar button. <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can place anywhere that restarts the browser just like you do after updating add-ons.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1759?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Organize Status Bar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extension will enable you to organize your status bar icons.  You can now rearrange or remove any item (icon or text) in the Firefox status bar.  If your status bar is full and cluttered like mine was, give this a try. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you rearrange the items on the status bar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/722?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">NoScript</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/722/1255474235" alt="" height="32" width="32" class="IFL" />The best security you can get in a web browser! Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2109?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FEBE</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2109/1255569901" alt="" height="32" width="32" class="IFL" />FEBE (Firefox Environment Backup Extension) allows you to quickly and easily backup your Firefox extensions.  In fact, it goes beyond just backing up &#8212; It will actually rebuild your extensions individually into installable .xpi files.  Now you can easily synchronize your office and home browsers. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful and well-designed add-on that lets you backup your entire firefox, or individual add-ons, or both!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10897?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Check Places</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10897/1255544495" alt="" height="32" width="32" class="IFL" />Checks your bookmarks are valid and the pages still exist. Also checks for duplicates and for empty folders and can restore missing favicons. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">All-in-One Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1027/1248433103" alt="" height="32" width="32" class="IFL" />All-in-One Sidebar (AiOS) is an award-winning sidebar control, inspired by Opera&#8217;s. It lets you quickly switch between sidebar panels, view dialog windows such as downloads, extensions, and more in the sidebar, or view source or websites in the sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2888?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">GMarks</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />GMarks helps you sync &amp; manage your bookmarks with Google Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11950?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add-on Collector</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/11950/1252025520" alt="" height="32" width="32" class="IFL" />There&#8217;s a new way to manage and find favorite add-ons. Comment, share, and sync collections, all from your browser. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you get updates and makes it very easy to browse a collection such as this one.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2144?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Advanced Dork:</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2144/1249684650" alt="" height="32" width="32" class="IFL" />Advanced Dork: gives quick access to Google&#8217;s Advanced Operators directly from the context menu&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very unobtrusively makes the advanced google search operators available.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2032?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Yahoo! Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2032/1253720246" alt="" height="32" width="32" class="IFL" />Use Yahoo! and the web faster, safer, and easier with new mail notification, search suggestions, online bookmarks, free spyware scanning, and more&#8230; Save time with the new Yahoo! Toolbar 2.0, now in beta at toolbar.yahoo.com/beta. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3102?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email This!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3102/1253158256" alt="" height="32" width="32" class="IFL" />Email This! will send your recipient the link, title, &amp; highlighted text of the page you are viewing using GMail, Google Apps GMail, Yahoo, and Stand-Alone Mail Clients like Outlook Express, Thunderbird, &amp; More! If you hate toolbar buttons don’t fret because I&#8217;ve included a right-click pop-up menu and access keys! <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2062?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab To Window</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2062/1244572621" alt="" height="32" width="32" class="IFL" />Open a tab in a new window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>I have wanted this type of functionality for soo long.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2323?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Cache View</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Cache View is a Firefox extension that displays Google&#8217;s Cache, Coral&#8217;s Cache, and Wayback Machine&#8217;s Cache cache of an open tab or selected link via a right-click or the Tools menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful to notice how often a page on your site is crawled and cached by these engines.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6984?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Lazarus: Form Recovery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6984/1252590349" alt="" height="32" width="32" class="IFL" />Never lose anything you type into a web form again! Lazarus securely auto-saves all forms as you type, so after a crash, server timeout, or whatever, you can go back to the form, right click, &#8220;recover form&#8221;, and breathe a sigh of relief. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Saves your form data securely as you enter it, and provides a way to recover that form data if your firefox crashes (more likely windows crashes) and that way you won&#8217;t lose anything you already entered.  This will slow down firefox alot though.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6132?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Preview</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview tab contents on mouseover <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6937?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multirow Bookmarks Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Multi Row Bookmarks Toolbar.<br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2517?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Googlepedia</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Shows you a relevant Wikipedia article along with your search results. Clicking links in the article will trigger new Google searches, making it a very useful research tool&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds wikipedia results right next to google results, very helpful to keep an eye on what is authoritative, and often get the best information fast.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1237?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickJava</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Allows quick enable and disable of Java and Javascript from&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3082?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Undo Closed Tabs Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3082/1244495823" alt="" height="32" width="32" class="IFL" />Tired of going to History -&gt; Recently Closed Tabs just to undo a closed tab? Then this extension is for you!  This extension allows you to undo closed tabs via a toolbar and/or tab bar button or the right-click context menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds back the most recently closed tab, very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10618?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Faviconiac Search Engines</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10618/1247849922" alt="" height="32" width="32" class="IFL" />Adds PNG favicons to some search engines and web directories, such as Google, Yahoo, Bing, Ask, Altavista, Wikipedia, AOL, Dmoz, Alexa, del.icio.us and others. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is helpful to get a better feel for search engine results by adding their sites favicon to the search results page, is somewhat HTTP Request intensive however.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3928?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark This Page Plus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3928/1247125860" alt="" height="32" width="32" class="IFL" />Adds a menu item in each sub folder of the bookmarks menu to bookmark the current page. Just as seen in the Opera browser. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1595?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Remove Cookie(s) for Site</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1595/1214859152" alt="" height="32" width="32" class="IFL" />A very simple extension to remove all the cookies of currently opened site. It adds an option to the Right Click menu of the page, and a toolbar button to perform this operation. It displays the status of operation in the status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is invaluable, it removes all the cookies from whichever domain you are currently viewing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/967?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Modify Headers</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Add, modify and filter http request headers.  You can modify the user agent string, add headers to spoof a mobile request (e.g. x-up-calling-line-id) and much more.  Take a look at the help tab of the Modify Headers window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty awesome, lets you modify the HTTP Headers your browser is sending, useful to check accessibility, server settings, language settings, etc.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2625?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">OPML Support</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />OPML Support adds OPML import/export functionality to the Firefox Bookmarks manager. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6647?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">HttpFox</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An HTTP analyzer addon for Firefox <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8879?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8879/1249840764" alt="" height="32" width="32" class="IFL" />3D in your browser!  FoxTab brings innovative 3D functionality to your Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Super awesome cool.  If your machine is fast this is a really helpful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/655?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Source Chart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/655/1246405984" alt="" height="32" width="32" class="IFL" />View Source In Color-Coded Chart Get V2.8 w/ a brand new feature from jennifermadden.com <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my long-time, all-time favorites that lets you view the source code of a website, but in a color-coded and formatted view.  Very nice and helpful for (X)HTML developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4072?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Smart Bookmarks Bar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4072/1234555016" alt="" height="32" width="32" class="IFL" />Not enough place on your bookmarks bar ?&#8230; Smart Bookmarks Bar extension comes right here by hiding bookmarks names and only showing icons. Bookmark names will be displayed on mouse over. <br class="C" /></p>
<blockquote class="publisher-comment"><p>For those who frequently use the bookmarks in the firefox bookmarks toolbar, this is a great way to show more in a cleaner way.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Extended Statusbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1433/1246438548" alt="" height="32" width="32" class="IFL" />A Statusbar with speed, percentage, time and loaded size (similar to Opera&#8217;s one) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides much more information unobtrusively on your statusbar, very cool!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10300?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email Yourself!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10300/1253228434" alt="" height="32" width="32" class="IFL" />Email Yourself! allows you to email yourself the link, title, and a selected summary of the webpage you are viewing using GMail. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/125?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SwitchProxy Tool</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />SwitchProxy lets you manage and switch between multiple proxy configurations&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2499?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LiveClick</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds feed reading, notifications, favicons, and other enhancements to Live Bookmarks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7314?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Places&#8217; Tooltips</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This addon enhances all the tooltips in Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11173?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multi Smart Search</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />&#8220;Multi smart search&#8221; displays a new context menu including all the installed search engine. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SortPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9275/1252087512" alt="" height="32" width="32" class="IFL" />Sorts your bookmarks in a variety of ways. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Flashblock</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/433/1247913103" alt="" height="32" width="32" class="IFL" />Never be annoyed by a Flash animation again! Blocks Flash so it won&#8217;t get in your way, but if you want to see it, just click on&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you block flash for all/specific websites/domains, which is pretty nice capability to test both your sites for non-flash viewers, and speeds up firefox.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Google Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6249/1237314369" alt="" height="32" width="32" class="IFL" />Take the power of Google with you anywhere on the Web <br class="C" /></p>
<blockquote class="publisher-comment"><p>A great add-on that lets you use hundreds of google tricks and tools.  Very helpful but also makes a lot of background HTTP requests so privacy-conscious or speed-freaks will want it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6622?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DOM Inspector</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM hierarchy can be navigated using a two-paned window that allows for a variety of different views on the document and all nodes within. Note:  This add-on depends on binary changes to Firefox, and will not work with Firefox 2. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Way to inspect the DOM of a page, useful for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6459?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Stay-Open Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6459/1250004873" alt="" height="32" width="32" class="IFL" />Enables multiple selections from Bookmarks Menu,  History Menu, or Smart Location Bar (awesomebar)  dropdown list, without reopening menu or using sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/710?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Menu Editor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Customize application menus: Rearrange or remove menuitems from the main context menu (right-click menu) and main menubar (File Edit View etc.) <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4838?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multiple Tab Handler</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4838/1251873082" alt="" height="32" width="32" class="IFL" />Provides feature to close multiple tabs. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1815?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Console²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1815/1246698544" alt="" height="32" width="32" class="IFL" />Console² (pronounced Console Squared or Console Two) replaces the JavaScript Console with what could be the next generation Error Console. From v0.5 includes the Console Filter extension previously available separately from the Console² website. <br class="C" /></p>
<blockquote class="publisher-comment"><p>An advanced java script console.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Previews</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Bookmark Previews adds an album view and thumbnail view to the bookmarks manager. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Now this one is what I call genius.  Lets you view previews of your bookmarks!  Great if like me you have over a thousand bookmarks.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8542?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LastPass Password Manager</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8542/1252161868" alt="" height="32" width="32" class="IFL" />LastPass is a free online password manager and Form Filler that makes your web browsing easier and more secure.   LastPass supports IE and Firefox as Plugins (Opera, Safari, Chrome, iPhone, Opera Mini via Bookmarklets), allows you to import from every major password storage vendor and export too, captures passwords that other managers won&#8217;t including many AJAX forms, and allows you to make strong passwords easily.  Your sensitive data is encrypted _locally_ before upload so even LastPass cannot get access to it.  One Time Passwords &amp; Screen Keyboard help protect your master password. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What can I say, this add-on is in my top 10 for sure, and I recommend it to all my friends and even my family.  Lets me create very secure passwords for sites that I don&#8217;t have to remember because lastpass remembers them for me, and stores them encrypted on both a usb medium I keep, and on their servers.  So when I use someone elses computer or reinstall firefox, I have all my usernames and passwords, and its just sooooooooooooooooo useful.  Get this add-on, it truly is a secure way to only have to remember 1 password from now on, thus LastPass.  The last password you need.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1956?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tabs Open Relative</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1956/1211284492" alt="" height="32" width="32" class="IFL" />Tabs Open Relative makes all new tabs open to the right of the current tab, rather than at the far right of the tab bar (optionally this only applies to links). <br class="C" /></p>
<blockquote class="publisher-comment"><p>This stops that annoying default of opening tabs wayy on the right.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10909?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Coral IE Tab</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10909/1255054707" alt="" height="32" width="32" class="IFL" />An enhanced version of IE Tab which enables you to use the embedded IE engine within tabs of Mozilla Firefox. It supports Adblock Plus in IE, and can sync cookies between IE and Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/966?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tamper Data</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Use tamperdata to view and modify HTTP/HTTPS headers and post parameters&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful for checking form validation and security, lets you tamper data! lol</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5369?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">YSlow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5369/1253220367" alt="" height="32" width="32" class="IFL" />YSlow analyzes web pages and why they&#8217;re slow based on Yahoo!&#8217;s rules for high performance web sites. YSlow uses Yahoo!&#8217;s Smush.it service, which is subject to Smush.it Terms of Use: http://info.yahoo.com/legal/us/yahoo/smush_it/smush_it-4378.html <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the top 3 most important and helpful add-ons for firefox.  Web Developers who don&#8217;t use this one are simply irresponsible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/539?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MeasureIt</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Draw out a ruler to get the pixel width and height of any elements on a&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ColorZilla</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/271/1234546689" alt="" height="32" width="32" class="IFL" />Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A must-have add-on for anyone using CSS or developing websites, very amazing, highly capable add-on.  The one issue is that is is somewhat of a resource-hog.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/748?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Greasemonkey</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/748/1253968926" alt="" height="32" width="32" class="IFL" />Allows you to customize the way a webpage displays using small bits of JavaScript. &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you use user-contributed javascripts (or your own of course) that modifies the behavior and/or appearance of many different websites.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireFTP</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/684/1254121244" alt="" height="32" width="32" class="IFL" />FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7943?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Pixel Perfect</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7943/1254757574" alt="" height="32" width="32" class="IFL" />Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML. * Requires Firebug <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/60?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Web Developer</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/60/1252695377" alt="" height="32" width="32" class="IFL" />The Web Developer extension adds a menu and a toolbar with various web developer tools. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This add-on is 1 of the top 2 most important add-ons for web developers.  The other is firebug.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1843?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1843/1254249333" alt="" height="32" width="32" class="IFL" />Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page&#8230; Firebug 1.4 requires Firefox 3.0 or higher. <br class="C" /></p>
<blockquote class="publisher-comment"><p>By far, without a doubt, the single most important and valuable add on for ANY web developer.  This is the one that is definitely required.  The features are too numerous to name here.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3829?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Live HTTP Headers</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3829/1245295166" alt="" height="32" width="32" class="IFL" />View HTTP headers of a page and while&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful for those that don&#8217;t have and use wireshark.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2464?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxyProxy</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2464/1254948830" alt="" height="32" width="32" class="IFL" />FoxyProxy is an advanced proxy management tool that completely replaces Firefox&#8217;s limited proxying capabilities. It offers more features than SwitchProxy, ProxyButton, QuickProxy, xyzproxy, ProxyTex, TorButton, etc. <br class="C" /></p>
<blockquote class="publisher-comment"><p>The most complete proxifying tool for firefox, multiple configurations possible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/321?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SearchStatus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/321/1254725500" alt="" height="32" width="32" class="IFL" />Display the Google PageRank, Alexa rank, Compete ranking and SEOmoz Linkscape mozRank anywhere in your browser, along with fast keyword density analyser, keyword/nofollow highlighting, backward/related links, Alexa info and more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds a very unobtrusive way to check the pagerank, and several other SEO statistics but only when you click a button (if configured that way) very helpful occasionally.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/201?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DownThemAll!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/201/1253178038" alt="" height="32" width="32" class="IFL" />The first and only download manager/accelerator built inside Firefox! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very nice, easy, fast, and unobtrusive add-on that lets you download all files of a certain type to a certain save location, lets you use builtin filters or configure your own using basic REGEX.  Very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1801?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Clear Cache Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1801/1248704772" alt="" height="32" width="32" class="IFL" />Adds a clear cache toolbar button. After installing the extension, find the clear cache button in the toolbar customization&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can add to your toolbar that clears your firefox cache (not cookies or history) which is invaluable for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12006?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Wolfram Alpha Google</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12006/1254285310" alt="" height="32" width="32" class="IFL" />Display Wolfram Alpha results in Google searches. No need to switch search engines when you can use both at once! <br class="C" /></p>
<blockquote class="publisher-comment"><p>The new search is a glimpse at the future of computing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3895?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Personal Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3895/1253278678" alt="" height="32" width="32" class="IFL" />&#8220;Menus Toolbar&#8221; item is now available in Toolbar Context Menu and you may hide it forever! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you go beyond firefox builtin menu editing and create a custom toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7613?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Jiffy</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds a new panel to Firebug for displaying timing measurements for JavaScript applications. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds the ability to time or profile your javascript, I usually leave disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9603?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireRainbow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9603/1248403194" alt="" height="32" width="32" class="IFL" />Javascript syntax highlighting for Firebug 1.3+ <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Fire.fm</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7684/1254412991" alt="" height="32" width="32" class="IFL" />Fire.fm gives you access to the extensive music library on Last.fm. Last.fm gives free radio to the US, UK, and Germany, plus subscriber-based service to the rest of the world. Listen to your favorite music and discover new artists in the process. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What would work be without free streaming music that is customizable and recommends music based on your history.  Conveniently can be added to your status bar, or your toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/138?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">StumbleUpon</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/138/1248392473" alt="" height="32" width="32" class="IFL" />StumbleUpon discovers web sites based on your interests, learns what you like and brings you more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>StumbleUpon is great.  Very cool way to see relevant and interesting web development articles and sites.</p>
</blockquote>
</div>
<hr class="C" />
<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html">Firefox Add-ons for Web Developers</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/x_5iEeoklmxfNg0VYp0soo2SDvE/0/da"><img src="http://feedads.g.doubleclick.net/~a/x_5iEeoklmxfNg0VYp0soo2SDvE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/x_5iEeoklmxfNg0VYp0soo2SDvE/1/da"><img src="http://feedads.g.doubleclick.net/~a/x_5iEeoklmxfNg0VYp0soo2SDvE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9k_EdNItqeQ:Lf7pobuk47Y:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9k_EdNItqeQ:Lf7pobuk47Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/firefox/best-firefox-addons-webdev.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.askapache.com/firefox/best-firefox-addons-webdev.html</feedburner:origLink></item>
		<item>
		<title>Optimizing Servers and Processes for Speed with ionice, nice, ulimit</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/9U5RRoy_zhs/optimize-nice-ionice.html</link>
		<comments>http://www.askapache.com/linux-unix/optimize-nice-ionice.html#comments</comments>
		<pubDate>Sat, 10 Oct 2009 05:41:28 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[chrt]]></category>
		<category><![CDATA[CPU Scheduling]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[ionice]]></category>
		<category><![CDATA[iostat]]></category>
		<category><![CDATA[Nice]]></category>
		<category><![CDATA[optimize processes]]></category>
		<category><![CDATA[Renice]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[taskset]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3167</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/linux-unix/optimize-nice-ionice.html" class="IFL"><img src="http://uploads.askapache.com/2009/10/nice-chart-115x74.png" alt="NICE Levels Chart" title="NICE Levels Chart" width="115" height="74" /></a>To prepare for several upcoming articles on AskApache that are focused on optimizing Servers and Sites from a server admin level, here is an article to introduce the main tools that we will be using.  These tools are used to optimize CPU time for each process using <strong>nice</strong> and <strong>renice</strong>, and other tools like <strong>ionice</strong> are used to optimize the Disk IO, or Disk speed / Disk traffic for each process.  Then you can make sure your mysqld and httpd processes are always fast and prioritized.<br class="C" /></p> ]]></description>
			<content:encoded><![CDATA[<p>Ok, sup.  I really felt I had to get this out of the way, because I have a whole stack of drafts waiting to be published, but I realized that not many people will benefit from all the advanced optimizations and tricks I&#8217;m writing unless they get a basic understanding of some of the tools I&#8217;m using.  I decided to write a series of articles explaining how I optimize servers for speed because lately I&#8217;ve been getting a lot more people wanting to hire me to do that.  I take on projects when I can but there is clearly a need out here on the net for some self-help.   The momentum is swinging more and more towards VPS type of web hosting, and I would say that 99% of those customers are getting supremely ripped off, which goes against the foundation of the web.</p>
<p>Keep in mind that this blog and my research is only a hobby of mine, my job is primarily marketing and sales, so I&#8217;m not some licensed expert or anything, or even an unlicensed expert! haha.  But it does bother me that those who are tech-savvy enough to run web-hosting companies are happily ripping people off.  So this article details the main tools that are used to speed up and optimize your machine by delegating levels of priority to specific processes.  Future articles will use these tools alot, so this is meant as an intro.</p>
<p><a id="cpu-disk-io" name="cpu-disk-io"></a></p>
<h2>CPU and Disk I/O</h2>
<p>As most of you are aware, there are 2 variables that determine any computer or programs speed.  CPU and Disk I/O.  CPU determines how fast you can process data, crunch numbers, etc. while disk I/O determines how fast your disks can read and write data to the hard-drive.  Wouldn&#8217;t it be great if you could easily configure your server to give your httpd, php, and other processes both greater CPU processing and disk IO than your non-important processes like backup scripts, ftp daemons, etc.?  We are talking about Linux in this article, so of course YES not only can you do that, you should!</p>
<p><a name="optimize-ram" id="optimize-ram"></a></p>
<h3>RAM</h3>
<p>RAM is like a hard-drive in that data is stored on it, and read/written to it.  The difference is that RAM is somewhere around 30x faster than disk I/O, but the cost of that incredible speed is that the data stored on it is only temporary in the sense that it won&#8217;t be stored permanently, it is completely erased when your machine is rebooted.  RAM is also expensive, and there is a limit to how much a server or machine can have due to hardware limits.</p>
<p><a name="optimize-swap" id="optimize-swap"></a></p>
<h3>SWAP</h3>
<p>SWAP takes off when you run out of RAM but you still want certain data to be read/write quickly.  Basically when you start running out of RAM your machine starts supplementing RAM with SWAP storage.  SWAP is usually a partition on a second hard-drive disk.  There is an upper limit on how much I/O can occur on a disk at one time, and the more I/O takes place, the slower all I/O becomes, so SWAP works well on a separate hard-drive as it will have much faster I/O.  On Windows they opted to copy the SWAP mechanism but instead use a file named pagefile.sys, and that is just one reason people in the know do not care for Windows.</p>
<p><a name="optimize-cpu" id="optimize-cpu"></a></p>
<h3>CPU</h3>
<p>So lets do this, think of your CPU (your processor) as having an amount of 100% processing available when not being used, 0% when its maxed out.  CPU&#8217;s handle multiple processing tasks simultaneously, so what we will discuss in this article is how to specify HOW MUCH of that processing amount each of your programs (heretofore &#8220;processes&#8221;) are able to use.  Yes, very very cool.</p>
<p>That is correct, you can easily configure your server to provide more of the available processing time to certain programs over others, like you can configure apache and php to utilize 50% of your CPU processing time by themselves, so that all other processes (proftpd, sshd, rsync, etc.) combined can only utilize 50%.  The terminology is we can give certain specific processes (like php.cgi, httpd, fast-cgi.cgi) a specific <strong>priority</strong>, where -19 is the most priority, and +19 is the least amount of priority, or CPU processing time.  I know it seems backwards.. </p>
<p><a id="tools" name="tools"></a></p>
<h2>The Tools</h2>
<p>If you run Windows, you are in the right place&#8230; because the following advice will save your life:  GET LINUX! Ok, now that that is out of the way, the following are the tools dicussed on this page.  All of them are free, open-source, and wonderful.  The basic idea of these tools is to control how much CPU is devoted to each process, and also how much Disk IO/Disk traffic is given to each process.</p>
<dl>
<dt><a href="#nice-tool">nice</a></dt>
<dd>run a program with modified scheduling priority</dd>
<dt><a href="#renice-tool">renice</a></dt>
<dd>alter priority of running processes</dd>
<dt><a href="#ionice-tool">ionice</a></dt>
<dd>set or retrieve the I/O priority for a given pid or execute a new task with a given I/O priority.</dd>
<dt><a href="#iostat-tool">iostat</a></dt>
<dd>Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.</dd>
<dt><a href="#ulimit-tool">ulimit</a></dt>
<dd>Ulimit provides control over the resources available to processes started by the shell, on systems that allow such control.</dd>
<dt><a href="#chrt-tool">chrt</a></dt>
<dd>set or retrieve real-time scheduling parameters for a given pid or execute a new task under given scheduling parameters.</dd>
<dt><a href="#taskset-tool">taskset</a></dt>
<dd>set or retrieve task CPU affinity for a given pid or execute a new task under a given affinity mask.</dd>
<dt></dt>
<dd></dd>
</dl>
<p><a id="part1-processes" name="part1-processes"></a></p>
<h2>Part 1: Process Processes Faster</h2>
<p>Ok so lets tackle figuring out how to give your response-intensive processes (like apache, php, ruby, perl, java) meaning a request to your server/machine requires a <em>response</em>.  For instance, when you requested this page that you are reading at this very second, several things on my server had to happen for you to be able to read this.</p>
<p>First your computer sends out a request to see what server the www.askapache.com domain name is.  DNS servers respond with my server IP, so for servers dedicated as nameservers, optimizing the DNS processes like bind would speed that up.  Now that your computer knows how to reach my server it sends an HTTP GET request for this url.  This request is received by the httpd process that is apache, and apache determines this url should be handled by my custom compiled php5.3.0 binary, because this page is WordPress generated.  So the php binary loads up the WordPress /index.php file, which chain-loads several other php files, including <code>wp-config.php</code> containing my MySql database settings.  Now php connects to my MySql Server to fetch this articles content, comments, title, tags, etc. and then generates the HTML and hands that back to Apache.</p>
<p>Finally, Apache generates a HTTP RESPONSE and sends the RESPONSE and CONTENT back to your Browser, which then in turn renders the page for your eyes with the necessary javascript, images, css, and other files included in the HTML response.</p>
<h3>Too much Processing</h3>
<p>Now you see why I&#8217;ve opted to write my own caching plugin that takes the php and mysql processes OUT of that equation.  Both the php binary and the mysql instance consume CPU processing, and disk IO, to load all their library files, make various network requests and sockets, check permissions, and on and on.  And that&#8217;s completely ok, the thing is, unless you configure these processes (Apache, PHP, MySQL) they will use the same amount of CPU processing that other processes use, other processes that have very little to do with you reading this sentence.  Processes to run my mail server, my FTP server, my SSH server, my cronjobs, cleanup scripts, atd daemon, etc.. and they will get the same amount of CPU!</p>
<p>Another even simpler example is what got me to look into this myself.  I wrote a shell script that created hourly, daily, weekly, and monthly backups for all of my websites and sql databases, and set it up to run by cronjob at those set intervals.  Eventually I noticed my sites were slower, my php even slower, and sometimes I even saw 503 errors that my host throws up when my server is overloaded.  The research that I pursued to prevent that from happening has been hugely eye-opening.  What does a backup script do?  Mine just created tar archives of all the files in my web root, then gzipped the tar archive saving to a backup server using scp (a file transfer using ssh).  This resulted in the following huge problems that seem to have nothing to do with a faster server and speedier website, but they have everything to with it.</p>
<ol>
<li><strong>CPU Bottleneck #1</strong> &#8211; tar and gzip use compression algorithms at a low level to create a compressed version, and all that compressing uses a whole lot of crunching &#8211; CPU processing</li>
<li><strong>DISK IO Bottleneck</strong> &#8211; Tarring the whole web root directory was creating a ton of disk io, and remember the more disk io that is going on, the less is available for everything else.</li>
<li><strong>CPU Bottleneck #2</strong> &#8211; Using scp to send my backups was security-smart, but these huge archive files had to be encrypted and sent over the net.</li>
</ol>
<p><a id="breaking-bottlenecks" name="breaking-bottlenecks"></a></p>
<h2>Breaking Bottles</h2>
<p>I apologize for being a little long-winded there, but I think it&#8217;s important to make sure everyone understands those basic concepts, which are foreign to most people.  Once you understand what is causing the bottlenecks, then you can understand the solutions, which actually are incredibly simple and even a novice linux user can easily do.  Besides, the net gets a little bit faster every time someone implements this.</p>
<p><a id="nice-tool" name="nice-tool"></a></p>
<h3>nice</h3>
<p><img src="http://uploads.askapache.com/2009/10/nice-chart.png" alt="NICE Levels Chart" title="NICE Levels Chart" width="351" height="225" class="IFL" />Nice allows you to run a program with modified scheduling priority which specifies how much CPU is devoted to a particular process.  Run COMMAND with an adjusted niceness, which affects process scheduling.  With no COMMAND, print the current niceness.  </p>
<p>Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).   <code>-n, &#45;-adjustment=N</code> &#8211;  add integer N to the niceness (default 10).   <code>nice +19</code> tasks get a HZ-independent 1.5%.  Running a <code>nice +10</code> and a <code>nice +11</code> task means the first will get 55% of the CPU, the other 45%.<br class="C" /></p>
<p><a id="nice-usage" name="nice-usage"></a></p>
<h4>nice usage</h4>
<pre>nice [OPTION] [COMMAND [ARG]&#46;..]
&nbsp;
-n, &#45;-adjustment=ADJUST   increment priority by ADJUST first</pre>
<p><a id="nice-examples" name="nice-examples"></a></p>
<h4>Examples of nice</h4>
<p>Using nice to download a file</p>
<pre>nice -n 17 curl -q -v -A &#039;Mozilla/5.0&#039; -L -O http://wordpress.org/latest.zip</pre>
<p>Unzipping a file with nice</p>
<pre>nice -n 17 unzip latest.zip</pre>
<p>Nice way to build from source</p>
<pre>nice -n 2 ./configure
nice -n 2 make
nice -n 2 make install</pre>
<p>It is sometimes useful to run non-interactive programs with reduced priority.</p>
<pre>$ nice factor `echo &#039;2^9 - 1&#039;|bc`
511: 7 73</pre>
<p>Since nice prints the current priority, we can invoke it through itself to demonstrate how it works: The default behavior is to reduce priority by 10.</p>
<pre> $ nice nice
10
$ nice -n 10 nice
10</pre>
<p> The ADJUSTMENT is relative to the current priority.  The first <code>nice</code> invocation runs the second one at priority 10, and it in turn runs the final one at a priority lowered by 3 more.</p>
<pre>$ nice nice -n 3 nice
13</pre>
<p>Specifying a priority larger than 19 is the same as specifying 19.</p>
<pre>$ nice -n 30 nice
19</pre>
<p>Only a privileged user may run a process with higher priority.</p>
<pre>$ nice -n -1 nice
nice: cannot set priority: Permission denied
$ sudo nice -n -1 nice
-1</pre>
<blockquote cite="http://uploads.askapache.com/2009/08/sched-nice-design.txt">
<p>The new scheduler in v2.6.23 addresses all three types of complaints:</p>
<p>To address the first complaint (of nice levels being not &#8220;punchy&#8221; enough), the scheduler was decoupled from &#8216;time slice&#8217; and HZ concepts (and granularity was made a separate concept from nice levels) and thus it was possible to implement better and more consistent nice +19 support: with the new scheduler nice +19 tasks get a HZ-independent 1.5%, instead of the variable 3%-5%-9% range they got in the old scheduler.</p>
<p>To address the second complaint (of nice levels not being consistent), the new scheduler makes nice(1) have the same CPU utilization effect on tasks, regardless of their absolute nice levels. So on the new scheduler, running a nice +10 and a nice 11 task has the same CPU utilization &#8220;split&#8221; between them as running a nice -5 and a nice -4 task. (one will get 55% of the CPU, the other 45%.) That is why nice levels were changed to be &#8220;multiplicative&#8221; (or exponential) &#8211; that way it does not matter which nice level you start out from, the &#8216;relative result&#8217; will always be the same.</p>
<p>The third complaint (of negative nice levels not being &#8220;punchy&#8221; enough and forcing audio apps to run under the more dangerous SCHED_FIFO scheduling policy) is addressed by the new scheduler almost automatically: stronger negative nice levels are an automatic side-effect of the recalibrated dynamic range of nice levels.</p>
</blockquote>
<p><a id="renice-tool" name="renice-tool"></a></p>
<h3>renice</h3>
<p>Renice is similar to the nice command, but it lets you modify the nice of a currently running process.  This is nice for shell scripts where you can add this to the top of the script to nicify the whole script to 19.</p>
<p><a id="renice-usage" name="renice-usage"></a></p>
<h4>renice usage</h4>
<pre>renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
&nbsp;
-g      Force who parameters to be interpreted as process group ID&#039;s.
-u      Force the who parameters to be interpreted as user names.
-p      Resets the who interpretation to be (the default) process ID&#039;s.</pre>
<p><a id="renice-examples" name="renice-examples"></a></p>
<h4>Examples of renice</h4>
<p>From the shell, changes the priority of the shell and all children to 19.  From a shell script, does the same but only for the script and its children.</p>
<pre>renice 19 -p $$</pre>
<p>This runs renice without any output</p>
<pre>renice 19 -p $$ &amp;&gt;/dev/null</pre>
<p>10 gets more CPU than 19</p>
<pre>renice 10 -p $$</pre>
<p>change the priority of process ID&#8217;s 987 and 32, and all processes owned by users daemon and root.</p>
<pre>renice +1 987 -u daemon root -p 32</pre>
<p><a id="part2-disk-io" name="part2-disk-io"></a></p>
<h2>Part 2: Optimizing Disk I/O</h2>
<p><a id="scheduling-policies" name="scheduling-policies"></a></p>
<h3>Linux Scheduling Policies</h3>
<p>The scheduler is the kernel component that decides which runnable process will be executed by the CPU next.  Each process has an associated scheduling policy and a static scheduling priority, sched_priority</p>
<p>Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the <strong>range 1 (low) to 99 (high)</strong>.  (As the numbers imply, real-time processes always have higher priority than normal processes.)   The following &#8220;real-time&#8221; policies are also supported, for special time-critical applications that need precise control over the way in which runnable processes are selected for execution:</p>
<p>Currently, Linux supports the following &#8220;normal&#8221; (i.e., non-real-time) scheduling policies:</p>
<dl>
<dt><strong>SCHED_OTHER</strong>: Default Linux time-sharing scheduling</dt>
<dd>The standard round-robin time-sharing policy</dd>
<dt><strong>SCHED_BATCH</strong>: Scheduling batch processes</dt>
<dd>This policy is useful for workloads that are non-interactive, but do not want to lower their nice value, and for workloads that want a deterministic scheduling policy without interactivity causing extra preemptions (between the workload&#8217;s tasks).</dd>
<dt><strong>SCHED_IDLE</strong>: Scheduling very low priority jobs</dt>
<dd>This policy is intended for running jobs at extremely low priority (lower even than a +19 nice value with the SCHED_OTHER or SCHED_BATCH policies)</dd>
<dt><strong>SCHED_FIFO</strong>: First In-First Out scheduling</dt>
<dd>A first-in, first-out policy</dd>
<dt><strong>SCHED_RR</strong>: Round Robin scheduling</dt>
<dd>A round-robin policy.</dd>
</dl>
<p><a id="scheduling-classes" name="scheduling-classes"></a></p>
<h3>Scheduling Classes</h3>
<dl>
<dt><code>IOPRIO_CLASS_RT</code></dt>
<dd>This is the realtime io class. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window.  This scheduling class is given higher priority than any other in the system, processes from this class are given first access to the disk every time. Thus it needs to be used with some care, one io RT process can starve the entire system. Within the RT class, there are 8 levels of class data that determine exactly how much time this process needs the disk for on each service. In the future this might change to be more directly mappable to performance, by passing in a wanted data rate instead.</dd>
<dt><code>IOPRIO_CLASS_BE</code></dt>
<dd>This is the best-effort scheduling class, which is the default for any process that hasn&#8217;t set a specific io priority. This is the default scheduling class for any process that hasn&#8217;t asked for a specific io priority. Programs inherit the CPU nice setting for io priorities. This class takes a priority argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round-robin fashion.  The class data determines how much io bandwidth the process will get, it&#8217;s directly mappable to the cpu nice levels just more coarsely implemented. 0 is the highest BE prio level, 7 is the lowest. The mapping between cpu nice level and io nice level is determined as: io_nice = (cpu_nice + 20) / 5.</dd>
<dt><code>IOPRIO_CLASS_IDLE</code></dt>
<dd>This is the idle scheduling class, processes running at this level only get io time when no one else needs the disk. A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority argument.    The idle class has no class data, since it doesn&#8217;t really apply here.</dd>
</dl>
<p><a id="ionice-tool" name="ionice-tool"></a></p>
<h3>ionice</h3>
<p>ionice &#8211; get/set program io scheduling class and priority.  This program sets the io scheduling class and priority for a program.  Since v3 (aka CFQ Time Sliced) CFQ implements I/O nice levels similar to those of CPU scheduling. These nice levels are grouped in three scheduling classes each one containing one or more priority levels:</p>
<p><a id="ionice-usage" name="ionice-usage"></a></p>
<h4>ionice usage</h4>
<p>If no arguments or just -p is given, ionice will query the current io scheduling class and priority for that process.</p>
<pre>ionice [-c] [-n] [-p] [COMMAND [ARG&#46;..]]</pre>
<ul>
<li><strong>-c</strong> &#8211; The scheduling class. 1 for real time, 2 for best-effort, 3 for idle.</li>
<li><strong>-n</strong> &#8211; The scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.</li>
<li><strong>-p</strong> &#8211; Pass in a process pid to change an already running process. If this argument is not given, ionice will run the listed program with the given parameters.</li>
</ul>
<p><a id="ionice-examples" name="ionice-examples"></a></p>
<h4>ionice Examples</h4>
<p>Sets process with PID 89 as an idle io process.</p>
<pre>ionice -c3 -p89</pre>
<p>Runs &#8216;bash&#8217; as a best-effort program with highest priority.</p>
<pre>ionice -c2 -n0 bash</pre>
<p>Returns the class and priority of the process with PID 89</p>
<pre>ionice -p89</pre>
<blockquote cite="http://gaarai.com/2009/03/06/multitasking-from-the-linux-command-line-plus-process-prioritization/">
<p>
<p>With the ionice command, you can set the IO priority for a process to one of three classes: Idle (3), Best Effort (2), and Real Time (1). The Idle class means that the process will only be able to read and write to the disk when all other processes are not using the disk. The Best Effort class is the default and has eight different priority levels from 0 (top priority) to 7 (lowest priority). The Real Time class results in the process having first access to the disk irregardless of other process and should never be used unless you know what you are doing.</p>
<p>If we wish to run the updatedb process in the background with an Idle IO class priority, we can run the following:</p>
<pre>
$ sudo date
$ sudo updatedb &amp;
[1] 16324
$ sudo ionice -c3 -p16324
</pre>
<p>If we’d rather just lower the Best Effort class priority (defaults to 4) for the command so the process isn’t limited to idle IO periods, we can run the following:</p>
<pre>
$ sudo date
$ sudo updatedb &amp;
[1] 16324
$ sudo ionice -c2 -n7 -p16324
</pre>
<p>Again, the Real Time class should not be used as it can prevent you from being able to interact with your system.</p>
<p>You may wonder where you can get the process ID if you don’t know it, can’t remember it, or didn’t start the process (an automatted script may have launched it). You can find process IDs with the ps command.</p>
<p>For example, if I had an updatedb program running in the background, and I wanted to find its process ID, I can run the following:</p>
<pre>
$ ps -C updatedb
PID TTY TIME CMD
4234 ? 00:00:42 updatedb
</pre>
<p>This tells me that the process’ process ID (PID) is 4234.</p>
</p>
</blockquote>
<p><a id="iostat-tool" name="iostat-tool"></a></p>
<h3>iostat</h3>
<p><a id="iostat-usage" name="iostat-usage"></a></p>
<h4>iostat Usage</h4>
<pre>iostat [ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [ &lt;device&gt; [&#46;..] | ALL ] [ -p [ &lt;device&gt; [,&#46;..] | ALL ] ] [ &lt;interval&gt; [ &lt;count&gt; ] ]

-c     The -c option is exclusive of the -d option and displays only the CPU usage report.
-d     The -d option is exclusive of the -c option and displays only the device utilization report.
-k     Display statistics in kilobytes per second instead of blocks per second.  Data displayed are valid only with kernels 2.4 and newer.
-m     Display statistics in megabytes per second instead of blocks or kilobytes per second.  Data displayed are valid only with kernels 2.4 and newer.
-n     Displays the NFS-directory statistic.  Data displayed are valid only with kernels 2.6.17 and newer.  This option is exclusive ot the -x option.
-h     Display the NFS report more human readable.
-p [ { device | ALL } ]   The  -p  option  is  exclusive  of  the -x option and displays statistics for block devices and all their partitions that are used by the system.
-t     Print the time for each report displayed.
-x     Display extended statistics.
</pre>
<p><a id="iostat-examples" name="iostat-examples"></a></p>
<h4>iostat Examples</h4>
<pre>iostat -p ALL 2 1000
avg-cpu:  %user   %nice    %sys %iowait   %idle
            8.34    0.08    1.26    2.27   88.05
</pre>
<p>Display a single history since boot report for all CPU and Devices.</p>
<pre>$ iostat</pre>
<p>Display a continuous device report at two second intervals.</p>
<pre>$ iostat -d 2</pre>
<p>Display six reports at two second intervals for all devices.</p>
<pre>$ iostat -d 2 6</pre>
<p>Display six reports of extended statistics at two second intervals for devices hda and hdb.</p>
<pre>$ iostat -x hda hdb 2 6</pre>
<p>Display six reports at two second intervals for device sda and all its partitions (sda1, etc.)</p>
<pre>$ iostat -p sda 2 6</pre>
<p><a id="schedule-utils" name="schedule-utils"></a></p>
<h2>Schedule Utils</h2>
<p>These are the Linux scheduler utilities &#8211; schedutils for short.  These programs take advantage of the scheduler family of syscalls that Linux implements across various kernels.  These system calls implement interfaces for scheduler-related parameters such as CPU affinity and real-time attributes.  The standard UNIX utilities do not provide support for these interfaces &#8212; thus this package.</p>
<p>The programs that are included in this package are chrt and taskset.  Together with nice and renice (not included), they allow full control of process scheduling parameters.  Suggestions for related utilities are welcome, although it is believed (barring new interfaces) that all scheduling interfaces are covered.</p>
<p>I&#8217;ve found that quite a few servers do not have this package installed, indicating to you that they might not know what they are doing.  Here is how you can install this incredible package, for non-root users.  Root users know how to do this, or they shouldn&#8217;t be root.  Download and install in 1 line provided you have curl.  Or just use the following commands.</p>
<pre>mkdir -pv $HOME/{dist,source,bin,share/man/man1} &amp;&amp; cd ~/dist &amp;&amp; curl -O http://ftp.de.debian.org/debian/pool/main/s/schedutils/schedutils_1.5.0.orig.tar.gz &amp;&amp; cd ~/source &amp;&amp; tar -xvzf ~/dist/sch*z &amp;&amp; cd sch* &amp;&amp; sed -i -e &#039;s,= /usr/local,=${HOME},g&#039; Makefile &amp;&amp; make &amp;&amp; make install &amp;&amp; make installdoc</pre>
<pre>
mkdir -pv $HOME/{dist,source,bin,share/man/man1}
cd ~/dist &amp;&amp; curl -O http://ftp.de.debian.org/debian/pool/main/s/schedutils/schedutils_1.5.0.orig.tar.gz
cd ~/source &amp;&amp; tar -xvzf ~/dist/schedutils_1.5.0.orig.tar.gz
cd ~/source/schedutils-1.5.0 &amp;&amp; sed -i -e &#039;s,= /usr/local,=${HOME},g&#039; Makefile
make || make -d &amp;&amp; make install || make install -d &amp;&amp; make installdoc || make installdoc -d
</pre>
<p><a id="taskset-tool" name="taskset-tool"></a></p>
<h3>taskset</h3>
<p>Taskset  is  used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affinity.  CPU affinity is a scheduler property that &#8220;bonds&#8221; a process to a given set of CPUs on the system.  The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs.  Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons.  Therefore, forcing a specific CPU affinity is useful only in certain applications.</p>
<p>The  CPU  affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU.  Not all CPUs may exist on a given system but a mask may specify more CPUs than are present.  A retrieved mask will reflect only the bits that correspond to CPUs physically on the system.  If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned.  A user must possess CAP_SYS_NICE to change the CPU affinity of a process.  Any user can retrieve the affinity mask.</p>
<p><a id="taskset-usage" name="taskset-usage"></a></p>
<h4>taskset Usage</h4>
<pre>taskset [options] [mask | cpu-list] [pid | cmd [args&#46;..]]
&nbsp;
-p, &#45;-pid            operate on existing given pid
-c, &#45;-cpu-list     display and specify cpus in list format</pre>
<p><a id="taskset-examples" name="taskset-examples"></a></p>
<h4>taskset-examples</h4>
<p>The default behavior is to run a new command:</p>
<pre>$ taskset 03 sshd -b 1024</pre>
<p>You can retrieve the mask of an existing task or set it:</p>
<pre>$ taskset -p 700
$ taskset -p 03 700</pre>
<p>List format uses a comma-separated list instead of a mask:</p>
<pre>$ taskset -pc 0,3,7-11 700</pre>
<p><a id="chrt-tool" name="chrt-tool"></a></p>
<h3>chrt</h3>
<p><code>chrt</code> sets or retrieves the real-time scheduling attributes of an existing PID or runs COMMAND with the given attributes.  Both policy (one of <code>SCHED_FIFO</code>, <code>SCHED_RR</code>, or <code>SCHED_OTHER</code>) and priority can be set and retrieved.  A user must possess CAP_SYS_NICE to change the scheduling attributes of a process.  Any user can retrieve the scheduling information.</p>
<p><a id="chrt-usage" name="chrt-usage"></a></p>
<h4>chrt Usage</h4>
<pre>chrt [options] [prio] [pid | cmd [args&#46;..]]
&nbsp;
-p, &#45;-pid operate on an existing PID and do not launch a new task
-f, &#45;-fifo set scheduling policy to SCHED_FIFO
-m, &#45;-max show minimum and maximum valid priorities, then exit
-o, &#45;-other set policy scheduling policy to SCHED_OTHER
-r, &#45;-rr set scheduling policy to SCHED_RR (the default)
</pre>
<p><a id="chrt-examples" name="chrt-examples"></a></p>
<h4>chrt Examples</h4>
<p>The default behavior is to run a new command:   <code>chrt [prio] &#45;- [command] [arguments]</code></p>
<p>You can also retrieve the real-time attributes of an existing task:</p>
<pre>chrt -p [pid]</pre>
<p>Or set them:</p>
<pre>chrt -p [prio] [pid]</pre>
<p><a id="ulimit-tool" name="ulimit-tool"></a></p>
<h2>ulimit &#8211; get and set user limits</h2>
<p>Ulimit provides control over the resources available to processes started by the shell, on systems that allow such control. One can set the resource limits of the shell using the built-in ulimit command.  The shell&#8217;s resource limits are inherited by the processes that it creates to execute commands.</p>
<p><a id="ulimit-usage" name="ulimit-usage"></a></p>
<h4>ulimit Usage</h4>
<pre>ulimit [-SHacdfilmnpqstuvx] [limit]</pre>
<dl>
<dt>-S</dt>
<dd>use the `soft&#8217; resource limit</dd>
<dt>-H</dt>
<dd>use the `hard&#8217; resource limit</dd>
<dt>-a</dt>
<dd>all current limits are reported</dd>
<dt>-c</dt>
<dd>the maximum size of core files created</dd>
<dt>-d</dt>
<dd>the maximum size of a process&#8217;s data segment</dd>
<dt>-f</dt>
<dd>the maximum size of files created by the shell</dd>
<dt>-l</dt>
<dd>the maximum size a process may lock into memory</dd>
<dt>-m</dt>
<dd>the maximum resident set size</dd>
<dt>-n</dt>
<dd>the maximum number of open file descriptors</dd>
<dt>-p</dt>
<dd>the pipe buffer size</dd>
<dt>-s</dt>
<dd>the maximum stack size</dd>
<dt>-t</dt>
<dd>the maximum amount of cpu time in seconds</dd>
<dt>-u</dt>
<dd>the maximum number of user processes</dd>
<dt>-v</dt>
<dd>the size of virtual memory</dd>
</dl>
<p>If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `soft&#8217;, `hard&#8217;, and `unlimited&#8217; stand for the current soft limit, the current hard limit, and no limit, respectively.  Otherwise, the current value of the specified resource is printed.  If no option is given, then -f is assumed.  Values are in 1024-byte increments, except for -t, which is in seconds, -p, which is in increments of 512 bytes, and -u, which is an unscaled number of processes.</p>
<dl>
<dt>RLIMIT_AS</dt>
<dd>The maximum size of the process&#8217;s virtual memory (address space) in bytes.  This limit affects calls to brk(2), mmap(2) and mremap(2), which fail with the error ENOMEM upon exceeding this limit.  Also automatic stack expansion will fail (and generate a SIGSEGV that kills the process if no alternate stack has been made available via sigaltstack(2)).  Since the value is a long, on machines with a 32-bit long either this limit is at most 2 GiB, or this resource is unlimited.</dd>
<dt>RLIMIT_CORE</dt>
<dd>Maximum size of core file.  When 0 no core dump files are created. When non-zero, larger dumps are truncated to this size.</dd>
<dt>RLIMIT_CPU CPU</dt>
<dd>time limit in seconds.  When the process reaches the soft limit, it is sent a SIGXCPU signal.  The default action for this signal is to terminate the process.  However, the signal can be caught, and the handler can return control to the main program.  If the process continues to consume CPU time, it will be sent SIGXCPU once per second until the hard limit is reached, at which time it is sent SIGKILL. (This latter point describes Linux 2.2 through 2.6 behavior. Implementations vary in how they treat processes which continue to consume CPU time after reaching the soft limit.  Portable applications that need to catch this signal should perform an orderly termination upon first receipt of SIGXCPU.)</dd>
<dt>RLIMIT_DATA</dt>
<dd>The maximum size of the process&#8217;s data segment (initialized data, uninitialized data, and heap).  This limit affects calls to brk(2) and sbrk(2), which fail with the error ENOMEM upon encountering the soft limit of this resource.</dd>
<dt>RLIMIT_FSIZE</dt>
<dd>The maximum size of files that the process may create.  Attempts to extend a file beyond this limit result in delivery of a SIGXFSZ signal. By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., write(2), truncate(2)) fails with the error EFBIG.</dd>
<dt>RLIMIT_LOCKS</dt>
<dd>(Early Linux 2.4 only) A limit on the combined number of flock(2) locks and fcntl(2) leases that this process may establish.</dd>
<dt>RLIMIT_MEMLOCK</dt>
<dd>The maximum number of bytes of memory that may be locked into RAM.  In effect this limit is rounded down to the nearest multiple of the system page size.  This limit affects mlock(2) and mlockall(2) and the mmap(2) MAP_LOCKED operation.  Since Linux 2.6.9 it also affects the shmctl(2) SHM_LOCK operation, where it sets a maximum on the total bytes in shared memory segments (see shmget(2)) that may be locked by the real user ID of the calling process.  The shmctl(2) SHM_LOCK locks are accounted for separately from the per-process memory locks established by mlock(2), mlockall(2), and mmap(2) MAP_LOCKED; a process can lock bytes up to this limit in each of these two categories.  In Linux kernels before 2.6.9, this limit controlled the amount of memory that could be locked by a privileged process.  Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process may lock, and this limit instead governs the amount of memory that an unprivileged process may lock.</dd>
<dt>RLIMIT_MSGQUEUE</dt>
<dd>(Since Linux 2.6.8) Specifies the limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process.  This limit is enforced for mq_open(3).  Each message queue that the user creates counts (until it is removed) against this limit according to the formula:  <code>bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +             attr.mq_maxmsg * attr.mq_msgsize</code> where attr is the mq_attr structure specified as the fourth argument to mq_open(3).  The first addend in the formula, which includes sizeof(struct msg_msg *) (4 bytes on Linux/i386), ensures that the user cannot create an unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead).</dd>
<dt>RLIMIT_NICE</dt>
<dd>(since Linux 2.6.12, but see BUGS below) Specifies a ceiling to which the process&#8217;s nice value can be raised using setpriority(2) or nice(2).  The actual ceiling for the nice value is calculated as 20 &#8211; rlim_cur.  (This strangeness occurs because negative numbers cannot be specified as resource limit values, since they typically have special meanings.  For example, RLIM_INFINITY typically is the same as -1.)</dd>
<dt>RLIMIT_NOFILE</dt>
<dd>Specifies a value one greater than the maximum file descriptor number that can be opened by this process.  Attempts (open(2), pipe(2), dup(2), etc.)  to exceed this limit yield the error EMFILE. (Historically, this limit was named RLIMIT_OFILE on BSD.)</dd>
<dt>RLIMIT_NPROC</dt>
<dd>The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process.  Upon encountering this limit, fork(2) fails with the error EAGAIN.</dd>
<dt>RLIMIT_RSS</dt>
<dd>Specifies the limit (in pages) of the process&#8217;s resident set (the number of virtual pages resident in RAM).  This limit only has effect in Linux 2.4.x, x < 30, and there only affects calls to madvise(2) specifying MADV_WILLNEED.</dd>
<dt>RLIMIT_RTPRIO</dt>
<dd>(Since Linux 2.6.12, but see BUGS) Specifies a ceiling on the real-time priority that may be set for this process using sched_setscheduler(2) and sched_setparam(2).</dd>
<dt>RLIMIT_RTTIME</dt>
<dd>(Since Linux 2.6.25) Specifies a limit on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume without making a blocking system call.  For the purpose of this limit, each time a process makes a blocking system call, the count of its consumed CPU time is reset to zero.  The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time slice expires, or it calls sched_yield(2). Upon reaching the soft limit, the process is sent a SIGXCPU signal.  If the process catches or ignores this signal and continues consuming CPU time, then SIGXCPU will be generated once each second until the hard limit is reached, at which point the process is sent a SIGKILL signal.  The intended use of this limit is to stop a runaway real-time process from locking up the system.</dd>
<dt>RLIMIT_SIGPENDING</dt>
<dd>(Since Linux 2.6.8) Specifies the limit on the number of signals that may be queued for the real user ID of the calling process.  Both standard and real-time signals are counted for the purpose of checking this limit.  However, the limit is only enforced for sigqueue(2); it is always possible to use kill(2) to queue one instance of any of the signals that are not already queued to the process.</dd>
<dt>RLIMIT_STACK</dt>
<dd>The maximum size of the process stack, in bytes.  Upon reaching this limit, a SIGSEGV signal is generated.  To handle this signal, a process must employ an alternate signal stack (sigaltstack(2)).</dd>
</dl>
<p><a id="ulimit-examples" name="ulimit-examples"></a></p>
<h4>ulimit Examples</h4>
<p>Turn off core dumps</p>
<pre>ulimit -S -c 0</pre>
<h2>More Reading</h2>
<ul>
<li>Please see the <a href="http://pagesperso-orange.fr/sebastien.godard/">SYSSTAT Utilities Home for more performance monitoring tools</a> like sar, sadf, mpstat, iostat, pidstat and sa tools.</li>
<li><a href="http://gaarai.com/2009/03/06/multitasking-from-the-linux-command-line-plus-process-prioritization/">Multitasking from the Linux Command Line + Process Prioritization</a></li>
</ul>
<h2>Man Pages</h2>
<ol>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/sched_setscheduler.2.html">sched_setscheduler</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man7/cpuset.7.html">cpuset</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man7/signal.7.html">signal</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/getrlimit.2.html">getrlimit</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man3/ulimit.3.html">ulimit</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/ioprio_get.2.html">ioprio_get</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/ioprio_set.2.html">ioprio_set</a></li>
</ol>
<h2>Kernel Documentation</h2>
<ul>
<li><a href='http://uploads.askapache.com/2009/08/sched-stats.txt'>information on schedstats (Linux Scheduler Statistics)</a></li>
<li><a href='http://uploads.askapache.com/2009/08/sched-rt-group.txt'>real-time group scheduling</a></li>
<li><a href='http://uploads.askapache.com/2009/08/sched-nice-design.txt'>How and why the scheduler&#8217;s nice levels are implemented</a></li>
<li><a href='http://uploads.askapache.com/2009/08/sched-domains.txt'>information on scheduling domains</a></li>
<li><a href='http://uploads.askapache.com/2009/08/sched-design-CFS.txt'>goals, design and implementation of the Complete Fair Scheduler</a></li>
</ul>
<h2>Future Discussions:</h2>
<p><a href="http://www.cuddletech.com/blog/pivot/entry.php?id=820">IO Benchmarking: How, Why and With What</a></p>
<p><a href="http://www.askapache.com/linux-unix/optimize-nice-ionice.html">Optimizing Servers and Processes for Speed with ionice, nice, ulimit</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/p2r-2dueCCwlzVEqzjE5_G9DPmE/0/da"><img src="http://feedads.g.doubleclick.net/~a/p2r-2dueCCwlzVEqzjE5_G9DPmE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/p2r-2dueCCwlzVEqzjE5_G9DPmE/1/da"><img src="http://feedads.g.doubleclick.net/~a/p2r-2dueCCwlzVEqzjE5_G9DPmE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9U5RRoy_zhs:vs0R93PpAMA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9U5RRoy_zhs:vs0R93PpAMA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/linux-unix/optimize-nice-ionice.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/linux-unix/optimize-nice-ionice.html</feedburner:origLink></item>
		<item>
		<title>Windows Optimization – Intense Part II</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/lsZiZjPcUUs/defrag-optimize-speed-xp.html</link>
		<comments>http://www.askapache.com/windows/defrag-optimize-speed-xp.html#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:42:28 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Defrag]]></category>
		<category><![CDATA[Defragmentation]]></category>
		<category><![CDATA[Deframenting]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[MyDefrag]]></category>
		<category><![CDATA[PageDefrag]]></category>
		<category><![CDATA[Registry Optimization]]></category>
		<category><![CDATA[SpinRite]]></category>
		<category><![CDATA[UltraDefrag]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3039</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/windows/defrag-optimize-speed-xp.html" class="IFL"><img src="http://uploads.askapache.com/2009/10/HDTune_Benchmark-116x94.gif" alt="HDTune_Benchmark" title="HDTune_Benchmark" width="116" height="94" class="alignnone size-thumbnail wp-image-3425" /></a>If you ever wanted to know the best way to defragment and speed up your Windows-Based PC, I mean you <em>really</em> wanted to know, here is the 2nd part to my article on Windows Speed Optimizing that details the process I have found works really well.  Definately not a quick process, and certainly not the best ever, just my best ever and one that you only have to do once to get the benefits.  
This article has a lot of incredibly useful (and FREE) tools I recommend, which you can grab and use without reading the article..<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>This is part 2 of my Windows XP Optimization article:  <a href="http://www.askapache.com/windows/blazing-fast-xp-speed.html">Make Windows XP Blazingly Fast</a>.</p>
<p>The first article was meant as a <a href="http://www.askapache.com/windows/blazing-fast-xp-speed.html">detailed and thorough introduction to speeding up Windows-based PC&#8217;s</a> in a way that makes it easy to follow, without getting too specific.  So make sure you read that first, and pay the most attention to freeing up RAM, CPU, and Disk IO speed by reducing the number of services and processes that are running, we will deal with defragmentation, hard-drive speed, Disk IO, Prefetching, and Pagefile/Registry Defragmentation now.</p>
<p>This article has some really really really great stuff for ya.  It shows which tools (all but one completely free) are the best and you will use them for a long time, they are all very good.  That is just a side benefit, as this article is really more of a step-by-step guide to optimizing your system that won&#8217;t have to be repeated for at least a year.  The result of course is a much more responsive PC.</p>
<h2>Whats New</h2>
<p>After writing that article I continued my research and testing into the subject on my personal computers.  I wanted to test out several additional programs and methods before I wrote about them for you guys, and I found a few really sweet additions that had a very big performance gain for all my computers, from my oldest and slowest PC&#8217;s to my new 4K power laptop.  This article is primarily focused on optimizing your hard drive data and improving your Disk IO speed, and you will definately see an improvement in speed.  It doesn&#8217;t get REALLY good until the defragmenting section..</p>
<ol>
<li><a href="#optimize-hard-drive">Clean Up Hard Drive</a> &#8211; Removing unneccessary files</li>
<li><a href="#registry-cleaning">Clean Registry</a> &#8211; Fixing slow registry problems automatically</li>
<li><a href="#defragmenting">Ultimate Defragmenting</a> &#8211; The best defrag method I use</li>
<li><a href="#optimize-disk">Optimize Physical Hard Disk</a> &#8211; Final step that cleans and heals your physical disk</li>
</ol>
<hr class="C" />
<p><a id="optimize-hard-drive" name="optimize-hard-drive"></a></p>
<h2>Clean Up Hard Drive</h2>
<p>The first step is to clean up all the extra, temporary, and unneccessary files cluttering your hard-drive.  The reason is because we will be defragmenting your hard-drive like its never been defragged before, then we are going to go over every single bit and byte of your hard-drive to optimize the physical sectors and storage of your data..   Also we will be running a check of your registry and cleaning out bad links and other slow errors, so get it as clutter-free as possible.  DON&#8217;T use Windows built-in folder compression, it makes defragmentation worse&#8230; DO use 7-zip or winrar to create a solid archive file of any misc directories with a bunch of files&#8230; You only need one program to clean your system.</p>
<h3>CCleaner</h3>
<p><a class="ccleaner ccl1 IFL" href="http://uploads.askapache.com/2009/10/screen_301.png" title="CCleaner main program window open on the Windows tab"></a>CCleaner is a Small, Fast and Free software that removes unused and temporary files from your system and allows Windows to run faster, more efficiently and gives you more hard disk space.  I&#8217;ve now been using it for several months and love it.  As well as cleaning up old files and settings left by standard Windows components, CCleaner also cleans temporary files and recent file lists for many applications. Including: Firefox, Opera, Safari, Media Player, eMule, Kazaa, Google Toolbar, Netscape, Microsoft Office, Nero, Adobe Acrobat Reader, WinRAR, WinAce, WinZip and more&#8230; Google Chrome, Opera, Safari, etc..<br class="C" /></p>
<ul>
<li>Recycle Bin, Clipboard</li>
<li>Windows Temporary files, Windows Log files, Chkdsk file fragments</li>
<li>Recent Documents (on the Start Menu), Run history (on the Start Menu)</li>
<li>Windows XP Search Assistant history, old Prefetch data, Windows memory dumps after crashes</li>
</ul>
<p><a href="http://www.ccleaner.com/download">Download CCleaner</a><br class="C" /></p>
<hr class="C" />
<p><a id="registry-cleaning" name="registry-cleaning"></a></p>
<h2>Registry Cleaning</h2>
<p>The registry is Windows biggest mistake, (although I&#8217;m sure they like it), and basically holds all the information for your programs and Windows.  Things like the size of your windows, recent file lists, icon files for different icons, etc..  I&#8217;ve never seen a computer that didn&#8217;t have some registry issues, so this needs to be cleaned and may have a huge impact on your speed.  Real quickly, here are some programs to backup and restore your registry, optimize and defrag your registry, and finally search and clean any errors in your registry.</p>
<h3>CCleaner</h3>
<p><a class="ccleaner ccl3 IFL" href="http://uploads.askapache.com/2009/10/screen_303.png" title="CCleaner Issue Scanning section with the results of a scan"></a>Yup!  CCleaner also takes care of most of the performance issues of your registry.  It&#8217;s very safe and fast.  CCleaner uses an advanced Registry Cleaner to check for problems and inconsistencies. It checks the following:<br class="C" /></p>
<ul>
<li>ClassIDs, ProgIDs, Application Paths, Icons</li>
<li>Uninstallers, Shared DLLs, Fonts, Help File references</li>
<li>File Extensions, ActiveX Controls, Invalid Shortcuts and more&#8230;</li>
</ul>
<p><a href="http://www.ccleaner.com/download">Download CCleaner</a><br class="C" /></p>
<h3>ERUNT &#8211; The Emergency Recovery Utility NT</h3>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/erunt.gif" alt="ERUNT – Registry Backup and Restore Emergency Recovery Utility for Windows" title="ERUNT – Registry Backup and Restore Emergency Recovery Utility for Windows" width="32" height="32" /><a href="http://www.larshederer.homepage.t-online.de/erunt/index.htm">ERUNT</a> is a Registry Backup and Restore utility for Windows NT/2000/2003/XP.  I use this to backup my registry automatically or on command.. Ive used it for years and it&#8217;s always good to backup before you do anything.<br class="C" /></p>
<pre>
# Here&#039;s the command I use (only for advanced users familiar with autoback)
"%ProgramFiles%\ERUNT\AUTOBACK.EXE" %SystemRoot%\ERDNT\#Date# sysreg curuser otherusers /noconfirmdelete /noprogresswindow /days:45 /alwayscreate
</pre>
<p><a href="http://www.larshederer.homepage.t-online.de/erunt/">Download ERUNT</a> &middot; (<a href="http://www.larshederer.homepage.t-online.de/erunt/erunt.txt">Details</a>)<br class="C" /></p>
<h3>NTGREGOPT &#8211; NT Registry Optimizer</h3>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/ntregopt.gif" alt="NTGREGOPT – NT Registry Optimizer for Windows" title="NTGREGOPT – NT Registry Optimizer for Windows" width="32" height="32" /><a href="http://www.larshederer.homepage.t-online.de/erunt/index.htm">NTGREGOPT</a> is a Registry Optimization tool for Windows NT/2000/2003/XP/Vista that minimizes the size of your registry files by simply compacting the registry hives to the minimum size possible.</p>
<p>Registry files in an NT-based system can become fragmented over time, occupying more space on your hard disk than necessary and decreasing overall performance. You should use the NTREGOPT utility regularly, but especially after installing or uninstalling a program, to minimize the size of the registry files and optimize registry access.  The program works by recreating each registry hive &#8220;from scratch&#8221;, thus removing any slack space that may be left from previously modified or deleted keys.  It does NOT change the contents of the registry in any way, nor does it physically defrag the registry files on the drive.  I recommend using this once every couple weeks.  I scheduled it to run automatically.<br class="C" /></p>
<p><a href="http://www.larshederer.homepage.t-online.de/erunt/">Download NTGREGOPT</a> &middot; (<a href="http://www.larshederer.homepage.t-online.de/erunt/ntregopt.txt">Details</a>)<br class="C" /></p>
<hr class="C" />
<p><a id="defragmenting" name="defragmenting"></a></p>
<h2>Ultimate Defragmenting</h2>
<p>I say &#8220;Ultimate Defragmenting&#8221; because this is the result of a lot of testing of all the various defragmenting software out there, reading a lot of documentation, and running benchmarking to find the fastest results.  This is a mix of several individual defragmenting steps combined for a once-a-year ultimate defragmenting session.  This is what I use today, and although it&#8217;s altogether a long process, each step you&#8217;ll add a new tool or skill that you can use by itself from here on out.</p>
<p class="inote">ATTENTION:  While running MyDefrag/JkDefrag, SpinRite, and UltraDefrag your computer can get very hot and that is very not cool.  I set my laptop on a coke can and pointed a small desk fan at it which kept it very very cool, so do what you can to minimize heat during these programs.</p>
<h3>PageDefrag</h3>
<p><img src="http://uploads.askapache.com/2009/10/PageDefrag-115x94.gif" alt="PageDefrag SysInternals By Mark Russinovich" title="PageDefrag SysInternals By Mark Russinovich" width="115" height="94" class="IFL" /><a href="http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx">PageDefrag</a> uses advanced techniques to provide you what commercial defragmenters cannot: the ability for you to see how fragmented your paging files and Registry hives are, and to defragment them. In addition, it defragments event log files and Windows 2000/XP hibernation files (where system memory is saved when you hibernate a laptop).  One of the limitations of the Windows NT/2000 defragmentation interface is that it is not possible to defragment files that are open for exclusive access. Thus, standard defragmentation programs can neither show you how fragmented your paging files or Registry hives are, nor defragment them. Paging and Registry file fragmentation can be one of the leading causes of performance degradation related to file fragmentation in a system.<br class="C" /></p>
<p>I personally keep this enabled for every boot, as it only takes a few seconds after the first time it&#8217;s run.</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx">Download PageDefrag</a><br class="C" /></p>
<h3>MyDefrag</h3>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/jkdefrag.gif" alt="jkdefrag" title="jkdefrag" width="128" height="101" class="alignnone size-full wp-image-3420" />JkDefrag is a disk defragmenter and optimizer for Windows 2000/2003/XP/Vista/2008/X64. Completely automatic and very easy to use, fast, low overhead, with several optimization strategies, and can handle floppies, USB disks, memory sticks, and anything else that looks like a disk to Windows. Included are a Windows version, a commandline version (for scheduling by the task scheduler or for use from administrator scripts), a screensaver version, a DLL library (for use from programming languages), versions for Windows X64, and the complete sources. (<a href="http://www.mydefrag.com/Manual-FrequentlyAskedQuestions.html">Frequently Asked Questions</a>)<br class="C" /></p>
<p>After trying out dozens of degragmenting programs, this is my favorite.  I utilize the cool screensaver function and just run sometimes when I&#8217;m calling it a day.</p>
<h4><a href="http://www.mydefrag.com/Manual-TipsAndTricks.html">Tips and tricks</a></h4>
<ul>
<li>Many users start looking for defragmentation/optimization programs when their computer becomes slow. The main reason for a slow computer is a full harddisk. A full harddisk is slow because the distance between files is greater than on a fresh practically empty harddisk. Deleting half the data on a full disk will just about double the speed. The more free diskspace, the faster your computer will be.</li>
<li>Buy a second harddisk (for example an USB harddisk) and move little used stuff from your primary harddisk to that secondary harddisk. The second disk can also be used for backing up the primary disk.</li>
<li>When buying a new computer, buy the biggest harddisk you can afford. Investing in a bigger harddisk gives more speed-per-dollar than investing in a faster CPU or investing in more memory.</li>
<li>Cleanup old junk from your harddisk before running MyDefrag. You can clean Windows files with for example &#8220;Start -&gt; Programs -&gt; Accessories -&gt; System Tools -&gt; Disk Cleanup&#8221;, or with something like the freeware <a href="http://www.ccleaner.com/"><b>CCleaner</b></a> program.</li>
<li>Reboot before running MyDefrag. This will release files that are in use, so they can be defragmented and optimized.</li>
<li>Boot into Windows safe mode by pressing F8 when booting, and then run MyDefrag. It will be slower because the Windows disk cache is off in safe mode, but MyDefrag will be able to process (a few) more files.</li>
<li>Stop your real time virus scanner before running MyDefrag. Virus scanners check all disk activity, making defragmentation and optimization very slow.</li>
<li>Move the swap file to another volume, reboot, defragment, and move the swap file back. If you don&#8217;t have a second volume then temporarily make the swap file small, for example 100Mb.</li>
<li>Package unused files with a packager such as <a href="http://www.7-zip.org/">7-zip</a>. The packagefile not only takes less harddisk space, but will also defragment and optimize much faster than the individual files. <b>Note</b>: This does not apply to Windows NTFS compression, which will actually make defragmentation and optimization slower.</li>
<li>The first partition on a harddisk is significantly faster than other partitions. Try to use other partitions only for data that is used less often, such as music, movies, archives, backups, logfiles.</li>
<li>If you have 2 physical harddisks of the same speed, then place the pagefile on the first partition of the second harddisk.</li>
</ul>
<p>The way I recommend is to run MyDefrag at the highest level of defragmentation once, which took my fastest PC almost 30 hours.  Once that is done you can just run it normally in 20 minutes or so.. This software also has the best defrag information I&#8217;ve found to date, so check out the documentation on the site.</p>
<p><a href="http://www.mydefrag.com/Manual-DownloadAndInstall.html">Download MyDefrag</a><br class="C" /></p>
<h3>UltraDefrag</h3>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/ultra_defrag.gif" alt="UltraDefrag - powerful Defragmentation tool for Windows" title="UltraDefrag - powerful Defragmentation tool for Windows" width="196" height="158" class="alignnone size-full wp-image-3424" />UltraDefrag is a powerful Open Source Defragmentation tool for Windows Platform. It is very fast, because the defragmenting is done via the kernel-mode driver. There are three interface available : Graphical, Console and Native.  I personally like the MyDefrag more because I think it does a better job, but I also use the UltraDefrag tool because it has one very important feature like the PageDefrag tool.  It has a native version.  That means it can run before Windows loads up by utilizing the bootexecute, the same place that windows chkdsk runs at boot.   It also can takeover for Windows builtin prefetcher, to speed up the loading of frequently used programs, which I&#8217;ll explain a bit later. <br class="C" /></p>
<p>I set ultradefrag up after the MyDefrag 30hour defrag completes, to run at boot and control the prefetching, then I erase any prefetch files currently saved and reboot which lets it defrag the system.</p>
<pre>
erase /Q "%SYSTEMROOT%\Prefetch\*.*"
</pre>
<p>Once both MyDefrag and UltraDefrag have run THEN I finally login to windows and don&#8217;t open any programs to let the windows OS files get optimized by not doing anything at all for 5 minutes..  Then I reboot and log back in and this time I don&#8217;t do anything for 30 minutes and reboot.  Finally I log back in and this time I instantly load up 10 of my most frequently used programs, (DreamWeaver, Photoshop, Firefox, Chrome, Notepad2, Thunderbird, Internet Explorer, and a few others) and once they are all loaded I don&#8217;t do anything for an hour.  Then I reboot and repeat that same process.</p>
<p>This may seem odd or made up but I do my research and this allows your prefetched files to be optimized, including your boot prefetch files.   Once that is done I reboot and run all the defrags again.  Then I reboot and am ready for the last step.</p>
<p><a href="http://ultradefrag.sourceforge.net/">Download UltraDefrag</a><br class="C" /></p>
<hr class="C" />
<p><a id="optimize-disk" name="optimize-disk"></a></p>
<h2>Optimize Physical Hard Disk</h2>
<p>Now at this point the system is defragged and optimized as much as I can get it, but the last step is to run a program to go over every single bit on our hard-drive-disk to keep the drive clean and healthy and its too technical for me to understand, I just know its amazingly cool and I noticed a big change right away.</p>
<h3>HD Tune</h3>
<p><img class="IFL" src="http://uploads.askapache.com/2009/10/HDTune_Benchmark-116x94.gif" alt="HDTune_Benchmark" title="HDTune_Benchmark" width="116" height="94" class="alignnone size-thumbnail wp-image-3425" />HD Tune is a fantastic little utility that you can use to benchmark the DISK IO speed of your various drives, internal and external, fixed and USB, firewire, etc..  Other than using it to determine your fastest drives for moving your program files and temps to, I am just including it in this article because it is an awesome program that you will love.<br class="C" /></p>
<p><a href="http://www.hdtune.com/download.html">Download HD Tune</a></p>
<h3>SpinRite</h3>
<p>This is the last step in this guide, and was the one thing that surprised me the most in terms of how much of a speed improvement I noticed after using it.  SpinRite is the most capable, thorough, and reliable utility that has ever been created for the long term maintenance, recovery, and repair of mass storage systems.   SpinRite is not a drive defragmenter. SpinRite operates with the drive&#8217;s built-in intelligence to reassign and relocate defective sectors without creating file system fragments. Thus, running SpinRite does not create fragments, but neither does it eliminate any that may exist before it was run. Unlike any other disk utility, SpinRite interfaces directly to the hard disk system’s hardware, rather than working through the system’s operating system or BIOS.  <a href="http://www.grc.com/sr/faq.htm">FAQ</a>.</p>
<p class="anote">The way that we use SpinRite in this article is method #4, Drive Maintenance mode, which reads and writes and verifies every single sector and area of your hard drives, and improves the health of your hard drive a lot.  Even on my new 4K dell power laptop, this had a noticeable improvement on speed.  After running this 20+ hours for my fastest PC, I rebooted, defragged with jkdefrag, and that is the end of this article.</p>
<blockquote cite="http://www.grc.com/files/technote.pdf">
<p>
<h4>In case you don&#8217;t already know . . . What is SpinRite?</h4>
<p>SpinRite is a stand-alone DOS application that specializes in the recovery of marginally or completely unreadable hard and floppy disk data, and in the lifetime maintenance of PC mass storage devices. It earned its stripes many years ago by introducing the concept of non-destructive low-level reformatting and sector interleave optimization. Since then its capabilities have continued to broaden until it has become the premiere tool for disk data recovery and magnetic mass storage drive maintenance. Written in assembly language, SpinRite still performs as well on a clunky old 4.77 megahertz PC/XT as on a screaming 333 megahertz Pentium II.</p>
</p>
</blockquote>
<p> While SpinRite 6.0 is running, you can toggle through seven displays:<br />
<img src="http://uploads.askapache.com/2009/10/spinrite-4.png" width="480" height="267" alt="Graphic Status Display" /><br />
<img src="http://uploads.askapache.com/2009/10/spinrite-5.png" width="480" height="267" alt="Real-Time Activities" /><br />
<img src="http://uploads.askapache.com/2009/10/spinrite-6.png" width="480" height="267" alt="Technical Log" /><br />
<img src="http://uploads.askapache.com/2009/10/spinrite-7.png" width="480" height="267" alt="S.M.A.R.T. System Monitor" /><br />
<img src="http://uploads.askapache.com/2009/10/spinrite-8.png" width="480" height="267" alt="DynaStat Data Recovery" /></p>
<p><a href="http://www.grc.com/cs/prepurch.htm">Purchase and Download SpinRite</a></p>
<hr class="C" />
<hr class="C" />
<hr class="C" />
<p>More Reading</p>
<ul>
<li><a href="http://www.pcnet-online.com/picks/spinrite.htm">PCNet File Catch &#8211; SpinRite 6.0</a></li>
<li><a href="http://www.linuxjournal.com/article/7684">SpinRite 6.0 for Linux Users</a></li>
<li><a href="http://www.sysopt.com/tutorials/article.php/12034_3549006_1">Anticipate Drive Problems Early with SpinRite v6.0</a></li>
<li><a href="http://www.blackviper.com/WinXP/supertweaks.htm">Black Viper &#8211; Windows XP Super Tweaks</a></li>
<li><a href="http://www.blackviper.com/WinXP/custom_sc_bat_Pro.php">Black Viper &#8211; Optimize your Services</a></li>
<li><a href="http://www.horstmann.com/bigj/help/windows/advanced.html">Advanced Windows Shell Tutorial</a></li>
<li><a href="http://commandwindows.com/batch.htm">Batch Files (Scripts) in Windows </a></li>
<li><a href="http://proton.pathname.com/fhs/">File System Heirarchy</a></li>
<li><a href="http://www.grc.com/sn/sn-186.htm">Steve Gibson discussing Defragmenting</a></li>
</ul>
<p><a href="http://www.askapache.com/windows/defrag-optimize-speed-xp.html">Windows Optimization &#8211; Intense Part II</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/zdzmqcXMs4-FNMgEcAIMyl9gMTg/0/da"><img src="http://feedads.g.doubleclick.net/~a/zdzmqcXMs4-FNMgEcAIMyl9gMTg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zdzmqcXMs4-FNMgEcAIMyl9gMTg/1/da"><img src="http://feedads.g.doubleclick.net/~a/zdzmqcXMs4-FNMgEcAIMyl9gMTg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=lsZiZjPcUUs:ISJRqxbUKPo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=lsZiZjPcUUs:ISJRqxbUKPo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/windows/defrag-optimize-speed-xp.html/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.askapache.com/windows/defrag-optimize-speed-xp.html</feedburner:origLink></item>
		<item>
		<title>Advanced WordPress wp-config.php Tweaks</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/I3-QaJt-u1Q/advanced-wp-config-php-tweaks.html</link>
		<comments>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:23:37 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[phpinfo]]></category>
		<category><![CDATA[wp-config.php]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3341</guid>
		<description><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>

<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>]]></description>
			<content:encoded><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>
<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>
<p>For a better handle on the way I like to structure web site directories, see <a href="http://www.askapache.com/htaccess/optimize-website-files-cache-security.html">Optimize a Website for Speed, Security, and Easy Management</a> but note it is a bit outdated compared to what I&#8217;m doing now.  I don&#8217;t have the luxury of using only one type of server, or hosting provider anymore, so I have been working towards making things even more portable in order to move from host to host from server to server without issues i.e. my portable <a href="http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html">.bash_profile</a>.</p>
<p>So I&#8217;ve been basically experimenting various ways to accomplish that and thought I would share what I am currently doing for my benefit and hopefully get some input.  All of my WP installs run the development version, and one main idea with my setups is that upgrading is automated.  So I really keep the WordPress install clean and use plugins and wp-config.php to do all the customization.</p>
<ul>
<li>Portability &#8211; Hands-free upgrades and easy to move</li>
<li>Security &#8211; Additional security and protection</li>
<li>Speed &#8211; Less CPU and Disk I/O</li>
<li>Customization &#8211; All my favorite customizations</li>
</ul>
<h2>wp-config.php</h2>
<p>These are the main settings I use.. Seriously this is more like an interactive article, because to understand it you will need to do some code grepping.  You may want to grab a jolt.</p>
<h3>ASKAPACHE_ROOT</h3>
<p>The ASKAPACHE_ROOT variable is just a better way for me to be able to include and access all the different files in my site tree.  For instance, in my non-wp php files, I can do this:</p>
<pre>
!defined(&#039;ASKAPACHE_ROOT&#039;) &amp;&amp; require $_SERVER[&#039;DOCUMENT_ROOT&#039;] . &#039;/wp-config.php&#039;;
include(ASKAPACHE_ROOT . &#039;/includes/custom-download.inc.php&#039;);
</pre>
<h3>ASKAPACHE_LOCK</h3>
<p>This is one of my all-time favorite hacks, that I think is one of the most useful methods I employ as a web developer.  This allows me to use far-future-expire headers for optimum caching, while still forcing browsers to re-validate every day or so automatically, or forcing them to re-validate whenever I change the suffix.  This takes advantage of the <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite trick</a> that I use on EVERY site I run, definately worth learning. Because I practice best-practice web-standards, for every web site I create a single css file and javascript file, which I then add to the template like:</p>
<pre>
&lt;link rel="stylesheet" type="text/css" media="all" href="http://static.askapache.com/c/apache-0&amp;lt;?php echo ASKAPACHE_LOCK?&amp;gt;.css" /&gt;
&lt;script src="http://static.askapache.com/j/apache-0&amp;lt;?php echo ASKAPACHE_LOCK;?&amp;gt;.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<pre>
&amp;lt;?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
 * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don&#039;t have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */
/* http://codex.wordpress.org/Editing_wp-config.php */
&nbsp;
/** /home/liet/askapache.com */
!defined(&#039;ASKAPACHE_ROOT&#039;) &amp;&amp; define(&#039;ASKAPACHE_ROOT&#039;, str_replace(&#039;/public_html&#039;,&#039;&#039;, $_SERVER[&#039;DOCUMENT_ROOT&#039;]));
&nbsp;
/** The 008 at the end is for manual tweaking.  time() returns seconds since &#039;00:00:00 1970-01-01 UTC&#039;. */
// http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html
!defined(&#039;ASKAPACHE_LOCK&#039;) &amp;&amp; define(ASKAPACHE_LOCK&#039;, substr(time(),0,5).&#039;008&#039;); // 12533001
&nbsp;
/** absolute path to the Wordpress directory */
!defined(&#039;ABSPATH&#039;) &amp;&amp; define(&#039;ABSPATH&#039;, ASKAPACHE_ROOT .&#039;/public_html/&#039;);
&nbsp;
/**
 * WP_SITEURL, defined since WordPress Version 2.2, allows the WordPress address (URL) to be defined. The valued defined is the address where your WordPress core files reside.
 * It should include the http:// part too. Do not put a slash "/" at the end.
 * Setting this value in wp-config.php overrides the wp_options table value for siteurl and disables the WordPress address (URL) field in the Administration &gt; Settings &gt; General panel.
 */
!defined(&#039;WP_SITEURL&#039;) &amp;&amp; define(&#039;WP_SITEURL&#039;, &#039;http://&#039;.$_SERVER[&#039;SERVER_NAME&#039;]);
&nbsp;
/**
 * WP_HOME is another wp-config.php option added in WordPress Version 2.2. Similar to WP_SITEURL,
 * WP_HOME overrides the wp_options table value for home but does not change it permanently.
 * home is the address you want people to type in their browser to reach your WordPress blog. It should include the http:// part. Also, do not put a slash "/" at the end.
 */
!defined(&#039;WP_HOME&#039;) &amp;&amp; define(&#039;WP_HOME&#039;, WP_SITEURL);
&nbsp;
/** no trailing slash, full paths only */
!defined(&#039;WP_CONTENT_DIR&#039;) &amp;&amp; define( &#039;WP_CONTENT_DIR&#039;, ABSPATH . &#039;wp-content&#039; );
&nbsp;
// full url - WP_CONTENT_DIR is defined further up
!defined(&#039;WP_CONTENT_URL&#039;) &amp;&amp; define( &#039;WP_CONTENT_URL&#039;, WP_SITEURL . &#039;/wp-content&#039;);
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full path, no trailing slash
!defined(&#039;WP_PLUGIN_DIR&#039;) &amp;&amp; define( &#039;WP_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full url, no trailing slash
!defined(&#039;WP_PLUGIN_URL&#039;) &amp;&amp; define( &#039;WP_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.1.0 */
// Relative to ABSPATH.  For back compat.
//!defined(&#039;PLUGINDIR&#039;) &amp;&amp; define( &#039;PLUGINDIR&#039;, &#039;wp-content/plugins&#039; );
&nbsp;
/** Number of autosaves to save. TRUE is default and enables post revisions, FALSE disables revisions completely. */
!defined(&#039;WP_POST_REVISIONS&#039;) &amp;&amp; define(&#039;WP_POST_REVISIONS&#039;, 150);
&nbsp;
/* ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT); */
!defined(&#039;WP_MEMORY_LIMIT&#039;) &amp;&amp; define(&#039;WP_MEMORY_LIMIT&#039;, &#039;64M&#039;);
&nbsp;
/** Only check at this interval for new messages. Default is 5min */
/** @since 2.9  */
!defined(&#039;WP_MAIL_INTERVAL&#039;) &amp;&amp; define(&#039;WP_MAIL_INTERVAL&#039;, 3600); // 1 hour
&nbsp;
/** Saves updated post values to post from edit window every x seconds. (default 60)
 * When editing a post, WordPress uses Ajax to auto-save revisions to the post as you edit. You may want to increase this setting for longer delays in between auto-saves, or decrease the setting to make sure you never lose changes.
 * @since 2.5.0 */
!defined( &#039;AUTOSAVE_INTERVAL&#039; ) &amp;&amp; define( &#039;AUTOSAVE_INTERVAL&#039;, 60 );
&nbsp;
/** @since 2.9.0  */
/** Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. */
!defined( &#039;EMPTY_TRASH_DAYS&#039; ) &amp;&amp; define( &#039;EMPTY_TRASH_DAYS&#039;, 300 );
</pre>
<hr class="C" />
<h2>Debugging WordPress</h2>
<p>One of my secrets for getting really good at this stuff is to master debugging.  There is really not ever a time when I am working on a site that I don&#8217;t have <a href="http://www.askapache.com/security/elite-log-file-scrolling-with-color-syntax.html">color-highlighted logs scrolling automatically in an ssh window</a>.  It&#8217;s really almost impossible to fix problems with wordpress or do any kind of advanced anything without being able to view debugging info.  At first I relied heavily on a <a href="http://www.askapache.com/php/custom-phpini-tips-and-tricks.html">custom php.ini</a> being available on the server, but after having to deal with many hosts who don&#8217;t allow <code>php.ini</code> files I now rely completely on setting values using <a href="http://php.net/manual/en/function.ini-set.php">ini_set</a> for ultimate portability. Detailed towards the end of this article and is also included in this <code>wp-config.php</code></p>
<pre>
/**#@+
 * DEBUGGING STUFF
 */
/** display of notices during development. if false, error_reporting is E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR otherwise E_ALL */
!defined(&#039;WP_DEBUG&#039;) &amp;&amp; define(&#039;WP_DEBUG&#039;, false);
&nbsp;
/** The SAVEQUERIES definition saves the database queries to a array and that array can be displayed to help analyze those queries.
 *  The information saves each query, what function called it, and how long that query took to execute.  */
!defined(&#039;SAVE_QUERIES&#039;) &amp;&amp; define(&#039;SAVE_QUERIES&#039;, WP_DEBUG);
&nbsp;
!defined(&#039;ACTION_DEBUG&#039;) &amp;&amp; define(&#039;ACTION_DEBUG&#039;, WP_DEBUG);
&nbsp;
/** This will allow you to edit the scriptname.dev.js files in the wp-includes/js and wp-admin/js directories.  */
!defined(&#039;SCRIPT_DEBUG&#039;) &amp;&amp; define(&#039;SCRIPT_DEBUG&#039;, WP_DEBUG);

&nbsp;
/** Add define(&#039;WP_DEBUG_LOG&#039;, true); to enable php debug logging to WP_CONTENT_DIR/debug.log */
//!defined(&#039;WP_DEBUG_LOG&#039;) &amp;&amp; define(&#039;WP_DEBUG_LOG&#039;, true);
&nbsp;
/** This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user.
 *  Add define(&#039;WP_DEBUG_DISPLAY&#039;, false); to wp-config.php to use the globally configured setting for display_errors and not force it to On */
!defined(&#039;WP_DEBUG_DISPLAY&#039;) &amp;&amp; define(&#039;WP_DEBUG_DISPLAY&#039;, false);
</pre>
<hr class="C" />
<h2>Ultimate Security Tweaks</h2>
<p>Well, ultimate for WP&#8217;s built-in keys and password functions, this is all for wp-config.php keep in mind.  This is a very neccessary and recommended step, and is one of the only things I modify for each new installation.</p>
<h3>Security KEYS</h3>
<p>If like me you are familiar with password-cracking software like John the ripper, rainbow hash tables, l0pht-crack, etc.. then you will like to know that you can specify your own keys and salts for the encryption used by WP.  They are <code>AUTH_KEY</code>, <code>AUTH_SALT</code>, <code>SECURE_AUTH_KEY</code>, <code>SECURE_AUTH_SALT</code>, <code>LOGGED_IN_KEY</code>, <code>LOGGED_IN_SALT</code>, <code>NONCE_KEY</code>, <code>NONCE_SALT</code>,  <code>SECRET_KEY</code> and <code>SECRET_SALT</code>.</p>
<p>A random and long key gives you better encryption, and exponentially increasing that is using a random and long salt for the encryption.  Encryptions with known salts are incredibly easy to decrypt compared to encryptions with secure salts, because the salt + key individually need to be guessed in order to find a matching hash, vs. just the key if the salt is known.  See: <a href="http://www.askapache.com/security/locating-weak-passwords.html">Locating weak passwords</a>.</p>
<blockquote>
<p>A secret key is a hashing salt which makes your site harder to hack and access harder to crack by adding random elements to the password.</p>
<p>In simple terms, a secret key is a password with elements that make it harder to generate enough options to break through your security barriers. A password like &#8220;password&#8221; or &#8220;test&#8221; is simple and easily broken. A random, unpredictable password such as &#8220;88a7da62429ba6ad3cb3c76a09641fc&#8221; takes years to come up with the right combination.</p>
</blockquote>
<p>For more information on the technical background and breakdown of secret keys and secure passwords, see: </p>
<ul>
<li><a href="http://wordpress.org/support/topic/170987">WordPress Support Forum &#8211; HOWTO: Set up secret keys in WordPress 2.6+</a></li>
<li><a href="http://en.wikipedia.org/wiki/Password_cracking">Wikipedia&#8217;s explanation of Password Cracking</a></li>
</ul>
<p>I like to use the <a href="https://api.wordpress.org/secret-key/1.1/">WordPress.org secret-key service</a> 4 times.  That&#8217;s because for each key and salt I like to do: (1 key from api +random keyboard input+1 key from api).</p>
<pre>
/**#@+
 * Authentication Unique Keys.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 *
 * Get salt to add to hashes to help prevent attacks.
 *
 * The secret key is located in two places: the database in case the secret key
 * isn&#039;t defined in the second place, which is in the wp-config.php file. If you
 * are going to set the secret key, then you must do so in the wp-config.php
 * file.
 *
 * The secret key in the database is randomly generated and will be appended to
 * the secret key that is in wp-config.php file in some instances. It is
 * important to have the secret key defined or changed in wp-config.php.
 *
 * If you have installed WordPress 2.5 or later, then you will have the
 * SECRET_KEY defined in the wp-config.php already. You will want to change the
 * value in it because hackers will know what it is. If you have upgraded to
 * WordPress 2.5 or later version from a version before WordPress 2.5, then you
 * should add the constant to your wp-config.php file.
 *
 * Below is an example of how the SECRET_KEY constant is defined with a value.
 * You must not copy the below example and paste into your wp-config.php. If you
 * need an example, then you can have a
 * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you.
 *
 * Salting passwords helps against tools which has stored hashed values of
 * common dictionary strings. The added values makes it harder to crack if given
 * salt string is not weak.
 *
 * @since 2.5
 * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php
 *
 * @return string Salt value from either &#039;SECRET_KEY&#039; or &#039;secret&#039; option
 */
define(&#039;AUTH_KEY&#039;,        &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?p[B+GR{@&gt;{Yq`c|LnG;dvq#| %OA_cbBSU6,rICC1o/c)-|&#039;);
define(&#039;SECURE_AUTH_KEY&#039;, &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bb15baar8&amp;R-r&lt;[T|?(xhJJABGq+Ux+U$)-Hltp/&#039;);
define(&#039;LOGGED_IN_KEY&#039;,   &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B&lt;5n6DG|YWnJ9tY2!M1L)`{-$LW~~Ia%.uCbn!P. 41o2$Z$4&#039;);
define(&#039;NONCE_KEY&#039;,       &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bgu&lt;wM*zewR0.{+m:bmrB?wj!B,4]Wo+4 Avk ApR-D?E&#039;);
define(&#039;SECRET_KEY&#039;,     &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B52ugH6muE9r4._iZwoYKUybrqLPpv|d Xr+|yrqhUE&#039;);
&nbsp;
define(&#039;AUTH_SALT&#039;,        &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm~Ky%+%~PPa5b YEmDI%U[W!-B&#039;);
define(&#039;SECURE_AUTH_SALT&#039;, &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmad/7o6.AU3%9o-|Kqm]+eUqr-n~:ag&#039;);
define(&#039;LOGGED_IN_SALT&#039;,   &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmsLiCv@KJ{#wd(?qe(KcH3!&#039;);
define(&#039;NONCE_SALT&#039;,       &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmG9&gt;+wm 2)bS0Pd_+1rx0brX]ND8|&#039;);
define(&#039;SECRET_SALT&#039;,      &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm2&lt;&gt;))U|sty)+4vpWooKls/^[vN&#039;);
/**#@-*/
</pre>
<hr class="C" />
<h2>Using SSL for Admin and Login</h2>
<p>SSL is kinda required from my point of view, it is just way to easy to sniff data off the wire otherwise.  At least with SSL you force them to use tools like burpsuite, paros proxy, webscarab, etc..</p>
<pre>
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_ADMIN&#039;) &amp;&amp; define(&#039;FORCE_SSL_ADMIN&#039;, true);
&nbsp;
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_LOGIN&#039;) &amp;&amp; define(&#039;FORCE_SSL_LOGIN&#039;, true);
</pre>
<h3>Mod_Rewrite to Force SSL</h3>
<p>This is pretty cool, it forces non-https for all urls except for /wp-admin and wp-login.php, which both require https.  It also checks for the logged_in_cookie, and if that is present in the request then it doesn't force non-https.  Kinda confusing if you don't have a <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite cheatsheet</a>.</p>
<pre>
RewriteCond %{THE_REQUEST} ^$ [OR]
RewriteCond %{REQUEST_URI} ^/(wp-admin|wp-login\.php).*$ [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*wp_li_sadfsdfasdf11b361cdsdfasdfasd=.*$ [NC]
RewriteRule .* - [S=1]
&nbsp;
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*|wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</pre>
<hr class="C" />
<h2>File System Permissions</h2>
<p><a class="IFR" href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html"><img src="http://uploads.askapache.com/2008/11/danger-chmod-screenshot.png" alt="chmod, umask, file permissions test" title="chmod, umask, file permissions test" /></a>You can get a basic and solid intro on file permissions by reading: <a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a>, or you can check out some of my <a href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html">file permission research</a>.<br class="C" /></p>
<pre>
/** The permissions as octal number, usually 0644 for files, 0755 for dirs.
 *  http://codex.wordpress.org/Changing_File_Permissions
 *  if ( !$wp_filesystem-&gt;mkdir($remote_destination, FS_CHMOD_DIR) )
 */
!defined(&#039;FS_CHMOD_DIR&#039;) &amp;&amp; define(&#039;FS_CHMOD_DIR&#039;, (0755 &amp; ~ umask()));
!defined(&#039;FS_CHMOD_FILE&#039;) &amp;&amp; define(&#039;FS_CHMOD_FILE&#039;, (0644 &amp; ~ umask()));
/**#@-*/
&nbsp;
/** Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. */
//stream_set_timeout( $stream, FS_TIMEOUT );
//!defined(&#039;FS_TIMEOUT&#039;) &amp;&amp; define(&#039;FS_TIMEOUT&#039;, 30);
&nbsp;
//$this-&gt;link = @ftp_connect($this-&gt;options[&#039;hostname&#039;], $this-&gt;options[&#039;port&#039;], FS_CONNECT_TIMEOUT);
//!defined(&#039;FS_CONNECT_TIMEOUT&#039;) &amp;&amp; define(&#039;FS_CONNECT_TIMEOUT&#039;, 30);
&nbsp;
// function get_filesystem_method($args = array(), $context = false) {
//  $method = defined(&#039;FS_METHOD&#039;) ? FS_METHOD : false; //Please ensure that this is either &#039;direct&#039;, &#039;ssh&#039;, &#039;ftpext&#039; or &#039;ftpsockets&#039;
//!defined(&#039;FS_METHOD&#039;) &amp;&amp; define(&#039;FS_METHOD&#039;, &#039;direct&#039;);
&nbsp;
/** These methods for the WordPress core, plugin, and theme upgrades try to determine the WordPress path, as reported by PHP, but symlink trickery can sometimes
 * &#039;muck this up&#039; so if you know the paths to the various folders on the server, as seen via your FTP user, you can manually define them in the wp-config.php file.
 * FS_METHOD forces the filesystem method. It should only be "direct", "ssh", "ftpext", or "ftpsockets".
 * FTP_BASE is the full path to the "base" folder of the WordPress installation.
 * FTP_CONTENT_DIR is the full path to the wp-content folder of the WordPress installation.
 * FTP_PLUGIN_DIR is the full path to the plugins folder of the WordPress installation.
 * FTP_PUBKEY is the full path to your SSH public key.
 * FTP_PRIKEY is the full path to your SSH private key.
 * FTP_USER is either user FTP or SSH username. Most likely these are the same, but use the appropriate one for the type of update you wish to do.
 * FTP_PASS is the password for the username entered for FTP_USER. If you are using SSH public key authentication this can be omitted.
 * FTP_HOST is the hostname:port combination for your SSH/FTP server. The standard FTP port is 21 and the standard SSH port is 22.
 */
//define(&#039;FS_METHOD&#039;, &#039;ftpext&#039;);
//define(&#039;FTP_BASE&#039;, &#039;/path/to/wordpress/&#039;);
//define(&#039;FTP_CONTENT_DIR&#039;, &#039;/path/to/wordpress/wp-content/&#039;);
//define(&#039;FTP_PLUGIN_DIR &#039;, &#039;/path/to/wordpress/wp-content/plugins/&#039;);
//define(&#039;FTP_PUBKEY&#039;, &#039;/home/username/.ssh/id_rsa.pub&#039;);
//define(&#039;FTP_PRIKEY&#039;, &#039;/home/username/.ssh/id_rsa&#039;);
//define(&#039;FTP_USER&#039;, &#039;username&#039;);
//define(&#039;FTP_PASS&#039;, &#039;password&#039;);
//define(&#039;FTP_HOST&#039;, &#039;ftp.example.org:21&#039;);
&nbsp;
/**
 * Block requests through the proxy.
 *
 * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
 * prevent plugins from working and core functionality, if you don&#039;t include api.wordpress.org.
 *
 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
 * and this will only allow localhost and your blog to make requests.
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
/** @since 2.9  */
//!defined(&#039;WP_HTTP_BLOCK_EXTERNAL&#039;) &amp;&amp; define( &#039;WP_HTTP_BLOCK_EXTERNAL&#039;, false );
&nbsp;
/*
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
 * $accessible_hosts = preg_split(&#039;|,\s*|&#039;, WP_ACCESSIBLE_HOSTS);
 * return !in_array( $check[&#039;host&#039;], $accessible_hosts ); //Inverse logic, If its in the array, then we can&#039;t access it.
 */
//!defined(&#039;WP_ACCESSIBLE_HOSTS&#039;) &amp;&amp; define( &#039;WP_ACCESSIBLE_HOSTS&#039;, &#039;askapache.com,askapache.org&#039; );
</pre>
<hr class="C" />
<h3>Cookies!</h3>
<p>There&#8217;s always a little comfort in having non-default cookies for security (against auto-bots), and using shorter names also means smaller HTTP Packets.</p>
<p>The <code>$cookie_hash</code> is my hack to get around the fact that <code>COOKIEHASH</code> isn&#8217;t definable in <code>wp-config</code>.</p>
<pre>
/**#@+
 * COOKIES
 * Used to guarantee unique hash cookies @since 1.5 */
$cookie_hash=md5(WP_SITEURL);
&nbsp;
/** Set a cookie now to see if they are supported by the browser.
 * setcookie(TEST_COOKIE, &#039;WP Cookie check&#039;, 0, COOKIEPATH, COOKIE_DOMAIN);
 * @since 2.3.0 */
!defined(&#039;TEST_COOKIE&#039;) &amp;&amp; define(&#039;TEST_COOKIE&#039;, &#039;wp_tc&#039;);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;LOGGED_IN_COOKIE&#039;) &amp;&amp; define(&#039;LOGGED_IN_COOKIE&#039;, &#039;wp_li_&#039; . $cookie_hash);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;SECURE_AUTH_COOKIE&#039;) &amp;&amp; define(&#039;SECURE_AUTH_COOKIE&#039;, &#039;wp_sa_&#039; . $cookie_hash);
&nbsp;
/* @since 2.5.0 */
!defined(&#039;AUTH_COOKIE&#039;) &amp;&amp; define(&#039;AUTH_COOKIE&#039;, &#039;wp_a_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;PASS_COOKIE&#039;) &amp;&amp; define(&#039;PASS_COOKIE&#039;, &#039;wp_p_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;USER_COOKIE&#039;) &amp;&amp; define(&#039;USER_COOKIE&#039;, &#039;wp_u_&#039; . $cookie_hash);
&nbsp;
/* ok unset this var, its not needed as COOKIEHASH will have this value, but is not definable in wp-config.php */
unset($cookie_hash);
&nbsp;
/** @since 1.2.0 */
!defined(&#039;COOKIEPATH&#039;) &amp;&amp; define(&#039;COOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_HOME . &#039;/&#039; ) );
&nbsp;
/** @since 1.5.0 */
!defined(&#039;SITECOOKIEPATH&#039;) &amp;&amp; define(&#039;SITECOOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_SITEURL . &#039;/&#039; ) );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;ADMIN_COOKIE_PATH&#039;) &amp;&amp; define( &#039;ADMIN_COOKIE_PATH&#039;, SITECOOKIEPATH . &#039;wp-admin&#039; );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;PLUGINS_COOKIE_PATH&#039;) &amp;&amp; define( &#039;PLUGINS_COOKIE_PATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_PLUGIN_URL)  );
&nbsp;
/** @since 2.0.0 */
!defined(&#039;COOKIE_DOMAIN&#039;) &amp;&amp; define(&#039;COOKIE_DOMAIN&#039;, $_SERVER[&#039;SERVER_NAME&#039;]);
</pre>
<hr class="C" />
<pre>
/**
  * The WP_CACHE setting, if true, includes the wp-content/advanced-cache.php script, when executing wp-settings.php.
  * For an advanced caching plugin to use, static because you would only want one
  * if ( defined(&#039;WP_CACHE&#039;) )@include WP_CONTENT_DIR . &#039;/advanced-cache.php&#039;;
  */
!defined(&#039;WP_CACHE&#039;) &amp;&amp; define(&#039;WP_CACHE&#039;, true);
&nbsp;
/** WordPress Localized Language, defaults to en_US.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to &#039;de&#039; to enable German
 * language support. */
!defined(&#039;WPLANG&#039;) &amp;&amp; define (&#039;WPLANG&#039;, &#039;en_US&#039;);
&nbsp;
/** Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
 *   and uses that folder if it exists. Or it uses the "languages" folder in WPINC. @since 2.1.0 */
//!defined(&#039;WP_LANG_DIR&#039;) &amp;&amp; define(&#039;WP_LANG_DIR&#039;, ABSPATH . WPINC . &#039;/languages&#039;);
&nbsp;
/** LANGDIR defines what directory the WPLANG .mo file resides. If LANGDIR is not defined WordPress looks first to wp-content/languages and then wp-includes/languages for the .mo defined by WPLANG file.  Old static relative path maintained for limited backwards compatibility - won&#039;t work in some cases*/
//!defined(&#039;LANGDIR&#039;) &amp;&amp; define(&#039;LANGDIR&#039;, &#039;wp-content/languages&#039;);
&nbsp;
/** Stores the location of the WordPress directory of functions, classes, and core content. @since 1.0.0 */
//!defined(&#039;WPINC&#039;) &amp;&amp; define(&#039;WPINC&#039;, &#039;wp-includes&#039;);
</pre>
<hr class="C" />
<h2>WPMU Stuff</h2>
<p>I personally don&#8217;t use.</p>
<pre>
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_DIR&#039;) &amp;&amp; define( &#039;WPMU_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/mu-plugins&#039; ); // full path, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_URL&#039;) &amp;&amp; define( &#039;WPMU_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/mu-plugins&#039; ); // full url, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined( &#039;MUPLUGINDIR&#039; ) &amp;&amp; define( &#039;MUPLUGINDIR&#039;, &#039;wp-content/mu-plugins&#039; ); // Relative to ABSPATH.  For back compat.
</pre>
<hr class="C" />
<h2>WordPress Database</h2>
<p>This is usually the only thing I have to manually edit when creating a new site, unless I just use the same DB and modify the $table_prefix, (farther down). I run everything I possibly can in UTF-8, but if you don&#8217;t already know alot about character sets, wow it is one of the most confusing things so you may want to save learning about that topic for another day.  Otherwise the following are helpful (<em>and show how confusing character sets are!</em>)</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html">Character Sets and Collations MySQL Support</a></li>
<li><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">Converting Database Character Sets</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html">UTF-8 character sets</a> (<a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a>)</li>
</ul>
<p>If you ever setup WP to use the builtin membership features, make sure you learn about the <code>CUSTOM_USER_TABLE</code> and <code>CUSTOM_USER_META_TABLE</code> constants, I&#8217;ve found them very helpful.</p>
<pre>
/**#@+
 * MySQL settings
 */
/** The name of the database for WordPress */
define(&#039;DB_NAME&#039;, &#039;askapachewpblog75&#039;);
&nbsp;
/** The username to access the database */
define(&#039;DB_USER&#039;, &#039;askapache245d&#039;);
&nbsp;
/** The password for the username to access the database */
define(&#039;DB_PASSWORD&#039;, &#039;asdfklj2340&#039;);
&nbsp;
/** The hostname to connect to the database at */
define(&#039;DB_HOST&#039;, &#039;mysql.askapache.com&#039;);
&nbsp;
/** The charset of the database */
define(&#039;DB_CHARSET&#039;, &#039;utf8&#039;);
&nbsp;
/** The collation of the database */
define(&#039;DB_COLLATE&#039;, &#039;utf8_general_ci&#039;);
</pre>
<hr class="C" />
<h2>$table_prefix</h2>
<p>The <code>$table_prefix</code> is the value placed in the front of your database tables. Change the value if you want to use something other than wp_ for your database prefix. Typically this is changed if you are <a href="http://codex.wordpress.org/Installing_Multiple_Blogs">installing multiple WordPress blogs</a> in the same database, and also for enhanced security.</p>
<p>Its a safe and good idea to change this value pre-installation to add more security to your WordPress blog. Exploits attempted against your WordPress blog by malicious crackers often are built with the premise that your blog uses the prefix wp_, by changing the value you mitigate some attack vectors. </p>
<pre>
/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = &#039;ar15_&#039;;
&nbsp;
/** CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are used to designated that the user and usermeta tables normally utilized by WordPress are not used, instead these values/tables are used to store your user information. */
//!defined(&#039;CUSTOM_USER_TABLE&#039;) &amp;&amp; define(&#039;CUSTOM_USER_TABLE&#039;, $table_prefix . &#039;my_users&#039;);
//!defined(&#039;CUSTOM_USER_META_TABLE&#039;) &amp;&amp; define(&#039;CUSTOM_USER_META_TABLE&#039;, $table_prefix . &#039;my_usermeta&#039;);
</pre>
<h2>Setup PHP Ini Settings</h2>
<pre>
&nbsp;
/** Turns the output of errors on or off, you really never want this on, you should only view errors by reading the log file. */
ini_set(&#039;display_errors&#039;, WP_DEBUG_DISPLAY);
&nbsp;
/** Tells whether script error messages should be logged to the server&#039;s error log or error_log. */
ini_set(&#039;log_errors&#039;, &#039;On&#039;);
&nbsp;
/** http://us.php.net/manual/en/timezones.php */
ini_set(&#039;date.timezone&#039;, &#039;America/Indianapolis&#039;);
&nbsp;
/** Where to log php errors */
ini_set(&#039;error_log&#039;, ASKAPACHE_ROOT . &#039;/logs/php_error.log&#039;);
&nbsp;
/** Set the memory limit, otherwise defaults to &#039;32M&#039; */
ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT);
</pre>
<h2>Sessions are slow</h2>
<p>So I only use sessions when I have a specific use&#8230; In this case I need sessions only when one of the tools in the /online-tools/ directory is being used.  And that is for the <a href="http://www.askapache.com/security/php-captcha-anti-spam-example.html">captcha image</a>.  In the future I won&#8217;t ever use sessions.</p>
<pre>
if(preg_match( &#039;#^/online-tools/#&#039;,$_SERVER[&#039;REQUEST_URI&#039;])) session_start();
</pre>
<h2>Include Custom Files</h2>
<p>Sure you could use the my-hacks.php that WP allows, or you can just stick your functions in your <code>TEMPLATEPATH/functions.php</code> file, but they are executed only after the wp-settings.php file, which may be too late for your file.</p>
<p>In the past I&#8217;ve also used the <a href="http://us2.php.net/manual/en/ini.core.php#ini.auto-prepend-file">auto_prepend_file</a> settings to run my script before anything (index.php) but I ran into some issues on different hosts, and it wasn&#8217;t as portable.</p>
<p>This is useful because you can have a file with globally available functions that you can use in non-WP areas as well as WP areas.  I am moving away from this more and more as I learn more about classes and build plugins instead for portability.</p>
<pre>
include_once ASKAPACHE_ROOT . &#039;/includes/myfunctions.inc&#039;;
&nbsp;
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . &#039;wp-settings.php&#039;);
?&amp;gt;
</pre>
<h2>Some Useful PHP</h2>
<p>I am constantly trying to make my sites and code more portable, so I am using plugins alot more to accomplish things that I use to do with separate php.  Here are some examples of minimal php.</p>
<pre>
add_filter("the_generator", create_function(&#039;$a&#039;,&#039;return "";&#039;));
add_filter(&#039;the_content&#039;, create_function(&#039;$a&#039;, &#039;return ((is_feed())? $a."&lt;p&gt;&lt;a href=\"".get_permalink()."\"&gt;".get_the_title()."&lt;/a&gt; originally appeared on ".get_bloginfo("name").".&lt;/p&gt;" : $a);&#039;), 99999);
add_filter(&#039;excerpt_length&#039;, create_function(&#039;$a&#039;, &#039;return 300;&#039;),99);
add_filter(&#039;excerpt_more&#039;, create_function(&#039;$a&#039;, &#039;return "&amp;hellip;";&#039;),99);
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"pingback\" href=\"&#039;.get_bloginfo(&#039;pingback_url&#039;).&#039;\" /&gt;\n";&#039;), 95 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rss\" href=\"http://purl.org/rss/1.0/\" /&gt;\n";&#039;), 96 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rel\" href=\"http://purl.org/vocab/relationship/\" /&gt;\n";&#039;), 97 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"meta\" type=\"application/rdf+xml\" href=\"/foaf.rdf\" /&gt;\n";&#039;), 98 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link href=\"/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\" /&gt;\n";&#039;), 99 );
</pre>
<h2>Debugging Note</h2>
<p><a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/screenshots/"><img alt="AskApache Advanced Debugging Output" src="http://s.wordpress.org/extend/plugins/askapache-debug-viewer/screenshot-1.png?r=160129" title="AskApache Advanced Debugging Output" width="625" height="548" /></a>If you read this far than you probably know how important debugging is, but I sometimes like to stick the best tips deep in my articles to make sure only YOU find it.  GRTFM isn&#8217;t used on this site, it&#8217;s mostly a requirement because my writing can get pretty bad..  The point, debugging is more than a crucial requirement if you want to do anything cool.  Don&#8217;t worry I got you.. check my <a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/">AskApache Debug Viewer Plugin from the official WP site</a>.  It&#8217;s pretty close to providing as verbose amount of information that I could possibly figure out how to get out of php, probably more than you have ever seen at least, I focused on quantity.  I use it all the time on new installs as there is no setup required and it tells me advanced information about the setup of the server, hacker code for sure.<br class="C" /></p>
<p>Here&#8217;s a quick function to see set global vars, I just think this is interesting code.</p>
<pre>
function askapache_global_debug(){
  global $_GET,$_POST,$_COOKIE,$_SESSION,$_ENV,$_FILES,$_SERVER,$_REQUEST,$HTTP_POST_FILES,$HTTP_POST_VARS,$HTTP_SERVER_VARS,$HTTP_RAW_POST_DATA,$HTTP_GET_VARS,$HTTP_COOKIE_VARS,$HTTP_ENV_VARS;
  $gv=create_function(&#039;$n&#039;,&#039;global $$n; ob_start(); if ( is_array($$n) &amp;&amp; sizeof($$n)&gt;0 &amp;&amp; print("[{$n}]\n") ) print_r($$n);return ob_get_clean();&#039;);
  foreach (array(&#039;_GET&#039;,&#039;_POST&#039;,&#039;_COOKIE&#039;,&#039;_SESSION&#039;,&#039;_ENV&#039;,&#039;_FILES&#039;,&#039;_SERVER&#039;,&#039;_REQUEST&#039;,&#039;HTTP_POST_FILES&#039;,&#039;HTTP_POST_VARS&#039;,&#039;HTTP_SERVER_VARS&#039;,&#039;HTTP_RAW_POST_DATA&#039;,&#039;HTTP_GET_VARS&#039;,&#039;HTTP_COOKIE_VARS&#039;,&#039;HTTP_ENV_VARS&#039;) as $k)echo $gv($k);
  print_r(get_defined_constants());
}
</pre>
<p class="anote">Also check the WordPress Codex page: <a href="http://codex.wordpress.org/Editing_wp-config.php">Editing wp-config.php</a> and Perishable Press&#8217;s: <a href="http://perishablepress.com/press/2009/12/01/stupid-wordpress-tricks/">Stupid WordPress Tricks</a></p>
<p><a href="http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html">Advanced WordPress wp-config.php Tweaks</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/V0qZBi8DFWYIrp84W9LhXs5TIps/0/da"><img src="http://feedads.g.doubleclick.net/~a/V0qZBi8DFWYIrp84W9LhXs5TIps/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/V0qZBi8DFWYIrp84W9LhXs5TIps/1/da"><img src="http://feedads.g.doubleclick.net/~a/V0qZBi8DFWYIrp84W9LhXs5TIps/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=I3-QaJt-u1Q:cTfaWD2XFFE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=I3-QaJt-u1Q:cTfaWD2XFFE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html</feedburner:origLink></item>
		<item>
		<title>Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</title>
		<link>http://feedproxy.google.com/~r/apache/htaccess/~3/0rMfz7Va7gg/anti-hotlinking-mod_rewrite.html</link>
		<comments>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:09:11 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Modules]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3287</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html "><img src="http://uploads.askapache.com/2009/09/866310_predestrian_lights-71x116.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="71" height="116" /></a>If you have files on your site that you don't want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="http://uploads.askapache.com/2009/09/866310_predestrian_lights.jpg"><img src="http://uploads.askapache.com/2009/09/866310_predestrian_lights.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="184" height="300" class="size-full wp-image-3288" /></a><br style="padding-top:2em;" /><br />If you have files on your site that you don&#8217;t want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.</p>
<h2>The Worst Kind of People</h2>
<p><strong>Spammers, and Leechers</strong>.  They operate like this:  Let&#8217;s say you have some mp3 files on a server, and SOMEWHERE on the web there is a link to that mp3 file&#8217;s location.  This includes in javascript files, css files, robots.txt files, the spammers and leechers robots check all those files looking for the type of link they are looking for.   Then they try to request that file usually utilizing a number of different types of requests to get access to the file.  Then they use it for personal gain, at your peril.</p>
<p>Some robots perform valuable services for the world wide web community, and other leeching programming is pretty cool, so not all these activities are perpetrated by nefarious spammers.</p>
<p><br class="C" /></p>
<h2>Blocking by IP COOKIE</h2>
<p>Ok so if a link exists to your file, it is going to be requested by a robot eventually, so the way to defeat them is by doing something on your site that modifies the way a user would request it.  Robots for the most part are not javascript-capable, so the most-common advanced method is to set a cookie using javascript, and then we can check for that cookie in the request for the file using mod_rewrite.</p>
<p>So if your site sets a cookie named fspammers, and furthermore gives that cookie a value of 445, then this is what the request sent by an HTTP Client like Firefox looks like.</p>
<pre>
GET /hotlink/lovefreedom.mp3 HTTP/1.1
Host: static.askapache.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.askapache.com/wordpress/seo-in-wordpress.html
Cookie: fspammers=455
</pre>
<h2>Mod_Rewrite HTTP Headers</h2>
<p>The mod_rewrite module has access to ALL the HTTP Headers sent in a request, so for each of the HTTP Headers in the request example above, we can use mod_rewrite to validate.</p>
<h2>Mod_Rewrite .htaccess Example</h2>
<p>Finally, now that everyone is on the same page about what is really going on, here is the <a href="http://www.askapache.com/htaccess/htaccess.html" title=".htaccess tutorial">.htaccess</a> code that blocks any requests for anything in the /hotlink/ folder.</p>
<p>Here are the triggers this code blocks access based on.</p>
<ol>
<li><strong>Cookie</strong>: Checks if fspammers cookie is present, and that it has the value of 445. </li>
<li><strong>HTTP Protocol</strong>: Checks if HTTP 1.1 is being used (many robots use 1.0)</li>
<li><strong>Host</strong>: Checks that the HOST Requested was static.askapache.com</li>
<li><strong>Referer</strong>:  Checks for Referring site is static.askapache.com or www.askapache.com</li>
</ol>
<pre>
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{HTTP_COOKIE} !^.*fspammers=445.*$ [NC,OR]
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ /(.*)\ HTTP/1\.1 [NC,OR]
RewriteCond %{HTTP_HOST} !^z\.askapache\.com$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://(www|z)\.askapache\.com.*$ [NC]
RewriteRule ^hotlink/.*$ - [F]&lt;/p&gt;
</pre>
<p><a href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html">Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</a> originally appeared on .</p>
<p><a href="http://feedads.g.doubleclick.net/~a/CTVmxozc7eom4MwGDb1-ViUSt7w/0/da"><img src="http://feedads.g.doubleclick.net/~a/CTVmxozc7eom4MwGDb1-ViUSt7w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/CTVmxozc7eom4MwGDb1-ViUSt7w/1/da"><img src="http://feedads.g.doubleclick.net/~a/CTVmxozc7eom4MwGDb1-ViUSt7w/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=0rMfz7Va7gg:UQdXu7QPLTQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=0rMfz7Va7gg:UQdXu7QPLTQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html</feedburner:origLink></item>
	</channel>
</rss>
