Restoring Ubuntu 10.4's Bootloader, after a Windows 7 Install

I installed Windows 7 after I had installed Ubuntu 10.4. Windows 7 overwrote the Linux bootloader “grub” on my master boot record. Therefore I had to restore it. I used the Ubuntu 10.4 LiveCD to start up a live version of Ubuntu. While under the LiveCD, I then restored the Grub bootloader by chrooting into my old install, using the linux command line. This is a fairly complex thing to do, and so I recommend you use this approach only if you’re are confident with the linux command line: ...

July 13, 2010 · 2 min · David Craddock

Windows 7 Gaming on my Macbook

I have a 2006/2007 Core 2 Duo 2.6ghz white macbook, that I use regularly for internet, music, watching films, itunes and integration with my iPhone. I wanted to turn my desktop PC into a ‘work only’ Ubuntu Linux machine, so that I don’t get distracted when I’m supposed to be doing something else. But I still have a lot of PC games that I wanted to play on the Macbook, so I decided to try and setup a windows environment to play games on using Bootcamp 2.0 to create a dual-boot OSX/Windows 7 configuration. ...

July 1, 2010 · 2 min · David Craddock

Ripping Movies onto the iPhone

I’m currently watching Persepolis, the 2008 animated film about a tomboy anarchist growing up in Iran. I’m watching this on my new iPhone 3GS, and the picture and audio quality is very good. Here’s what I used to convert my newly bought Persepolis DVD, for watching on the iPhone. 1x Macbook (but you can use any intel mac) 1x iTunes 1x RipIt - Commercial Mac DVD Ripper (rips up to 10 DVDs on the free trial, $20 after) 1x Handbrake 32 - Freely available transcoder 1x VLC 32 - Freely available media player 1x DVD ...

May 17, 2010 · 3 min · David Craddock

Decent Graphics for Flash Games

Lately I’ve been thinking about making a Flash game or application. Although I haven’t made one yet, my current understanding is that most projects of this type require a lot of artwork. I found this article, and was impressed at the quality and the resources mentioned: http://freelanceflashgames.com/news/2009/03/25/the-big-guide-to-hiring-an-artist/

May 17, 2010 · 1 min · David Craddock

Wordpress HTML edit mode inserts BR tags sometimes when you add a carriage return..

This is something that was quite annoying today, as I was struggling to use Wordpress 2.9.2 to align some pictures in the HTML mode of editing a page, on a client’s website. It turns out that Wordpress was adding BR tags sometimes when I hit return.. and sometimes not. The annoying thing was, although the BRs were outputted in the resultant Wordpress site, the BRs were not visible in the Wordpress HTML edit mode itself.. meaning they were invisible and undetectable until I viewed the resultant website source and finally figured it out. ...

April 28, 2010 · 1 min · David Craddock

Forkbombs and How to Prevent Them

A forkbomb is a program or script that continually creates new copies of itself, that create new copies of themselves. It’s usually a function that calls itself, and each time that function is called, it creates a new process to run the same function. You end up with thousands of processes, all creating processes themselves, with an exponential growth. Soon it takes up all the resources of your server, and prevents anything else running on it. ...

April 2, 2010 · 3 min · David Craddock

How to remove nano, vim and other editors' backup files out of a directory tree

Linux command-line editors such as nano and vim often, by default, create backup files with the prefix of “”. I.e, if I created a file called /home/david/myfile, then nano would create a backup in /home/david/myfile. Sometimes it doesn’t delete them either, so you’re left with a bunch of backup files all over the place, especially if you’re editing a lot on a directory tree full of source code. Those stray backup files make directory listings confusing, and also add unnecessary weight to the commits on source control systems such as svn, cvs, git.. etc. If you’re working on a programming team with other people, then it causes further problems and confusion, because person A’s editor can accidentally load person B’s backup file.. etc etc. Nightmare. ...

March 22, 2010 · 2 min · David Craddock

Tip for watching the completion of a large file copy

Forget the wonderful windows progress bar, and imagine I’m in the world of command-line Linux, and I want to copy a 484MB file, called VMware-server-2.0.2-203138.i386.tar.gz, from my home directory to a remote server. But I want to figure out how long it’s going to take. 1. First I can run a “du -m” command to get the total MB size of the original file: du -m /home/david/VMware-server-2.0.2-203138.i386.tar.gz I.e: david@believe:~$ du -m VMware-server-2.0.2-203138.i386.tar.gz 484 VMware-server-2.0.2-203138.i386.tar.gz ...

March 20, 2010 · 2 min · David Craddock

The Linux Root Directory, Explained

It’s helpful to know the basic filesystem on a Linux machine, to better understand where everything is supposed to go, and where you should start looking if you want to find a certain file. Everything in Linux is stored in the “root directory”. On a windows machine, that would be equivalent to C:. C: is the main folder where everything is stored. On Linux we call this the “root directory”, or simply “/”. To go up to this root directory, type: ...

March 20, 2010 · 5 min · David Craddock

Useful OSX commands for Linux users

I wrote this list to remind me, as a newcomer to OSX, how the command line differed from the Linux commandline. I thought I’d expand on it, and share it: To mount any iso: hdiutil mount sample.iso To download a file as you would using wget: curl http://ftp.heanet.ie/pub/linuxmint.com/stable/8/LinuxMint-8.iso -o linuxmint.iso -C - the -o specifies the output file (required) the -C - specifies automatically resuming if possible. To burn a bootable iso to CD, DVD or USB key: use the “diskutil” program as described in: http://forums.macrumors.com/showthread.php?t=598291 Monitor disk io utilisation.. poll once per second ...

March 19, 2010 · 1 min · David Craddock