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

<channel>
	<title>compwhizii</title>
	<atom:link href="http://compwhizii.net/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://compwhizii.net</link>
	<description>PHP coder and web developer</description>
	<lastBuildDate>Sun, 31 Jan 2010 22:12:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Yes the computer is still not fixed :(</title>
		<link>http://compwhizii.net/index.php/2010/yes-the-computer-is-still-not-fixed/</link>
		<comments>http://compwhizii.net/index.php/2010/yes-the-computer-is-still-not-fixed/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 16:24:00 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[computer]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/yes-the-computer-is-still-not-fixed/</guid>
		<description><![CDATA[I wrote this yesterday but I have it set to auto publish today. Anywho, my desktop still isn’t fixed and I’m still on my netbook. In brief we got the motherboard back, got thermal paste for the CPU, put it back together, and the we got the same problem we had 4 weeks ago.
The next [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this yesterday but I have it set to auto publish today. Anywho, my desktop still isn’t fixed and I’m still on my netbook. In brief we got the motherboard back, got thermal paste for the CPU, put it back together, and the we got the same problem we had 4 weeks ago.</p>
<p>The next day we got a new power supply from BestBuy, a Corsair 650w. Same problem.</p>
<p>So at this point it has to be the CPU. Tomorrow we will be going to Microcenter to pick up a Q9550 for $170. It’s quite a deal.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/yes-the-computer-is-still-not-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CodeCanyon Competition</title>
		<link>http://compwhizii.net/index.php/2010/codecanyon-competition/</link>
		<comments>http://compwhizii.net/index.php/2010/codecanyon-competition/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 03:59:57 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[codecanyon]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/codecanyon-competition/</guid>
		<description><![CDATA[
Right so CodeCanyon is having a competition next month, with over $6000 in prizes. The only guidelines are to submit the best stuff for the month of February. I have a few things planned for it, the only thing I can tell you specifics about is my templating class. Given the simplicity and power of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codecanyon.net/?ref=compwhizii" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" border="0" src="http://envato.s3.cdn.plus.org/referrer_adverts/cc_468x60_v4.gif" /></a></p>
<p>Right so <a href="http://codecanyon.net/">CodeCanyon</a> is having a competition next month, with over $6000 in prizes. The only guidelines are to submit the best stuff for the month of February. I have a few things planned for it, the only thing I can tell you specifics about is my templating class. Given the simplicity and power of it, it should sell pretty well.</p>
<p>I gave a demo of it on Facepunch, so I’ll just <a href="http://www.facepunch.com/showpost.php?p=19921129&amp;postcount=615" target="_blank">link to it</a>. I even got <a href="http://www.facepunch.com/showpost.php?p=19926641&amp;postcount=622" target="_blank">foreach statements working</a>, and I’m very happy about that. It’s going to be used in some of my secret projects also.</p>
<p><img src="http://imgkk.com/i/phXefC.png" /></p>
<p>Now a little about one of the apps I’m developing. I’m dying to show you bits of it but I really know I shouldn’t. I’m pretty sure there’s nothing else like it, and I hope it will change the way people ____ ___________ ____ (Fill in the blanks). The idea came to me after I finished my mathematics midterm on Monday. After that I’ve been working very hard on it.</p>
<p>The last 2 days were spent building and testing the installer as well as classes that would be reused later, and the awesome templating class. As of tonight I have the login system working, so that’s good. I’m also not using just MD5 for this project, I’m using SHA2 with a salt. It’s good to be able to change that.</p>
<p>So that’s really it for right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/codecanyon-competition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shenanigans</title>
		<link>http://compwhizii.net/index.php/2010/shenanigans/</link>
		<comments>http://compwhizii.net/index.php/2010/shenanigans/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 05:24:04 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[luaduck]]></category>
		<category><![CDATA[vps1]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/shenanigans/</guid>
		<description><![CDATA[I say shenanigans because I’m not really blogging about anything in particular, I’m just giving an update to what’s been going on with me.
Mail Clients
Right so over at Facepunch in the Windows section Panda X was showing off screenshots of Windows Live Mail Wave 4. I’ll be honest, the clients I use right now are [...]]]></description>
			<content:encoded><![CDATA[<p>I say shenanigans because I’m not really blogging about anything in particular, I’m just giving an update to what’s been going on with me.</p>
<h3>Mail Clients</h3>
<p>Right so over at Facepunch in the Windows section Panda X was <a href="http://www.facepunch.com/showthread.php?t=882195">showing off screenshots</a> of <a href="http://download.live.com/wlmail">Windows Live Mail</a> Wave 4. I’ll be honest, the clients I use right now are the web clients for gmail and the gmail app on my Droid. WLM looked like it had a pretty nice interfaced, and easier setup for gmail, so I gave it a try. I used it for a bit, and although I did enjoy the convenience of having all my email accounts in one spot (I have 4), I remembered why I didn’t like desktop clients.</p>
<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/image.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb3.png" width="506" height="423" /></a>IMAP isn’t smart enough yet to download recent email. Nah it’s has to download shit from 2 years ago in case I want to read it. Sorry, I really don’t.</p>
<h3>Open source doesn’t make it automatically better</h3>
<p>This actually comes from the same thread as before.</p>
<blockquote><p>I like the open source-ness of Thunderbird, so expect no love for Windows Live Mail from me.</p>
</blockquote>
<p>I cannot begin to imagine why being closed source would make WLM unacceptable. They’re both free, why does it matter. I’m pretty sure you’re not diving into the code making changes so IMAP doesn’t download 10000 emails (If you are send me an email) so why do you care.</p>
<h3>Luaduck and his Novint Falcon</h3>
<p> <a href="http://compwhizii.net/wp-content/uploads/2010/01/pmukblognovintfalcon.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="pmuk-blog-novint-falcon" border="0" alt="pmuk-blog-novint-falcon" align="right" src="http://compwhizii.net/wp-content/uploads/2010/01/pmukblognovintfalcon_thumb.jpg" width="156" height="156" /></a>
<p>Recently <a href="http://luaduck.co.uk/">Luaduck</a> got a <a href="http://home.novint.com/products/novint_falcon.php">Novint Falcon</a>. I’m not going to go over what this is as you could figure this out through Google. I’ve considered getting one but right now I just don’t have the desk space. Wanting to hear about what Luaduck says about it, I head over to <a href="http://luaduck.co.uk/2010/01/21/the-novint-falcon/">his blog post</a>.</p>
<blockquote><p>The Falcon is a Haptic-Feedback device designed to replace the mouse in gameplay (the idea being that you can feel your games). The control scheme can be a little wierd at times (you use the central area for precise aiming, and the edges to pan around like a joystick) but you get used to it after about ~15h playtime.</p>
<p>To be honest? I love the thing. You’re going to get dreadful KD ratios for the first few hours, but you’ll gradually improve as time goes on.</p>
</blockquote>
<p>Everything else was just copy-pasta. Thanks for the in-depth review man. Then again he also got a <a href="http://luaduck.co.uk/2010/01/08/20-off-the-novint-falcon/">20% discount code</a> for everyone, so I guess that makes up for the lack of detail.</p>
<h3>My motherboard is here!</h3>
<p>Today my motherboard arrived. Horray!</p>
<p>But I don’t have any thermal paste. Shit. Sure I could use toothpaste but I don’t really <em>want</em> to. So I’ll just wait to get some. The saga continues.</p>
<h3>Sand castles and subscriptions</h3>
<p>About a week ago OpenPeer’s lead Server Admin, Scott, brought The Planet’s <a href="http://www.theplanet.com/sand-castle/">Sand Castle</a> program to my attention. Although OpenPeer isn’t what the program had in mind, we were accepted on Thursday. After I put the final ordering through we’ll be the proud owner of a Dual Xeon 2.8 GHz server in Texas.</p>
<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb4.png" width="624" height="229" /></a> </p>
<p>Very cool. This might mean I can downgrade vps2 or completely decommission it. I have to say though, for the 2 months I’ve been with <a href="http://fivebean.com">FiveBean</a>, they’ve been pretty good. I’d recommend them as a cheap VPS host and web host.</p>
<p>Now for the other part of the story. As if I wasn’t already in a great mood that day I get an email at about 11pm from Drew from <a href="http://dev-tips.com">Dev-Tips.com</a>. About 2 weeks prior I entered into a <a href="http://dev-tips.com/featured/dev-tips-turns-1-the-huge-giveaway-bash-begins">giveway for Dev Tip’s first birthday</a>, with some pretty cool stuff to give away. Not expecting to win or anything I entered.</p>
<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb5.png" width="624" height="206" /></a> </p>
<p>Fuck yeah. I love the entire <a href="http://tutsplus.com">Tuts+ network</a>, my favorite of course being <a href="http://net.tutsplus.com/">Nettuts+</a>, run by the very cool <a href="http://jeffrey-way.com/">Jeff Way</a>. They also pay <strong>very</strong> well for tutorials, $150 each for regular tutorials, and up to $600 for Plus tutorials. God damn that’s a lot of money (For a teenager). If a server or admin tuts+ ever shows up, I’d definatley write an article. (Although probably not on backup, why? Well…)</p>
<h3>Wild cards makes deleting things quick</h3>
<p>If you run WordPress you know that every time there’s an update, in the AdminCP a bar comes up telling you about it. Since I had some free time I decided to finally update. Because I don’t have FTP (or my permissions were wrong), I need to do the update by hand. Following the quick upgrade guide on codex, I decide to make an XML backup of the text. I knew this would be more than enough (At the time).</p>
<p>The next step was deleting all the WordPress files. Hell that’s easy! Just do <em>rm -Rf wp-* xmlrpc.php</em>. Great, gets rid of all of files, admin folder, includes folder, content fol-<strong><em>CONTENT FOLDER??</em></strong></p>
<p><center>
<p><span style="font-size: 80px"><strong><em>OH SHIT</em></strong></span></p>
<p> </center>  <br /> 
<p>Yes. I just deleted my blogs content folder. The folder with all the uploads, the theme, and the plugins in it. And the most recent backup was a month ago.</p>
<p> <img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://www.facepunch.com/fp/emoot/ohdear.png" />
<p>I decided to just work off of what I have, and I uploaded the content folder (and the config file, I deleted that too). After that upgrading and everything was pretty easy, and I installed all the plugins I had installed (I only really use 5). Even though I had WordPress fixed an running, I knew I was still missing images (On a related note, this is the problem Jeff Atwood had a month ago.), so bracing for the worse, I went to the main page of my blog.</p>
<p>Wait, what. The images are there.</p>
<p>I still have no idea where they came from, but somewhere on the road to my display and the filesystem on vps1, the images were there. They weren’t being hosted offsite either, I looked at the source. Not waiting for a cache to expire, I quickly downloaded all the images and threw them in their right places on the server.</p>
<p>So everything is good. I’ll look into some automated backups now. I promise.</p>
<p>Okay maybe I can’t promise but I will sometime in the future. Yeah.</p>
<h3>On the note of blogs</h3>
<p>By the way I hope you’re enjoying my writing style here. It’s 12:06 AM right now as I’m typing this sentence, so…yeah.</p>
<p>Anyway, back to blogs. Even though I’m writing this one, I really don’t read many personal ones. If I see someone tweeting about their post, I’ll have a look. The only blog I check for updates since the owner doesn’t tweet about it ( &gt;:( ), is <a href="http://garry.tv/">Garry’s</a>. He consistently writes quality and interesting content.</p>
<p>This one I just heard about last night, <a href="http://virtual-losers.com/?p=19">Virtual-losers.com</a>. Basically it’s these three (losers) guys sharing a single blog and each writing posts. I guess that means it’s cheaper to host, but I’d rather have my own.</p>
<p>A few hours I read a really good blog post about <a href="http://blog.fsck.com/2010/01/dont-buy-a-nook.html">the nook and why not to buy it</a>. I was really compelled by this blog post not to buy a nook, the whole experience he had is just unacceptable, and how a company can treat a customer like that is ridiculous. I hope he gets enough money for a Kindle.</p>
<h3>That’s all</h3>
<p>I was hoping I wouldn’t have to do another huge blog post. But I did. I can’t find enough time to write about a single subject, so just lumping bits of information together in a mega post is a good solution.</p>
<p>As before, I hope you read the whole thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/shenanigans/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Computer Update (Update)</title>
		<link>http://compwhizii.net/index.php/2010/computer-update-update/</link>
		<comments>http://compwhizii.net/index.php/2010/computer-update-update/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 04:37:17 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/computer-update-update/</guid>
		<description><![CDATA[It seems that my random guess about them sending a new motherboard was correct, this is what they’re saying now:
 
Yet my name is still not John Duhard. Anywho, my tracking number is 363842310157694 and you can track it here: http://fedex.com/Tracking
]]></description>
			<content:encoded><![CDATA[<p>It seems that my random guess about them sending a new motherboard was correct, this is what they’re saying now:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb2.png" width="620" height="491" /> </p>
<p>Yet my name is still not John Duhard. Anywho, my tracking number is 363842310157694 and you can track it here: <a title="http://fedex.com/Tracking" href="http://fedex.com/Tracking">http://fedex.com/Tracking</a></p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/computer-update-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>nginx, php-cgi, and URL shorteners</title>
		<link>http://compwhizii.net/index.php/2010/nginx-php-cgi-and-url-shorteners/</link>
		<comments>http://compwhizii.net/index.php/2010/nginx-php-cgi-and-url-shorteners/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 04:18:16 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[mybb]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vps1]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/nginx-php-cgi-and-url-shorteners/</guid>
		<description><![CDATA[For those of you who don’t follow my twitter, I’ve been in the process of moving both my servers over to using nginx instead of Apache. On vps2, the switch was pretty seamless (sans SVN issues). However, vps1 proved to more of a challenge. This was partially expected, as I run multiple sites on this [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who don’t follow my twitter, I’ve been in the process of moving both my servers over to using nginx instead of Apache. On vps2, the switch was pretty seamless (sans SVN issues). However, vps1 proved to more of a challenge. This was partially expected, as I run multiple sites on this VPS.</p>
<h1></h1>
<h2>“Engine X”</h2>
<p>I began my journey by following <a href="http://wiki.archlinux.org/index.php/Nginx">the guide</a> over at the Arch Linux wiki and installing nginx. After nginx was installed (not really configured, besides listening on another port), I looked into how I would get PHP working. I had heard beforehand that getting PHP working on nginx was not as simple as installing a module, I would have to use a a FastCGI. Thankfully the guide had a section on this that <em>seemed</em> like it would work. I settle on this command, which was simple enough.</p>
<blockquote><pre>cgi-fcgi -start -connect localhost:9000 /usr/bin/php-cgi</pre>
</blockquote>
<p>Now that both nginx and php-cgi were running, I headed over to the very well documented <a href="http://wiki.nginx.org/Main">nginx wiki</a>. After learning nginx’s way over doing vhosts, I had all the sites configured and running in no time. Here’s what a typical site configuration would look like:</p>
<blockquote>
<pre>server {
	listen	80;
	server_name img.compwhizii.net i.j6k.info;

	location / {
		root /srv/http/imgs;
		index index.html index.htm index.php;
	}

	location ~ \.php$ {
		root /srv/http/imgs;
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index	index.php;
		fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
		include fastcgi_params;
	}
}</pre>
</blockquote>
<p>For my MyBB installs that were using SEO/Pretty URLs, I found <a href="http://community.mybboard.net/thread-51764.html">these rewrites</a> by <a href="http://community.mybboard.net/user-17022.html">frostschutz</a>. Thanks! For the Wordpress I’m just using:</p>
<blockquote>
<pre>if (!-e $request_filename) {
	rewrite . /index.php last;
}</pre>
</blockquote>
<p>I’m not entirely sure that it’s doing anything, but It’s working and that’s all I care about for now.</p>
<p>So everything is good for now, happy with my work I decide to go and head off to bed. Sleeping soundly I am awoken by my phone with a new email. It’s from pingdom, the GME Forums are down. The interesting bit is that I have 2 other monitoring services watching HTTP on vps1, and none of them alerted me. Since it’s obviously a false alarm, I put the phone is silent mode and get back to sleep.</p>
<p>Before school the next morning I log into my netbook, and I’m greeted by 2 different steam IMs about the forums being down. A quick trip to the site and I am greeted with a 502 Bad Gateway error. Not good. I check my other PHP based sites, and they are saying the same thing. With only 5 minutes till the bus arrives, it would have to wait.</p>
<p>Later that day I finally get around to fixing the problem, and it turns out that all that happened was php-cgi died. Odd. The simple fix was just running the command again, and life moved on.</p>
<p>Or did it?</p>
<h2>Fast doesn’t mean reliable</h2>
<p>A few hours later I got the same email, error, and fix. Something was obviously wrong. Not having the time or desire to fix the problem for good, I just started php-cgi again whenever it died. This continued for a few days, finally I decided to fix it for good.</p>
<p>The guide had an alternate method of using spawn-fcgi, which is used by lighttpd and part of the lighttpd package. I already had lighttpd installed so it would be a good solution. But,</p>
<blockquote>
<p>[root@compwhizii-vps1 ~]# spawn-fcgi<br />
    <br />-bash: spawn-fcgi: command not found</p>
</blockquote>
<p>._.</p>
<p>The next 30 minutes were spent reinstalling lighttpd twice, searching through it’s folders, looking at it <a href="http://wiki.archlinux.org/index.php/PKGBUILD">PKGBUILD</a>, and a bit of crying. Finally resorting to Google I found that spawn-fcgi was split from lighttpd, and was a separate project. Since it was in the <a href="http://wiki.archlinux.org/index.php/Arch_User_Repository">AUR</a> I built a package for it and installed. And all was good.</p>
<p>For a few hours.</p>
<p>Again that same damn problem came back, and now I’m getting really annoyed. I remember looking at some startup scripts mentioning variables for max requests and how many processes. So I did some googling and found this, <a href="http://blog.taragana.com/index.php/archive/how-to-stop-crashing-hanging-of-php-cgi-spawn-fcgi-with-nginx-lighttpd/">How to Stop Crashing / Hanging of php-cgi / spawn-fcgi with nginx / lighttpd</a>. </p>
<blockquote>
<p>While researching the topic across the web, it soon became apparent that php-cgi has nagging issues of stability on prolonged use. It appears the simplest way to ensure stability while using php-cgi is to recycle processes frequently. Unfortunately spawn-fcgi doesn&#8217;t provide a simple way to do it. We found out an important, but less advertised environment variable php-cgi recognizes: <strong>PHP_FCGI_MAX_REQUESTS</strong></p>
<p>This variable when set, specifies the maximum number of requests served by a php-cgi process before it is killed and a new process spawned. We have set it to 1000 and it seems to be working fine in this setting, even under high loads and prolonged use. You can just set (export in bash) this environment variable before calling spawn-fcgi and that&#8217;s it. We have simplified the setup using a script and so can you.</p>
<p>&#160;</p>
</blockquote>
<p>Great. With that and adding the –C argument to spawn-fcgi for 4 processes, everything seems to be stable.</p>
<h2>URL shorteners are fun</h2>
<p>Last week godaddy had a sale on .info domains, so I went and bought 2. <a href="http://c-17.info/">c-17.info</a> and <a href="http://j6k.info/">j6k.info</a>. j6k is going to be used for shorter URLs and c-17, well, has yet to be assigned a purpose. Last week I was using just some random script I found after a Google search. It was simple as could be, with just a form to add URLs, and tracked how many times a link was used in the DB. Nowhere was that small bit of info was available publicly.</p>
<p>Since it only tracked 10 URLs, 6 of which were tests, I decided to just reinstall the whole thing. With the right mix of keywords I found <a href="http://yourls.org/">YOURLS</a>, the most awesome open source URL shortener. It has an info page for each link, one of my favorite features of bit.ly. So I unzipped it and configured it. One problem I ran into which caused me to hit a road block for almost 12 hours was that it has an option for Base62 encoding (That’s [a-zA-Z0-9] for you regex nerds), which for some reason stalled PHP and raped the DB server. I’m still not able to fully track where in the code it’s failing, but I don’t feel like looking now.</p>
<p>On the site for YOURLS there’s a link for <a href="http://foolrulez.org/blog/2009/08/foolz-us-make-yourls-work-on-nginx/">nginx rewrites</a> however it has 3 problems.</p>
<ol>
<li>Doesn’t support uppercase URLs </li>
<li>Doesn’t support info page (url<u>+</u>) </li>
<li>Anime shit everywhere. I nearly puked looking at the page. </li>
</ol>
<p>I went ahead and fixed that, so here’s my modified code.</p>
<blockquote>
<pre>if (!-f $request_filename){
	set $rule_0 1$rule_0;
}
if (!-d $request_filename){
	set $rule_0 2$rule_0;
}
if ($rule_0 = &quot;21&quot;){
	rewrite ^/([0-9a-zA-Z]+)\+/?$ /yourls-infos.php?id=$1 last;
	rewrite ^/([0-9a-zA-Z]+)/?$ /yourls-go.php?id=$1 last;
}</pre>
</blockquote>
<p>Everything is working great now.</p>
<h2>Thanks for reading</h2>
<p>This is the longest blog post I’ve written to date, and I think it contains valuable information for everyone. If I’ve missed anything that you want to know about leave a comment.</p>
<p>Also a big thanks to whoever made <a href="http://sprunge.us/">sprunge.us</a>, I love your service, it makes my life so much easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/nginx-php-cgi-and-url-shorteners/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Computer Update</title>
		<link>http://compwhizii.net/index.php/2010/computer-update/</link>
		<comments>http://compwhizii.net/index.php/2010/computer-update/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 17:00:00 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[computer]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/computer-update/</guid>
		<description><![CDATA[Update: for those of who are here looking for what WAITSWAP means, it would seem that it&#8217;s for when a your return is awaiting a replacement part or item.
So I finally found the tracking number for my box, and according to UPS it had made it to California okay. Unfortunately that&#8217;s not what ASUS was [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> for those of who are here looking for what WAITSWAP means, it would seem that it&#8217;s for when a your return is awaiting a replacement part or item.</p>
<p>So I finally found the tracking number for my box, and according to UPS it had made it to California okay. Unfortunately that&rsquo;s not what ASUS was saying. This was Sunday night and the box had arrived on Friday. Being hopeful that the box was simply sitting in the returns center awaiting checkin I let it be.</p>
<p>On Tuesday I remembered that I should look up on how the repair was going. To my delight the repair status said that it was in final testing. If all they did was put a new BIOS chip in like support said, the mobo still shouldn&rsquo;t work.</p>
<p>Wednesday: New status for the motherboard, &ldquo;WAITSWAP&rdquo;. This isn&rsquo;t on their step list (Product Received &gt; (Waiting) &gt; Repairing &gt; Final Testing &gt; Packing &gt; Ready for Shipping &gt; Repair Finished), so I&rsquo;ve come to the conclusion that this means one of four things.</p>
<ul>
<li>They&rsquo;re moving the board from final testing to packaging</li>
<li>They&rsquo;re waiting for people/parts for repairs</li>
<li>They&rsquo;ve said fuck it and are looking for a replacement for me</li>
<li>They&rsquo;re out buying an i7 system for me</li>
</ul>
<p>Okay so maybe not the fourth one, but still it&rsquo;s fun to take guesses.</p>
<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb1.png" width="600" height="395" /></a> </p>
<p>And my name isn&rsquo;t John Duhard.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/computer-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>compwhizii in a tuxedo</title>
		<link>http://compwhizii.net/index.php/2010/compwhizii-in-a-tuxedo/</link>
		<comments>http://compwhizii.net/index.php/2010/compwhizii-in-a-tuxedo/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 03:33:35 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/compwhizii-in-a-tuxedo/</guid>
		<description><![CDATA[
Yeah. A Tuxedo. I’m performing in a choir tonight for our school. It’s pretty cool.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://phodroid.s3.amazonaws.com/10/01/r349ax.jpg" width="600" height="450" />
<p>Yeah. A Tuxedo. I’m performing in a choir tonight for our school. It’s pretty cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/compwhizii-in-a-tuxedo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenPeer update</title>
		<link>http://compwhizii.net/index.php/2010/openpeer-update/</link>
		<comments>http://compwhizii.net/index.php/2010/openpeer-update/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:30:25 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[openpeer]]></category>

		<guid isPermaLink="false">http://compwhizii.net/?p=147</guid>
		<description><![CDATA[For those of you wondering what we&#8217;ve been doing, the honest truth is that not much has gotten done. For the last week I&#8217;ve been too busy to delegate out tasks to people, and doing it all from my netbook isn&#8217;t helping. However, I am happy to share that I finished writing the deployment system [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you wondering what we&#8217;ve been doing, the honest truth is that not much has gotten done. For the last week I&#8217;ve been too busy to delegate out tasks to people, and doing it all from my netbook isn&#8217;t helping. However, I am happy to share that I finished writing the deployment system for the developers.</p>
<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://compwhizii.net/wp-content/uploads/2010/01/image_thumb.png" width="600" height="262" /></a> </p>
<p>The OpenPeer deployment system basically takes the pain out of loading code for testing. The process for reloading a site with new code is simply pressing the reload button. The system then will:</p>
<ol>
<li>Lock the site from being reloaded by someone else </li>
<li>Remove all files inside the site’s folder </li>
<li>Checkout the code from our SVN repository </li>
<li>Copy configuration and other files from a template folder </li>
<li>Run SQL files in the _deploy folder to insert table structure and test data </li>
<li>Unlock the site </li>
</ol>
<p>The amount of time this tool will save us is very much worth the 3 hours it took to write and debug it.</p>
<p>Also this weekend I got around to installing and configuring nginx on vps2. It does a very good job and is much more memory efficient and quicker then apache. I still have apache running on an alternate port for SVN, and yet it manages to use up RAM. Oh well.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/openpeer-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Nexus One Widgets on Motorola Milestone/Droid</title>
		<link>http://compwhizii.net/index.php/2010/nexus-one-widgets-on-motorola-milestonedroid/</link>
		<comments>http://compwhizii.net/index.php/2010/nexus-one-widgets-on-motorola-milestonedroid/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 20:39:31 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[droid]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/nexus-one-widgets-on-motorola-milestone-droid/</guid>
		<description><![CDATA[The new Nexus One by Google has a new widget for weather and news, and it&#8217;s very slick. This new widget should be available in Android 2.1, however, if you&#8217;re impatient or your phone won&#8217;t be getting an update any time soon (I&#8217;m looking at you G1 users), you can install the Widget yourself. wpbcubsfan [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://compwhizii.net/wp-content/uploads/2010/01/IMG_0032.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px; padding-bottom: 5px" title="IMG_0032" border="0" alt="IMG_0032" align="right" src="http://compwhizii.net/wp-content/uploads/2010/01/IMG_0032_thumb.jpg" width="180" height="240" /></a>The new Nexus One by Google has a new widget for weather and news, and it&rsquo;s very slick. This new widget should be available in Android 2.1, however, if you&rsquo;re impatient or your phone won&rsquo;t be getting an update any time soon (I&rsquo;m looking at you G1 users), you can install the Widget yourself. <a href="http://forum.xda-developers.com/member.php?s=e2db416323f6e4792e5be22a16c9ccf8&amp;u=1055294">wpbcubsfan</a> on the <a href="http://forum.xda-developers.com/">xda-developers forum</a> released the widgets in apk form, extracting it from the 2.1 ROM. If you&rsquo;d rather not register to download it, I&rsquo;m hosting it. <a href="http://file.compwhizii.net/GenieWidget.apk">Download the widget here</a>.</p>
<p>Once MediaFire is done with their maintenance I&rsquo;ll be posting about rooting my Droid.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/nexus-one-widgets-on-motorola-milestonedroid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desktop is broken</title>
		<link>http://compwhizii.net/index.php/2010/desktop-is-broken/</link>
		<comments>http://compwhizii.net/index.php/2010/desktop-is-broken/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 04:03:31 +0000</pubDate>
		<dc:creator>compwhizii</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://compwhizii.net/index.php/2010/01/desktop-is-broken/</guid>
		<description><![CDATA[My desktop breaking has put a serious downer on my holiday. I mean, now that I have all this time I can’t do any real work with OpenPeer. It really sucks. Here’s the thread I made on Facepunch about it:
Right now I&#8217;m on my netbook as my main computer won&#8217;t start up. This whole problem [...]]]></description>
			<content:encoded><![CDATA[<p>My desktop breaking has put a serious downer on my holiday. I mean, now that I have all this time I can’t do any real work with OpenPeer. It really sucks. Here’s the thread I made on Facepunch about it:</p>
<blockquote><p>Right now I&#8217;m on my netbook as my main computer won&#8217;t start up. This whole problem started a few months ago, my computer would hang out of nowhere, the only way to reboot was to pull the plug as the reboot button did nothing. After I shut it down, it would take a few power cycles to get it through or to POST, afterwards on the first full boot into windows it would hang after a few minutes. Then I&#8217;d repeat this process and the computer would work fine for days. I never shut it down because if I did I&#8217;d need to do this all again.      </p>
<p>Finally last night while I was browsing facepunch then computer stalled again. Used to this I just flipped the power switch on the PSU, waited a few seconds, and let it cycle a few times. However, no matter what I did it just wouldn&#8217;t boot. It being 2AM I went to bed. After I got up this morning the computer still refused to boot. I did manage to get it to POST three times but the computer hanged in BIOS options and then in the bootloader, and finally during a memtest86+. It hasn&#8217;t POSTed since.      <br />I&#8217;ve tried a few troubleshooting steps with yumyum, but the computer still isn&#8217;t booting. We&#8217;ve tried </p>
<ul>
<li>All sorts of RAM combos (I have 2 2GB sticks and 4 slots) </li>
<li>Checking connections </li>
<li>Clearing the RTC </li>
</ul>
</blockquote>
<p>So finally the computer stopped working completely, and we called up ASUS. I’m surprised how quickly we got an RMA (Under 15 minutes). We only were asked a few questions and the tech decided to just have us send in the board. Cool. I went ahead and took apart the machine and threw the board in the anti-static bag that it came in. I wish I had packaging peanuts, thought I guess the airbags we had will do okay. </p>
<p>Afterwards we took the box to a UPS store. Surprisingly, these stores aren’t directly owned by UPS, it&#8217;s a separate company. As we’re waiting on line the only guy behind the counter is talking to this big hulky guy about how much the Jets suck and such. Whatever. One boring conversation later we’re up. We ring up the box, and fill out the forms, and pay $13.50. So when will it get there?</p>
<blockquote><p>A week from Friday</p>
</blockquote>
<p>Really? This is Wednesday mind you. What does this all mean? No computer for almost 4 weeks.</p>
<p>This sucks.</p>
<p> I had a receipt with a tracking number on it, however, I seemed to have misplaced it. I’ll post the tracking number when I find it.</p>
]]></content:encoded>
			<wfw:commentRss>http://compwhizii.net/index.php/2010/desktop-is-broken/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->