<?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>Biodegradable Geek</title>
	
	<link>http://biodegradablegeek.com</link>
	<description />
	<lastBuildDate>Sun, 21 Feb 2010 13:12:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BiodegradableGeek" /><feedburner:info uri="biodegradablegeek" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Quake Live Tips</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/7CZtVe6Evak/</link>
		<comments>http://biodegradablegeek.com/2010/02/quake-live-tips/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 13:12:26 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[quake]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/2010/02/quake-live-tips/</guid>
		<description><![CDATA[Quake Live is a free, manly game to play. QL is a version of Quake 3 that runs as a browser plugin for Firefox, Safari, and IE. It features a skill-matched game finder, a friend&#8217;s system, and other modern features. Think a Lite, browser-based version of Steam. Quake 3 came out in 1999, and people [...]]]></description>
			<content:encoded><![CDATA[<p>Quake Live is a free, <b>manly</b> game to play. QL is a version of Quake 3 that runs as a browser plugin for Firefox, Safari, and IE. It features a skill-matched game finder, a friend&#8217;s system, and other modern features. Think a Lite, browser-based version of Steam. Quake 3 came out in 1999, and people have been playing it on a regular basis since. That&#8217;s about 11 years ahead of you if you&#8217;re new (doesn&#8217;t mean you can&#8217;t become excellent fast.)</p>
<p>The following Quake Live tips apply to <i>those</i> games: Quake 3, Quake World, Death Match Classic, Warsow, etc.</p>
<p><b><br /></b></p>
<p><strong>Quake Live Tips &#8211; The Basics</strong></p>
<p><b>The point of the game is to control the map</b>, not to get the most frags. Kills happen because other players are trying to take over your territory.</p>
<p><b>Don&#8217;t chase your opponent.</b> Chasing is predictable, and will almost always get you killed if you don&#8217;t know what you&#8217;re doing.</p>
<p><b>Pay attention to your opponent.</b> What items are they picking up? Their usual routes (surprisingly predictable,) etc.</p>
<p><b>Pay attention to what your opponent does when their health is low.</b> They will either become very aggressive and erratic, or change their route and generally keep their distance from you.</p>
<p><b>Learn to strafe jump.</b> It&#8217;s not as easy as in Counter-Strike &lt;1.1, but it&#8217;s a skill that you can carry into other shooters (listed above), and is a core part of the game. Quake Live makes this easy with a movement practice mode and <a href="http://www.quakelive.com/#practice/training" target="_blank">video tutorials</a>.</p>
<p><b>Use a low sensitivity</b>. Mine is 1.5. It&#8217;s more accurate, and you quickly learn how much force to give the mouse to flick the crosshair if you need to. You don&#8217;t need to do 180s and 360s. Once you become good, you will know where opponents are likely to come from, and have the crosshair always in that general direction.</p>
<p><b>Use ASDW to move, and bind every weapon nearby.</b> I use R for rocket, Q for rail, E for lightening, F for shotgun, etc.</p>
<p><b>Learn the maps</b>. Duels are a great way to learn maps. You can also learn a map by deciding on a specific item route to follow, and then following it until you&#8217;ve memorized it. Then memorizing another route, and so on. For example, rocket to RA to rail to MG to shotgun to rocket to RA &#8230;.</p>
<p><b>Use the right gun for the job.</b> QL/Q3 has the most balanced arsenal in a shooter. Every gun including the machine gun and gauntlet are useable and very powerful. In some situations a machine gun is better than a rocket, such as when the opponent is very far away.</p>
<p><b>Quake Live Tips &#8211; Beyond Basics</b></p>
<p><b>Learn the amount of seconds each item takes to spawn.</b> Then learn to countdown internally exactly when that item will respawn. This isn&#8217;t as hard as it sounds. Begin by only focusing on big items such as Red Armor (RA), Mega Health (MG), etc. You have to control the map (items), and also be able to spot what your opponent has, and both require that you know when items were taken, and/or when they will respawn. You can make the timer count up or down via</p>
<p><b>Control important items.</b> Focus on controlling <i>at least</i> RA, MG, rocket and rail.</p>
<p><b>Try to predict what your opponent has equipped.</b> There&#8217;s a good chance your opponent will have equipped whatever items were in the immediate vicinity. If they&#8217;re walking out from near the lightening gun (LG), they probably have the LG out. This is especially true in pubs and when you know your opponent just spawned or did not pick up a better gun. If there&#8217;s a common route, like from rocket to RA, and you know the RA had spawned recently, your opponent likely has RA with rockets a&#8217;blazin&#8217;</p>
<p><b>Fire at spawn points.</b> QL has a very low invincibility time when you respawn, and you can die again right away. Memorize the spawn points in each map, and shoot at them when you expect a respawn. If you frag someone, and you know there&#8217;s a spawn point behind you, turn around and begin shooting. If they respawn at that point, they&#8217;ll be welcomed back with a rocket or balls of plasma.</p>
<p><b>Watch demos</b> (replays.) Get the Firefox <a href="http://www.esreality.com/?a=post&amp;id=1733932" target="_blank">demo player</a> and hop over to <a href="http://esreality.com" target="_blank">ESReality</a>.</p>
<p>You have to actually <b>play the game</b>. Playing is how you get good. I put this tip at the end because people who don&#8217;t read up to this point, who will close this page and go play, don&#8217;t need the tip. People who read through this entire page are more likely to also be the type of person looking for a shortcut to becoming pro at QL &#8211; there are no shortcuts. You have to play the game, and enjoy every loss. Experience comes from playing.</p>
<p><b>Quake Live Links</b></p>
<p><a href="http://quakelive.com" target="_blank">Quake Live &#8211; Official Site</a></p>
<p><a href="http://www.holysh1t.net/quake-live-commands-list/" target="_blank"></a><a href="http://www.holysh1t.net/quake-live-commands-list/" target="_blank">List of command variables</a></p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/7CZtVe6Evak" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2010/02/quake-live-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2010/02/quake-live-tips/</feedburner:origLink></item>
		<item>
		<title>Learning to Program on Your Own</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/wsQXeGQQM_A/</link>
		<comments>http://biodegradablegeek.com/2009/12/learning-to-program-on-your-own/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 23:18:15 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[getting shit done]]></category>
		<category><![CDATA[motivation]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[win32 api]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/2009/12/learning-to-program-on-your-own/</guid>
		<description><![CDATA[Learning how to code is like learning anything else &#8211; You have to do it. The hardest part is figuring out where to begin, and then you need some mechanism to show you that you&#8217;re making progress. The latter is important because it motivates you to keep going.
First, have a goal. I initially wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Learning how to code is like learning anything else &#8211; <b>You have to do it.</b> The hardest part is figuring out <i>where</i> to begin, and then you need some mechanism to show you that you&#8217;re making progress. The latter is important because it motivates you to keep going.</p>
<p>First, have a goal. I initially wanted to make AOL &#8220;punters&#8221; (apps that kicked other users offline) and malware. I found them interesting. Do you want to program games? websites? Facebook Apps? Apps for OS X?</p>
<p>Once you have the goal, do research on how those apps are made, particularly on the language used, APIs/libraries used, and so on.</p>
<p>When starting, you will be learning a lot of concepts that you will see no use for. If-then statements, variables, etc. You might understand the basic idea of what a variable is, but might wonder &#8211; why would I ever use this instead of putting the value in directly? At this stage, it&#8217;s important that you remain persistant and just go through the examples/exercises in your book (or those provided by your tutor). I noticed that most people will struggle through the first set of concepts, and then lose interest and quit after seeing that they aren&#8217;t doing anything interesting. One day, you&#8217;ll be doing something and everything will fall into place. An A-Ha moment.</p>
<p>You&#8217;re learning a bunch of stuff that doesn&#8217;t really connect with each other. How does printing &#8220;Hello World&#8221; to the screen eventually become a 3D game? How do I go from a console app to a window app? How does knowing what a variable or constant is translate to a web development project?</p>
<p>It&#8217;s a plateau &#8212; and I want to stress that this applies to almost anything, not just programming. You begin by learning a lot of stuff, very slowly making progress, and over time you begin to see that you kinda &#8220;know&#8221; what&#8217;s happening behind the scenes of the apps you&#8217;re using. After that, learning because easier and quicker. Getting to that level requires persistance.</p>
<p><b>My Turning Point &#8211; Stop Asking &#8220;What Should I Code?&#8221;</b></p>
<p>When I first began coding, I had the mentality that I had to &#8220;learn how to program&#8221; before &#8220;making app X&#8221; &#8211; This is logical but the way I structured in my head was important in impeding my progress. I divided learning how to program and making app X into two separate goals. It was a problem because it migrated me away from the goal of &#8220;making app X.&#8221; I began asking the wrong question &#8211; <b>what should I code to learn how to program?</b></p>
<p>Instead, I should have been asking &#8211; what should I learn next, to reach my goal of making app X? I broke down app X into individual tasks, and then began learning how to do each one. For example, let&#8217;s say my goal is to program a game.</p>
<p>If I ask &#8220;<i>what</i> should I code to learn how to program?&#8221; I will spend a lot of time learning things I might not need anytime soon (or ever), I will get nowhere near reaching my goal, and will become unmotivated and quit before getting there. Instead, I would break down the game into individual tasks (this requires research) and work on learning each one.</p>
<p>Let&#8217;s see, I need to figure out how to make a window/draw things on screen. That becomes my new short term goal. I dig deeper and learn that I need to learn the Windows API. I learn that the Windows API is how one draws to the screen. But the Windows API is another thing I need to learn, so that becomes the immediate short term goal. Digging deeper, I realize that the Windows API is just a bunch of functions with some conventions that I need to memorize.</p>
<p>Now my goal is somewhat clearer. I begin reading about the Windows API, making different small apps to make sure I understand what I&#8217;m reading. Eventually I am able to draw a window and controls. Great. I still don&#8217;t have a game. What&#8217;s next? I need to draw graphics. I dig into how it&#8217;s done and learn that the Windows API provides a set of functions graphics. I&#8217;m familiar with the Win API and so I just begin learning the graphics lib. I make a few dozen apps drawing basic circles, loading bitmap images, etc. Now my goal of making a game is starting to take shape in my head. I can mentally structure how the game will be, minus a few concepts I might not have learned yet.</p>
<p>Persistence.</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/wsQXeGQQM_A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/12/learning-to-program-on-your-own/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/12/learning-to-program-on-your-own/</feedburner:origLink></item>
		<item>
		<title>What Firefox’s Memory Leak Feature Taught Me About Life</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/0xAaCQH4tFE/</link>
		<comments>http://biodegradablegeek.com/2009/11/what-firefoxs-memory-leak-feature-taught-me-about-life/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 07:39:57 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Workarounds]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[adhd]]></category>
		<category><![CDATA[annoying]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[motivation]]></category>
		<category><![CDATA[motivational]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[thinking]]></category>
		<category><![CDATA[time management]]></category>
		<category><![CDATA[useability]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/2009/11/what-firefoxs-memory-leak-feature-taught-me-about-life/</guid>
		<description><![CDATA[(draft)
I&#8217;ve been using Firefox since the first public beta, and the one thing always on my wish list was fixing the sluggishness and unbelievable memory consumption (2 GB of RAM?) that results from keeping Firefox open for too long. This is still on my wish list today (almost 2010), and I know it&#8217;s unlikely to [...]]]></description>
			<content:encoded><![CDATA[<p><i>(draft)</i></p>
<p>I&#8217;ve been using Firefox since the first public beta, and the one thing always on my wish list was fixing the sluggishness and unbelievable memory consumption (2 GB of RAM?) that results from keeping Firefox open for too long. This is still on my wish list today (almost 2010), and I know it&#8217;s unlikely to be fixed. In fact, I&#8217;ve realized that &#8211; Zen Moment &#8211; the &#8216;patch&#8217; must come from within.</p>
<p>The Mozilla team claim it is a feature and not a bug. Firefox stores pages you&#8217;ve been to so that you can go back to them instantly upon hitting the &#8220;Back&#8221; button. This means that FF&#8217;s memory needs grow as you browse the net, and leaving a page doesn&#8217;t necessarily mean the page&#8217;s memory has been deallocated. It makes sense, but in practice it results in Firefox becoming unresponsive. You can go into about:config and edit hundreds of settings, but I&#8217;ve never had any success with any of them in any version of Firefox on any OS. Ever.</p>
<p>I probably don&#8217;t use Firefox like the majority of users, and certainly not like the developers intended. For one, I don&#8217;t close it. In fact, I&#8217;ve never voluntarily closed Firefox in my life (I don&#8217;t shut down). I purposely crash it and then re-open it so that it asks me to load up all my previously open tabs. This clears out some memory and restores responsiveness making Firefox useable again.</p>
<p>Why don&#8217;t I just close it? Because I usually have a minimum of 50 tabs open across several FF instances, and some of those tabs are actually those &#8220;Oops, this is embarrassing&#8230;&#8221; windows that let you choose what tabs to re-open when you re-run a crashed Firefox. That means some of the tabs hold the potential to open up dozens or even hundreds of more tabs.</p>
<p><b>I feel</b> <b>relieved</b> <b>when Firefox is unable to restore my tabs. <span style="text-decoration: underline;">Life starts anew.</span></b></p>
<p>I keep tabs open that I intend to go through (never!), and I keep different sets of windows/tabs open depending on what I&#8217;m doing. i.e., cooking tabs in one window, work tabs in another, research tabs in another, etc. But this isn&#8217;t restricted to Firefox. On my Linux desktop I have 2 displays and 8 virtual desktops, making that 16 workspaces, and they&#8217;re usually always full. Since I have the RAM/power to run this setup, it&#8217;s smooth&#8230; except for Firefox and most other browsers (not Chrome).</p>
<p>On this desktop I worked around the Firefox memory problem by creating multiple profiles and using different profiles for different tasks (one for work, one for multimedia, etc). This also allowed me to crash one without affecting the others. It&#8217;s a temporary and crude solution until Firefox natively supports multiple processes like Chrome (see <a href="http://mozillalinks.org/wp/2009/06/first-results-of-electrolysis-multi-process-firefox/" target="_blank">Electrolysis</a>.)</p>
<p>But while there are some workarounds, fixing the technical issue isn&#8217;t going to increase productivity much. Having more sites open will probably make things worse. The habit of putting things off for later is inherently the problem. Having many sites/apps open is normal only amongst abnormal people. There&#8217;s nothing &#8216;wrong&#8217; with it, but I don&#8217;t feel it&#8217;s very efficient, even if it may seem so at the time.</p>
<p>I&#8217;m generally disorganized and severely ADD-ed, and so this issue doesn&#8217;t only exist digitally. My desk is just as messy as Firefox. I have pieces of paper, napkins and anything else I jotted down notes on. I have unopened snail mail, opened but unchecked mail, and mail that has been checked and separated into 2 piles, those that require a reply and those that are to be trashed. There&#8217;s books I&#8217;m reading (multiple), and always unsorted pages of ideas/diagrams/blueprints of things I&#8217;ll probably never get to.</p>
<p>I&#8217;m obviously spreading my attention span thin. Going back to Firefox, if there&#8217;s an important piece of news on a page buried beneath other sites, I subconsciously still have &#8220;must read that article&#8221; somewhere deep in my head. It probably doesn&#8217;t result in any noticeable effect on its own, but when multiplied by 100x, the decline in calmness becomes significant enough to kill productivity. It produces a weak feeling of anxiety or overwhelmingness.</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/0xAaCQH4tFE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/11/what-firefoxs-memory-leak-feature-taught-me-about-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/11/what-firefoxs-memory-leak-feature-taught-me-about-life/</feedburner:origLink></item>
		<item>
		<title>Blackberry Desktop Software Released for Mac OS X</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/SQxPV7JHs0I/</link>
		<comments>http://biodegradablegeek.com/2009/10/blackberry-desktop-software-released-for-mac-os-x/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 18:06:42 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/2009/10/blackberry-desktop-software-released-for-mac-os-x/</guid>
		<description><![CDATA[

Earlier today, RIM released Blackberry Desktop Software for Mac (10.5.5+ required). It lets you sync your iTunes music with your Blackberry, sync your contacts and appointments with &#8220;popular Mac applications,&#8221; add/remove apps, and transfer data between your Mac and BB.
This 26 meg app is nice, but RIM needs to get going on a Mac port [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://na.blackberry.com/eng/services/desktop/desktop_mac.jsp?1"><img src="http://biodegradablegeek.com/wp-content/uploads/2009/10/200910021404.jpg" width="400" height="346" alt="200910021404 Blackberry Desktop Software Released for Mac OS X"  title="Blackberry Desktop Software Released for Mac OS X" /></a></p>
<p>
Earlier today, RIM released <a href="http://na.blackberry.com/eng/services/desktop/desktop_mac.jsp?1">Blackberry Desktop Software</a> for Mac (10.5.5+ required). It lets you sync your iTunes music with your Blackberry, sync your contacts and appointments with &#8220;popular Mac applications,&#8221; add/remove apps, and transfer data between your Mac and BB.<br />
This 26 meg app is nice, but RIM needs to get going on a Mac port of their SDK. Sad considering most of it is just Java, with EXE wrappers. Fortunately there&#8217;s <a href="http://code.google.com/p/openberry/source/checkout">Openberry</a> and other workarounds.</p>
<div style="text-align: center;">
  <a href="http://na.blackberry.com/eng/services/desktop/desktop_mac.jsp?1"><img src="http://biodegradablegeek.com/wp-content/uploads/2009/10/Volumes_BlackBerry-Desktop-Manager-1.jpg" width="121" height="121" alt="_Volumes_BlackBerry Desktop Manager-1.jpg" title="Blackberry Desktop Software Released for Mac OS X" /></a>
</div>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/SQxPV7JHs0I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/10/blackberry-desktop-software-released-for-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/10/blackberry-desktop-software-released-for-mac-os-x/</feedburner:origLink></item>
		<item>
		<title>Small Vim Shortcut for PHP Tags</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/SIb_F6OMgZE/</link>
		<comments>http://biodegradablegeek.com/2009/09/small-vim-shortcut-for-php-tags/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 03:59:44 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[annoying]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/2009/09/small-vim-shortcut-for-php-tags/</guid>
		<description><![CDATA[The short tags in PHP have been deprecated as of 5.3.0. Short tags provided a shorter alternative to the annoying-to-type &#60;?php and &#60;?php echo. Instead, you could use &#60;? and &#60;?= respectively. This was great but it caused problems when working with XML files, and the short_tags option was disabled in the PHP config by [...]]]></description>
			<content:encoded><![CDATA[<p>The short tags in PHP have been deprecated as of 5.3.0. Short tags provided a shorter alternative to the annoying-to-type &lt;?php and &lt;?php echo. Instead, you could use &lt;? and &lt;?= respectively. This was great but it caused problems when working with XML files, and the short_tags option was disabled in the PHP config by default on some implementations.</p>
<p>To make life easier, I created this vim mapping that will expand <b>&lt;?</b> to &lt;?php and <b>&lt;??</b> to &lt;?php echo. You may change the abbreviation as you see fit. Simply place this in your .vimrc</p>
<pre class="brush: plain;">
inoremap &lt;??    &lt;?php echo  ?&gt;&lt;Left&gt;&lt;Left&gt;&lt;Left&gt;
inoremap &lt;?     &lt;?php  ?&gt;&lt;Left&gt;&lt;Left&gt;&lt;Left&gt;
</pre>
<p>Re-open vim or type use :source ~/.vimrc to reload the config. Now just type &lt;? or &lt;?? in insert mode.</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/SIb_F6OMgZE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/09/small-vim-shortcut-for-php-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/09/small-vim-shortcut-for-php-tags/</feedburner:origLink></item>
		<item>
		<title>External Links Being Hidden Behind Emoticons/Smilies</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/1iiA3J0sCvU/</link>
		<comments>http://biodegradablegeek.com/2009/07/external-links-being-hidden-behind-emoticonssmilies/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 23:55:04 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[spyware]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/?p=500</guid>
		<description><![CDATA[Lately, I&#8217;ve noticed a lot of the spam comments on my blogs contain links concealed behind smilies. This helps you place any URL on a forum or a blog, without raising any red flags, as would happen if you blatantly add links to your posts or signature. It&#8217;s not obvious that this paragraph is just [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve noticed a lot of the spam comments on my blogs contain links concealed behind smilies. This helps you place any URL on a forum or a blog, without raising any red flags, as would happen if you blatantly add links to your posts or signature. It&#8217;s not obvious that this paragraph is just here to build a <a href="http://en.wikipedia.org/wiki/Backlink" target="_blank">backlink</a> to another site <a href="http://incomezombie.com/?x=I_Click_Happy_Faces" target="_blank"><img class="plainimg" title="grin" src="/wp-content/uploads/2009/07/grin.gif" alt="grin External Links Being Hidden Behind Emoticons/Smilies" width="15" height="15" /></a></p>
<p>Why the hell would you want your links where humans don&#8217;t notice them? Because machines <i>do</i> notice them, and your purpose is to have as many sites link back to you as possible. This artificially raises the rank of a site in the search engines. Whether this method actually helps or not is questionable. It helps, especially if done on a big level, but the point of this post isn&#8217;t to discuss <a href="http://bluehatseo.com" target="_blank">SEO</a>. It&#8217;s to raise awareness of this what I&#8217;m noticing to be an increasingly common tactic.</p>
<p>This idea isn&#8217;t new. Adding URLs to a 1&#215;1 pixel transparent gif for tracking purposes is old and common, but this is now being used to build backlinks.</p>
<p>You can make this impossible by disabling UBB/HTML in your blog comments. Other methods include adding a border around smilies which are clickable.</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/1iiA3J0sCvU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/07/external-links-being-hidden-behind-emoticonssmilies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/07/external-links-being-hidden-behind-emoticonssmilies/</feedburner:origLink></item>
		<item>
		<title>The Gmail Captcha is Optional</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/HXaERUbAyx4/</link>
		<comments>http://biodegradablegeek.com/2009/06/gmail-captcha-is-optional/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 17:41:30 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Workarounds]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/?p=472</guid>
		<description><![CDATA[When you try to login with bad credentials, Gmail gives you a captcha to fill in before your next login attempt. Not only does this captcha appear randomly (keep putting in the wrong username and it will sometimes appear, sometimes not) (update: now it appears to be more consistent), but it&#8217;s also optional*. Just put [...]]]></description>
			<content:encoded><![CDATA[<p>When you try to login with bad credentials, Gmail gives you a captcha to fill in before your next login attempt. <span style="text-decoration: line-through;">Not only does this captcha appear randomly (keep putting in the wrong username and it will sometimes appear, sometimes not)</span> (<strong>update:</strong> now it appears to be more consistent), but it&#8217;s also <strong>optional</strong>*. Just put in your correct username and password, ignoring the captcha, and it will log you in.</p>
<p>I probably discovered this out of frustration, but for the past few months (or years) I thought it was something we all knew until I saw one of my friend&#8217;s enter the captcha value. I never actually stopped to think about why a captcha would be &#8220;optional&#8221; &#8211; it&#8217;s ridiculous, and I&#8217;m probably overlooking an obvious point to this.</p>
<div id="attachment_474" class="wp-caption alignright" style="width: 280px"><img class="size-full wp-image-474" title="gmail_username_correct" src="http://biodegradablegeek.com/wp-content/uploads/2009/06/gmail_username_correct.jpg" alt="Enter the correct name/pass and hit login" width="270" height="344" /><p class="wp-caption-text">Enter the correct name/pass and hit login</p></div>
<div id="attachment_475" class="wp-caption alignright" style="width: 280px"><img class="size-full wp-image-475" title="gmail_wrong_username" src="http://biodegradablegeek.com/wp-content/uploads/2009/06/gmail_wrong_username.jpg" alt="Seemingly random captcha" width="270" height="346" /><p class="wp-caption-text">Seemingly random captcha</p></div>
<p><em>* I&#8217;m not sure why, but some people are saying that they cannot login without entering the captcha. I&#8217;ve tried on Swiftweasel and Firefox 3.x/Opera 9.x and 10/Konqueror/Chrome on Linux, and on Safari on the Mac, and have never needed to enter the captcha. </em></p>
<p>Also worth mentioning, a lot of forms you get when you try to download something are optional. For example, if you try to download Mimer SQL, it gives you this form: http://developer.mimer.com/downloads/downloads_licens.tml?id=528 but you can just scroll down and hit the  download button without putting any info in.</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/HXaERUbAyx4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/06/gmail-captcha-is-optional/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/06/gmail-captcha-is-optional/</feedburner:origLink></item>
		<item>
		<title>Bash Tips for Power Users</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/tRoKTNCIrlE/</link>
		<comments>http://biodegradablegeek.com/2009/06/bash-tips-for-power-users/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:22:14 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[getting things done]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/?p=105</guid>
		<description><![CDATA[Every Geek site needs an obligatory Bash Tips post
Copy Files Securely Between Two Machines
I used to always forget the syntax for this, until I realized that the syntax is exactly like the standard cp command. In fact, you can copy files like you normally would using scp, on your local machine. The following are equivalent:

$ [...]]]></description>
			<content:encoded><![CDATA[<p>Every Geek site needs an obligatory Bash Tips post</p>
<h2><strong>Copy Files Securely Between Two Machines</strong></h2>
<p>I used to always forget the syntax for this, until I realized that the syntax is exactly like the standard <strong>cp</strong> command. In fact, you can copy files like you normally would using scp, on your local machine. The following are equivalent:</p>
<pre class="brush: bash;">
$ cp file file.orig
$ scp file file.orig
</pre>
<p>Where they differ is, <strong>scp</strong> lets you copy files over a network, through SSH. Here&#8217;s an example:</p>
<pre class="brush: bash;">
$ scp contents.txt silver@ssh.domain.com:/tmp
</pre>
<p>This will copy local file contents.txt to /tmp on the remote machine ssh.domain.com, as user silver. Here are some more examples:</p>
<pre class="brush: bash;">
$ scp draft.pdf ssh.domain.com:
</pre>
<p>(copy draft.pdf to my home dir on remote machine. username is implied to be the same locally and remotely.)</p>
<pre class="brush: bash;">
$ scp swine.jpg rex@ssh.domain.com
</pre>
<p>(<strong>read</strong>: This will copy swine.jpg to local machine as a file named rex@ssh.domain.com. To make it go remote, append a : to the address, like above)<strong> </strong></p>
<p><strong>scp</strong> supports, among other things, compression (-C) and recursive copying of directories (-r).<br />
<strong> </strong></p>
<pre class="brush: bash;">
$ scp -rC code/ ssh.domain.com:/archive/code_02032009
</pre>
<p><strong></strong></p>
<p>Trying to copy to a directory you don&#8217;t have permission to (/usr etc) will fail.</p>
<h2>Don&#8217;t Get Lost Jumping To and Fro Between Directories</h2>
<p>You can use <strong>cd -</strong> to jump to the previous (NOT parent) dir. For example:</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ cd /usr/local/share
kiwi@localhost: /usr/local/share $ cd -
/home/kiwi
kiwi@localhost: ~ $ cd -
/usr/local/share
kiwi@localhost: /usr/local/share $
</pre>
<p>Another way is using <strong>pushd/popd</strong> &#8211; A Last In First Out (LIFO) stack of dirs.</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ pushd /usr/local/share/
/usr/local/share ~
</pre>
<p><strong>pushd</strong> is like cd but keeps note of the current dir before cd&#8217;ing into a new one. The stack of dirs is listed every time you invoke <strong>pushd</strong> <em>(the &#8220;/usr/local/share ~&#8221; output you see above.)</em></p>
<pre class="brush: bash;">
kiwi@localhost: /usr/local/share $ pushd /
/ /usr/local/share ~
</pre>
<p>Stack is ordered left to right, latest push first. If we pop the first dir off:</p>
<pre class="brush: bash;">
kiwi@localhost: / $ popd
/usr/local/share /tmp ~
kiwi@localhost: /usr/local/share $
</pre>
<p>We&#8217;re back in the share dir. We can keep popping until there&#8217;s nothing left (throws an error):</p>
<pre class="brush: bash;">
kiwi@localhost: /usr/local/share $ popd
/tmp ~
kiwi@localhost: /tmp $ pushd /lib
/lib /tmp ~
kiwi@localhost: /lib $ popd
/tmp ~
kiwi@localhost: /tmp $ popd
~
kiwi@localhost: ~ $ popd
bash: popd: directory stack empty
</pre>
<h2>Working with Long Lines</h2>
<p>No need for more Bash shortcut <a href="http://cheat.errtheblog.com/s/bash/" target="_blank">cheat sheets</a>, but here are some useful ones to help you work with long lines.</p>
<p>You can jump to the <strong>start &amp; end</strong> of a line using <strong>CTRL+a &amp; CTRL+e</strong> respectively. Example (* is the cursor):</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ echo al the ducks are swimming in the w*
</pre>
<p>and you want to fix the first word. You can hop to the beginning of the line with <strong>CTRL+a</strong>:</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ *echo al the ducks are swimming in the w
</pre>
<p>and now you can jump to the end of the misspelled word &#8220;al&#8221; using <strong>CTRL+Right</strong> twice to correct it:</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ echo all*the ducks are swimming in the w
</pre>
<p>Now ctrl+e to jump to the end of line:</p>
<pre class="brush: bash;">
kiwi@localhost: ~ $ echo all the ducks are swimming in the w*
</pre>
<p>Instead of backspacing every character, use <strong>ALT+Backspace</strong> to backspace entire words. You can also delete <strong>all</strong> or part of a line using <strong>CTRL+u</strong> combo. It deletes everything before the cursor. Likewise, <strong>CTRL+k</strong> wipes out everything after the cursor. I&#8217;ve developed a habit of using CTRL+e CTRL+k to delete lines.</p>
<p>Bash has a lot of <strong>ALT</strong> commands that let you move and manipulate words. <strong>ALT+l</strong> and <strong>ALT+u</strong> will make a word in front of the cursor lowercase or uppercase, for example. A neat one I don&#8217;t think I ever used is ALT+\ It pulls everything after the cursor left to the first non-whitespace character. Here&#8217;s an example, * is the cursor:</p>
<p><strong>BEFORE:</strong></p>
<pre class="brush: bash;">
$ my     spacebar is    *sticky
</pre>
<p><strong>AFTER (ALT+\):</strong></p>
<pre class="brush: bash;">
$ my     spacebar issticky
</pre>
<h2>Avoid Retyping Commands &amp; Arguments</h2>
<p><strong>ESC + .</strong> is <span style="text-decoration: underline;">very</span> useful. Escape followed by a period will output the argument you sent to your last Bash command. Command calls themselves are outputted if they were invoked without any arguments <em>(popd, ls, etc).</em></p>
<p>Example, unzipping a file and moving the archive to /tmp:</p>
<pre class="brush: bash;">
$ unzip archive-with-a-long-ambiguous-name-03092009-5960-1.2.5.zip
$ mv archive-with-a-long-ambiguous-name-03092009-5960-1.2.5.zip /tmp
</pre>
<p>In the mv command, the archive name was outputted by pressing <strong>ESC+.</strong> (full command being mv (ESC+.) /tmp) There was no need to type the long archive name twice.</p>
<p>The argument is taken from your bash history. You can keep invoking ESC+. to cycle back through all your recent command arguments. (history -c to clear)</p>
<p>Try not to forget this; You&#8217;ll naturally find plenty of uses for it.</p>
<p>Another way to avoid re-typing commands is <strong>CTRL+R</strong>. It will initiate a search of your command history. Begin typing, and watch Bash try to complete your command from previous ones you entered.</p>
<h2>Command Getting Too Big? Send it to your Editor</h2>
<p>Sometimes you begin writing what you think will be a simple command, only to realize that it has grown too complex for the command line, and you wish you were in your text editor.</p>
<p>First make sure your default editor is set. This is either in $EDITOR (export EDITOR=/usr/local/bin/vim) or elsewhere depending on the distro.</p>
<p>Use &#8220;fc&#8221; to open the last executed command in your editor:</p>
<pre class="brush: bash;">
ls -paul --sort=size
... ls output ...
fc
</pre>
<p>Now the <em>ls</em> line will be open in your editor. But what if you hadn&#8217;t executed the command yet? No problem. You&#8217;re sending off an email, but quickly realize that the command line isn&#8217;t ideal for everything:</p>
<pre class="brush: bash;">
echo -e &quot;Dear Santa, \n\n\tIt has become evident that your fat ass is contributing to Global Warming, primarily due to the large quantity of coal you distribute annually. We hereby
</pre>
<p>No matter where you are on the line, hit <strong>CTRL+x, CTRL+e</strong> to invoke your editor, which now contains what you were typing on the cmd line.</p>
<p>I always find myself wanting to finish a command in vim, but unwilling to type the first few lines over, especially when I&#8217;m trying to write a for loop or any ugly multiline Bash code.</p>
<p><strong>IMPORTANT: Whatever you type in your editor is executed automatically after you quit the editor.</strong><br />
<span id="more-105"></span></p>
<h2>Multiple Commands on a Single Line</h2>
<p>There are a number of ways to piece together commands (||, pipes, etc), depending on your need, but sometimes, you just commands executed consecutively. You can use ; or &amp;&amp;.</p>
<p><strong>semicolon (;) vs AND (&amp;&amp;)</strong>: The semicolon will run through each command consecutively, whereas &amp;&amp; is a little smarter, and will not continue if a command does not end successfully (return 0 &#8211; you can check the return value of the last app ran with <strong>echo $?</strong>).</p>
<p>&amp;&amp; is generally safer. i.e., ./configure &amp;&amp; make (&amp;&amp; sudo make install)</p>
<p>AND</p>
<pre class="brush: bash;">
$ cp bogus &amp;amp;&amp;amp; echo &quot;** copied&quot;
cp: missing destination file operand after `bogus'
Try `cp --help' for more information.
</pre>
<p>SEMICOLON;</p>
<pre class="brush: bash;">
cp bogus; echo &quot;** copied... or did I? tun tun tunnn!&quot;
cp: missing destination file operand after `bogus'
Try `cp --help' for more information.
** copied... or did I? tun tun tunnn!
</pre>
<h2>Convert between DOS and UNIX ASCII files</h2>
<p>Sometimes you get a text file that has weird ^M characters in it. These are due to a difference in how Unix and Windows systems end lines. You can convert between these formats using <strong>unix2dos</strong> or <strong>todos</strong> and <strong>dos2unix</strong> or <strong>fromdos</strong>.</p>
<pre class="brush: bash;">
$ mkdir /tmp/rcfl
$ cd /tmp/rcfl
$ echo -e &quot;Justa Lonely\nASCII File&quot; &gt; out
$ file out
out: ASCII text
$ todos out
$ file out
out: ASCII text, with CRLF line terminators
$ vim out # notice [dos] flag in status bar, quit :q!
$ fromdos out
$ file out
out: ASCII text
</pre>
<h2>Background Processes</h2>
<p>Have a little more control over your apps.</p>
<p><strong>Stop Right Thurr</strong><br />
When a program is running in the foreground, you no longer have access to the command line. An example is &#8216;tail -f&#8217; or &#8216;ruby script/server&#8217;</p>
<p>You can have a running process pause for a sec with <strong>CTRL+z</strong>.<br />
Do your dirty work and then bring the app back to the foreground with <strong>fg</strong>.<br />
To list the processes you have paused, use <strong>jobs</strong></p>
<pre class="brush: bash;">
$ tail -f useful.log
00:00:50 User did something that was log-worthy
00:00:56 User did something that was log-worthy
00:00:57 User did something that was log-worthy

# (press CTRL+z)
[1]+  Stopped                 tail -f useful.log

$ echo &quot;look ma, I can type&quot;
look ma, I can type

$ fg
tail -f useful.log

# (press CTRL+z)
[1]+  Stopped                 tail -f useful.log

$ tail -f blah.tmp

# (press CTRL+z)
[2]+  Stopped                 tail -f blah.tmp

$ jobs
[1]-  Stopped                 tail -f useful.log
[2]+  Stopped                 tail -f blah.tmp
$ fg 1
(process [2] continues)
</pre>
<p><strong>In the Background</strong></p>
<p>You can have a process start in the background by appending to it a <strong>&amp;</strong>.<br />
and bring this to the foreground using <strong>fg [#]</strong>.<br />
As before, jobs will list background processes, but with status <em>Running</em> instead of <em>Stopped</em>.</p>
<p>Programs running in the background will still output to stdout, which means they&#8217;ll make the shell ugly. So if you plan on using them, think about redirecting the output.</p>
<h2>Bash Redirection</h2>
<p>Some things are mentioned on nearly every &#8216;bash tips&#8217; page &#8212; like redirecting output. Here are the basics. We&#8217;re concerned with 2 I/O streams: STDOUT and STDERR. STDOUT has a value of 1, and it is the screen. If a program writes to stdout, that text is shown in the console. Errors are sent through a different stream, stderr, which has a value of 2. Value 0 is stdin, used for user input. The technical details aren&#8217;t important. Just remember that 1 is screen and 2 is error.</p>
<p>There&#8217;s a number of ways to redirect output:</p>
<pre class="brush: bash;">
$ echo &quot;asdfasdf&quot; 1&gt; /tmp/asdf.txt # overwrite existing file
$ echo &quot;asdfasdf&quot; &gt; /tmp/asdf.txt # (same, 1 is default, optional)
$
$ echo &quot;32452345&quot; &gt;&gt; /tmp/asdf.txt # append to end of existing file*
$ echo &quot;wash the dishes&quot; &gt; /dev/null # just ignore output
$ echo &quot;wash the dishes&quot; 2&gt; /dev/null # just ignore errors
$
$ more 1&gt; /dev/null # error still shown
$ more 2&gt; /dev/null # nothing shown
$ more &amp;&gt; /dev/null # nothing shown
$
$ more 2&gt;| /dev/null # silence errors
$ more &gt;| /tmp/more.txt # save output to file
$
$ more 1&gt; /tmp/more.txt 2&gt;&amp;1 # redirect stdout to file and redirect stderr to stdout (same file)
$ more 2&gt; /tmp/more.txt 1&gt;&amp;2 # have stdout follow stderr to file
</pre>
<p>To redirect output to a file &amp; screen, use <strong>tee</strong></p>
<pre class="brush: bash;">
$ echo &quot;dont forget the milk&quot; | tee /tmp/toforget.txt
</pre>
<p>More a more extensive guide on redirection, see <a href="http://tldp.org/LDP/abs/html/io-redirection.html" target="_blank">Bash IO Redirection</a> or some of the External Links below.</p>
<h2>Art of teh Alias</h2>
<p>I use a lot of aliases. Here are a few:</p>
<pre class="brush: bash;">
# I use these a lot. Can also have aptupdate, aptremove etc...
alias aptinstall='sudo apt-get install'
alias aptsearch='apt-cache search'
alias suvim='sudo vim'

# Aliasing command names. To use original commands, you'd need to specify absolute path.
alias a2restart='sudo apache2ctl restart'
alias gem='sudo gem'
alias checkinstall='sudo checkinstall'

# I used these to workaround the infamous FF memory leak (ugly)
# alias swapoff='sudo swapoff'
# alias swapon='sudo swapon'

# Going places. This + ssh keypair
alias macbookshell='ssh 192.168.1.17'
alias workshell='ssh meh@ssh.domain.com'

# Pretty output. (--group-directories-first might not work on your system).
alias lsf='ls -hAlF --group-directories-first --color=always --time-style=+&quot; %m/%d/%y %I:%M %p &quot;'

# List only directories
alias lsd='ls -d */'

# I'm a measly human!
alias free=&quot;free -m&quot;

# 'gimme x' is equivalent to 'sudo chown me.me x'
# alias gimme=&quot;ME6=`whoami` &amp;amp;&amp;amp; sudo \&quot;chown $ME6.$ME6\&quot;&quot;

# Usage: nullminate bloated-file.log
alias nullminate=&quot;cat /dev/null &gt; &quot;

# Search contents of an entire dir. Usage: scan &quot;PESKY_VARIABLE ?=&quot; project-123/
alias scan=&quot;grep -Rin --color&quot;
</pre>
<p>These should go in a ~/.bash_aliases file and invoked from within your user conf (.bashrc?)</p>
<p><!--<br />
screen<br />
public keys<br />
sub sections (shortcuts, history, redirection)<br />
--></p>
<p><strong>External links (related): </strong></p>
<ul>
<li><a href="http://www.caliban.org/bash/" target="_blank">Working more productively with bash 2.x/3.x</a></li>
<li><a href="http://www.hypexr.org/bash_tutorial.php" target="_blank">Getting Started with BASH</a></li>
<li><a href="http://www.wains.be/index.php/2007/11/26/bash-tips-and-tricks/" target="_blank">Bash Tips &amp; Tricks</a></li>
<li><a href="http://hacktux.com/bash/script/efficient" target="_blank">10 Tips for Writing Efficient Bash Scripts</a></li>
<li><a href="http://www.linuxtutorialblog.com/post/tutorial-the-best-tips-tricks-for-bash" target="_blank">Best Tips &amp; Trips for Bash</a></li>
<li><a href="http://linuxhelp.blogspot.com/2005/08/bash-shell-shortcuts.html" target="_blank">Bash Shell Shortcuts</a></li>
<li><a href="http://bashish.sourceforge.net/" target="_blank">Bashish</a></li>
<li><a href="http://www.davidpashley.com/articles/writing-robust-shell-scripts.html" target="_blank">Writing Robust Shell Scripts</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/tRoKTNCIrlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/06/bash-tips-for-power-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/06/bash-tips-for-power-users/</feedburner:origLink></item>
		<item>
		<title>Do You Keep Old Programming Books?</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/dFVqnR6P4vY/</link>
		<comments>http://biodegradablegeek.com/2009/06/do-you-keep-old-programming-books/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 21:08:30 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[books]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/?p=445</guid>
		<description><![CDATA[I knew HTML and learned ActionScript (actually ActionScript wasn&#8217;t out yet. Flash only had basic scripting support) , and around 1999 I wanted to learn Javascript. I ended up getting a book on Java, thinking it was Javascript. It didn&#8217;t take more than a day to figure out they&#8217;re completely different languages, but for some [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_448" class="wp-caption alignright" style="width: 360px"><a href="http://www.flickr.com/photos/osiatynska/3287986172/" target="_blank"><img class="size-full wp-image-448" title="Photo by ailatan (flickr)" src="http://biodegradablegeek.com/wp-content/uploads/2009/06/ailatan_flickr_books.jpg" alt="Photo by ailatan (flickr)" width="350" height="350" /></a><p class="wp-caption-text">Photo by ailatan (flickr)</p></div>
<p>I knew HTML and learned ActionScript (actually ActionScript wasn&#8217;t out yet. Flash only had basic scripting support) , and around 1999 I wanted to learn Javascript. I ended up getting a book on Java, thinking it was Javascript. It didn&#8217;t take more than a day to figure out they&#8217;re completely different languages, but for some reason, I kept the book anyway. $30 was a lot of money at the time. I could of bought a used Playstation game, or saved it towards what would become the <a href="http://en.wikipedia.org/wiki/Dreamcast" target="_blank">greatest console of all time</a>, released 9/9/99. But &#8211; the book will be useful eventually, I told myself, and with that, on my bookshelf it went.</p>
<p>Today I walked by my bookshelf and there it was: Teach Yourself Java. The last time I opened this book was the day after I bought it, sometime in 1999. Even if I keep it, if I&#8217;d like to learn Java now, I would buy a new book anyway.</p>
<p>A lot of us keep books. Seeing our library physically grow feels good, even if we haven&#8217;t read most of the books in it, because we will eventually, right? Keeping reference books is one thing (though I never use mine, what with <a href="http://cheat.errtheblog.com/" target="_blank">cheat</a> and <a href="http://en.wikipedia.org/wiki/Internet" target="_blank">all</a>) but most books should be traded or given away. Technical books especially, not only because they&#8217;re expensive, but because unlike novels and most other types of books, they become obsolete. But unless you seriously plan on re-reading them, even books that are cheap and timeless should be traded or given away.</p>
<p>Who doesn&#8217;t love a book fair? or going through a big box of books in a garage sale? If we all horde books, who would keep this circle going? So what can you do with your old books instead?<br />
<span id="more-445"></span><br />
You can borrow books from the library instead of buying them. Not only does not pack ratting books save space, but the deadline of having to give it back provides an incentive to begin reading them ASAP. If I&#8217;m shopping online I tend to buy dozens of books at a time, become overwhelmed when they get here, and then not start a single one. Interestingly, the last 2-3 books I&#8217;ve read (and the one <a href="http://www.amazon.com/Happiness-Science-behind-Your-Smile/dp/product-description/0192805592" target="_blank">I&#8217;m reading now</a>) have all been from the library, even though I have ~20 unread books I purchased months ago.</p>
<p>You can still keep track of what you&#8217;ve read by using services/apps like <a href="http://books.livingsocial.com/" target="_blank">LivingSocial</a> or <a href="http://www.shelfari.com/" target="_blank">Shelfari</a> &#8211; or something simpler like your Amazon account or just an Excel or text file.</p>
<h2>What Can You Do With Old Books?</h2>
<p>One interesting thing people do is to just leave the book in a public place for somebody else to come and pick up. Unfortunately, while it sounds interesting, this isn&#8217;t recommended. Books left on the bus, train, a taxi or park bench might get trashed or destroyed more likely than they are to land in an interested prospect&#8217;s hands.</p>
<ul>
<li>Books can be given to your local library, or perhaps a college or used book stores.</li>
<li>Sell them online (Craigslist) or at your (neighbor&#8217;s) garage sale.</li>
<li>Join a site like <a href="http://www.bookcrossing.com" target="_blank">BookCrossing.com</a> or <a href="http://www.readitswapit.co.uk/TheLibrary.aspx" target="_blank">ReadItSwapIt.co.uk</a> where people swap books they&#8217;ve read. Also see <a href="http://www.greenmetropolis.com/" target="_blank">Green Metropolis</a></li>
</ul>
<p>Interesting post: <a href="http://www.guardian.co.uk/books/2005/oct/29/featuresreviews.guardianreview8" target="_blank">Desert Island Bookshelf</a> | <a href="http://socialbookshelf.org/" target="_blank">SocialBookshelf</a></p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/dFVqnR6P4vY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/06/do-you-keep-old-programming-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/06/do-you-keep-old-programming-books/</feedburner:origLink></item>
		<item>
		<title>Calculate Your GPA Using this Bash Script</title>
		<link>http://feedproxy.google.com/~r/BiodegradableGeek/~3/_Q7VwYyBa0A/</link>
		<comments>http://biodegradablegeek.com/2009/05/calculate-your-gpa-using-this-bash-script/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:18:18 +0000</pubDate>
		<dc:creator>Isam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Code example]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://biodegradablegeek.com/?p=433</guid>
		<description><![CDATA[This Bash script is used to calculate your Grade Point Average (GPA) on the command line. Usage might not be intuitive. Please see the usage function or just run the script without passing it any arguments.
The gval function should be edited to reflect your own region or university. It has been written and tested on [...]]]></description>
			<content:encoded><![CDATA[<p>This Bash script is used to calculate your Grade Point Average (GPA) on the command line. Usage might not be intuitive. Please see the usage function or just run the script without passing it any arguments.</p>
<p>The <strong>gval</strong> function should be edited to reflect your own region or university. It has been written and tested on Bash 3.2.48.</p>
<pre class="brush: bash;">
#!/bin/sh
#
# Bash GPA calculator
#
# Isam | r0cketjump@yahoo.com | biodegradablegeek.com
# 05/21/2009 - Just another 4 AM project

function usage {
  echo -e &quot;\nBASH GPA Calculator&quot;
  echo
  echo -e &quot;\tAccepts an even # of arguments in the form of C G C G C G ...&quot;
  echo -e &quot;\t (C = number of credits, G = grade for the course)&quot;
  echo
  echo -e &quot;\tExample: You got a B+ in a 4 credit course, &quot;
  echo -e &quot;\t         an A in a 3 credit course, etc..&quot;
  echo
  echo -e &quot;\tUSAGE: $0 4 B+ 3 A 3 F 3 B-&quot;
  echo
  echo &quot;Acceptable grades are A B C D F WU (eq to F)&quot;
  echo
}

function calc {
  echo `echo &quot;scale=3; $1&quot; | bc`
}

function gval {
  grade=`echo &quot;$1&quot; | tr [a-z] [A-Z]`
  case $grade in
    A+ ) echo '4.3';;
    A ) echo '4';;
    A- ) echo '3.7';;

    B+ ) echo '3.3';;
    B ) echo '3.00';;
    B- ) echo '2.7';;

    C+ ) echo '2.3';;
    C ) echo '2.0';;
    C- ) echo '1.7';;

    D+ ) echo '1.3';;
    D ) echo '1.0';;
    D- ) echo '0.7';;

    F ) echo '0';;
    WF ) echo '0';;
    WU ) echo '0';;
  esac
}

# check # of arguments. is it even?
let MOD=$#%2
if [ ! $MOD -eq 0 ]; then
  usage
  exit
elif [ $# -eq 0 ]; then
  usage
  exit
fi

args=($@)
n=${#args[@]}

points=0
credits=0

for ((i=0;i&lt;$n-1;i+=2)); do
  k=${i}

  creds=${args[$k]}
  cgrade=${args[$k+1]}

  # convert cgrade (C-) to a number
  grade=`gval $cgrade`
  pts=`calc $grade*$creds`

  echo &quot;$creds * $cgrade ($grade) = $pts&quot;

  points=`calc $points+$pts`
  credits=`calc $credits+$creds`
done

gpa=`calc $points/$credits`
echo &quot;------------&quot;
echo &quot;Total points  = $points&quot;
echo &quot;Total credits = $credits&quot;
echo &quot;------------&quot;
echo &quot;** GPA (pts/crd) = $gpa&quot;
echo &quot;------------&quot;
</pre>
<p>(Script uses <strong>bc</strong> as the calculator. Change that in the calc function if you need to.)</p>
<p>I&#8217;ll never get used to Bash&#8217;s ugly ass syntax.  &#8230; esac?</p>
<img src="http://feeds.feedburner.com/~r/BiodegradableGeek/~4/_Q7VwYyBa0A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://biodegradablegeek.com/2009/05/calculate-your-gpa-using-this-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://biodegradablegeek.com/2009/05/calculate-your-gpa-using-this-bash-script/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.467 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-04 07:43:24 --><!-- Compression = gzip -->
