Blog
Feb 5, 2010
So, I recently had to fix an ubuntu install after Windows had been reinstalled onto the drive.. end result: of course Windows tromped over the MBR and wiped out grub, making the computer automatically boot into windows. The fix is to get booted into Ubuntu and reinstall grub. If you're a debian user, the best way I found to do this is:
- Download the Ubuntu liveCD for whatever version of ubuntu you are trying to fix. Don't forget to download the 64bit version if you're trying to fix a 64bit install of Ubuntu.
- Do a google search for the usb-creator package for a not quite cutting edge version of ubuntu. While it would be awesome if this package were in debian, I'm sure the demand for it is pretty low, since it seems to be an Ubuntu creation. I am running Debian Squeeze/testing, and had good results using the usb-creator from Jaunty, which can be found here. (It'd be nice if you could just dd the iso to the usb drive and have it work, but alas I tried that, and it does not boot.)
- Download and install usb-creator via dpkg -i
- Insert a USB disk that you don't mind getting wiped, run usb-creator, select your liveCD iso file and usb disk, click format, and then Create disk.
- Wait forever.
- Pop the USB stick into the busted machine, and boot from the usb drive into the first menu with the install options.
- Move the cursor over the first option for "Try Ubuntu Live CD without changes" and press <TAB> to edit the menu command. Replace the boot=whatever parameter with root=/dev/sdXY, where sdXY is whatever partition your Ubuntu install is on.
- Press <ENTER> and boot up into your Ubuntu install.
- Open up a terminal, run sudo bash to get to a root shell.
- Run update-grub to update your grub configuration file.
- Run grub-install /dev/sdX, where sdx is whatever drive you boot off.. probably sda. (NOT sda1)
Once that finishes successfully, you should be able to reboot the machine and grub will start up, allowing you to select what install you which to use. There might be an easier way to do this, but since I'm not a regular Ubuntu user, this is what I found through web searchs and trial and error. If someone has an easier way, please do fire me an email and I'll update this post.
Dec 20, 2009
I'm not sure when it happened, since I don't use it all that frequently, but firefox/iceweasel changed the default behaviour of Ctrl+Scrollwheel from Zoom in/out to moving back and forth in history. If you want to change it back to controlling the zoom of the page, you can open about:config and change mousewheel.horizscroll.withcontrolkey from its default value of 0 to a value of 3. There are other values you can set that have other functions.. If you're interested, I found the info at http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries.
Aug 29, 2009
I used to have a Supybot, but I eventually got rid of it because I didn't want to have to use python to make it do things.
I instead got myself a bender bot (a BasicBot::Pluggable perl bot) from dave0. I wanted a calculator for it, so I whipped up GoogleCalc. GoogleCalc uses the power of google's calculator and will respond to calc commands in channel. It's awesome, only because google calculator is awesome.
Note: There is an existing Google Calculator BasicBot module, but it seemed much more complicated than I needed and didn't come with examples or docs as to how to install it in a bender bot. It's entirely possible it's not supposed to be installed into a bender bot. This way seemed much easier.
Grab GoogleCalc.pm and copy it into your modules directory, and edit your yml config file to load it on startup. Talk to it via the calc command.
I instead got myself a bender bot (a BasicBot::Pluggable perl bot) from dave0. I wanted a calculator for it, so I whipped up GoogleCalc. GoogleCalc uses the power of google's calculator and will respond to calc commands in channel. It's awesome, only because google calculator is awesome.
Note: There is an existing Google Calculator BasicBot module, but it seemed much more complicated than I needed and didn't come with examples or docs as to how to install it in a bender bot. It's entirely possible it's not supposed to be installed into a bender bot. This way seemed much easier.
Grab GoogleCalc.pm and copy it into your modules directory, and edit your yml config file to load it on startup. Talk to it via the calc command.
15:10:02 [ ManOnIRC] MagicBot: calc 1 + 2
15:10:03 [ MagicBot] ManOnIRC: 1 + 2 = 3
15:10:15 [ ManOnIRC] Thanks MagicBot! You rock!
15:10:03 [ MagicBot] ManOnIRC: 1 + 2 = 3
15:10:15 [ ManOnIRC] Thanks MagicBot! You rock!
Aug 29, 2009
As a person that dabbles alot in electronics, I happen to do alot of searching for parts on Digikey. As a person that doesn't like using the mouse when I'm at the computer, I use a lot of Vimperator. It seems only natural for me that these two things should be combined.
Today, I sat down and wrote a vimperator plugin to search digikey for part numbers. You can download it at http://github.com/geemoo/vimperator-digikey_search/tree/master. To install the plugin, copy the js file into your ~/.vimperator/plugins directory. If the plugins directory doesn't exist, you should create it first.
Today, I sat down and wrote a vimperator plugin to search digikey for part numbers. You can download it at http://github.com/geemoo/vimperator-digikey_search/tree/master. To install the plugin, copy the js file into your ~/.vimperator/plugins directory. If the plugins directory doesn't exist, you should create it first.
Jun 23, 2009
I've been thinking about learning morse code (AKA CW) for a while, and after last weekend, I've finally convinced myself that I want to do it. So, my first step was to write myself a little script to generate CW practice files that I can listen to on the bus rides to work. Running the script will generate a text file, and an mp3 file. The general idea is that you load up mp3 file onto your ipod, decode the message on paper (or in your head, if you're that good), and then compare it against the text version to see how many mistakes you made.
The script uses an assortment of tools, all of which were fairly easy to acquire. The list comprises the following: QSO, sox, lame, cwpcm and ofcourse bash. You can get the list of tools by doing a apt-get install morse lame sox. cwpcm you have to compile from source, I'm afraid. You can grab it at http://cwtext.sourceforge.net/.
Once you've got all that, run it at your command line, with the number of samples you wish to generate. If you're going to make a large number, I recommend going for coffee. The mp3 conversion step is time consuming. At the top of the script, there are two variables you can play with.. the characters per minute, and the words per minute, which affect the speed that the morse is played at.
You can download the script at http://geemoo.ca/files/gencw.sh.
The script uses an assortment of tools, all of which were fairly easy to acquire. The list comprises the following: QSO, sox, lame, cwpcm and ofcourse bash. You can get the list of tools by doing a apt-get install morse lame sox. cwpcm you have to compile from source, I'm afraid. You can grab it at http://cwtext.sourceforge.net/.
Once you've got all that, run it at your command line, with the number of samples you wish to generate. If you're going to make a large number, I recommend going for coffee. The mp3 conversion step is time consuming. At the top of the script, there are two variables you can play with.. the characters per minute, and the words per minute, which affect the speed that the morse is played at.
# ./gencw.sh 50 cw-4WPM-8CPM-0001.... cw-4WPM-8CPM-0002.... cw-4WPM-8CPM-0003.... <and so on>
You can download the script at http://geemoo.ca/files/gencw.sh.


