{ Josh Rendek }

<3 Go & Kubernetes

A week or so ago the HDD started failing on my web server, so I had the DC clone the HDD for me. Some files however got lost in transit (bad sectors) and when I was trying to install nginx to get some testing done, I kept getting this error:

Apparently it wasn’t finding GCC, even though it was definitely installed. After looking around a bit at the system and talking with a few people on IRC #linux, found out that some header files and other files were missing from /usr/include. Here is an example of some of the errors I got with a simple hello world C++ program:

The solution was to go to another server (which I have several) of the same architecture, and SCP (or rsync, take your pick) the /usr/include directory over.

Problem solved.

Servly is now free!

Sep 4, 2010 - 1 minutes

Get free server monitoring: free server monitoring at servly.com

Here are the two build orders I’ve been able to glean from watching replays and trying them out myself. The first is the Terran Barracks FE (fast expand) tactic:

The terran build is a 3M (Marine / Marauder / Medvac ) tactic, the idea is to quickly secure your natural expansion, and then just build up defenses using the 3M’s to ward off any attacks. Once your opponent has thrown their forces at you (and been destroyed, dont forget to use stim packs!), you can make a quick counter and wipe them out.

Zerg is pretty much a standard one, and focuses on being very agressive as early as possible, this can be pushed into a muta/hydralisk build as well. Zergling rushing is really good, especially if can get past their choke and into their harvesters and just let them run free to cripple their economy.

Ruby: 4 chan download script

Sep 4, 2010 - 1 minutes

I wrote a quick little ruby script to download images off of 4 chan (the mecha channel for instance, although it could be changed to download nature/animal for wallpaper rotator or something else interesting):

We’re working with micro-controllers this semester and were told we needed CodeWarrior - the version we use in the lab was version 5.0 so I went ahead and downloaded that for home use (they have a Special free edition for students). BAM. Problem, the wizard would unpack everything then after the copying files step it would say : “The wizard was interupted while installing….” etc. I tried several fixes, one of them involved installing the Windows XP virtual machine, installing it in there, and then copying the files over. No dice, as the DLL’s weren’t registering and the regserv.bat file they used wasn’t working either to install them.

Solution: find the buried 5.1 version on their website that works on 64 bit windows. None of the forum posts or other articles I found on google had this as a link. http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-SUITE-SPECIAL&amp;nodeId=0127262E703BC5&amp;fpsp=1&amp;tab=Design_Tools_Tab

Mac Pro: Windows 7 64 Bit Boot camp

Sep 4, 2010 - 2 minutes

After about 3 hours yesterday of banging my head on the desk, and re burning copies of my windows 7 disk thinking it had scratches, it ended up being the boot records that were FUBAR’d. I would go through all the steps, install everything, enter my user information and then it would go into its final and fourth reboot sequence, but would then stop at a black/blank screen with a blinking cursor. If I still had the DVD in it would say “Press any key to boot from the CD or DVD…._” where _ is the blinking cursor that appeared when Windows was really supposed to boot up.

A lot of the Apple forums etc said to reset your RAM, etc, however the REALLY wierd part about this was that inside OSX I could boot into the bootcamp partition with Parallels, but booting into windows normally wouldn’t work, so I knew the installation was fine.

The problem was with the master boot record. Insert the DVD and boot from it, go to “Repair” and choose the restore from image option(s)… It wouldn’t find anything so I just click cancel on that and it brought me to the Repair Menu where it has things like Fix boot records, command prompt, etc. The Fix wizard wasn’t working for me, so I had to go into the command prompt and type these commands in:

Press enter after each one. the /RebuildBcd command complained and said : “Windows installations found: 0” however it said the command completed successfully. Close out of the command prompt, reboot, and enjoy your bootcamp!

If you have an SSD and plenty of available memory you should see a significant increase in performance when using this. I have 2x Core i7 - 8GB RAM, ATI Radeon HD 4800 series and a 128GB SSD. I first noticed some issues when a few apps started to slow down (if you can call it that when running with a solid state ;) ) - anyways, the memory management portion of Mac OS X is “special” in the sense that it’s horrible.

I would have 6GB of memory free and it would be paging into swap memory and causing read/writes to my SSD. Of course this is bad anyways for a SSD to be used like that, so the solution was to simply turn off swap usage.

For others doing this, make sure you have enough memory, or you’ll run into issues. To turn off swap run the following commands in terminal:

Reboot and your done. I keep Activity Monitor running on the side so I can see how much memory is being used so I don’t crash, but even with RubyMine open or playing StarCraft II I still usually have at least a GB or two of memory free.

[caption id=“attachment_381” align=“alignnone” width=“637” caption=“I set the inactive and free colors the same since they are, in essence, the same for what I want to watch.”][/caption]

And here is a shot of my OSX bar and how it looks to show free memory:

I keep all my Rails stuff in one folder (called apps) and I needed to clean up some disk space to keep my SSD sane, so I wrote this quick little ruby snippet to go through each directory and compress it:

Couldn’t figure out why my Starcraft II wasn’t letting me login (or show up) on my desktop (but was on laptop): Go ~ Documents / Blizzard / Starcraft II

Make a new folder called tmp (or just move it all to the trash) and move the folders and everything in there inside that folder. Load the game and all your settings should be reset and the login screen should show up again.

MAC: Syncing Calendars between mac's

Aug 22, 2010 - 1 minutes

I work when I’m at home on my mac pro, but when I have to go places I want to use my mac book pro but make sure all my calendar information is up to date. After Google’ing around a bit, i found some applications but they were $50+ so here are few easy steps to sync from one computer to another for iCal:

Step 1: Get your other computer’s IP address, and make sure SSH login is enabled

Step 2: Sync your SSH keys so you dont’ have to type your password everytime:

Step 3: rsync your calendar data over

Step 4: crontab -e (to edit your crontab)

And done, this will sync your calendar every hour to your other mac from your main computer