Archives

All posts for the month June, 2007

Sometimes I have to use Windows. However, life isn’t always TOO bad. There is a vim port for windows. However, it does have some default settings that really drive me crazy.

If you have ever installed it, you know what I mean. When you open any file, it creates a temporary swap file. This is fine in Linux, because I always have multiple terminals doing multiple things at once. However, we don’t have that in Windows. Don’t pretend you do. The other setting is the automatic backup option. Open a file, edit, then save. It will create a backup of the original file. To me, that’s not needed.

To fix this, go to your _vimrc file. The default location is in C:\Program Files\Vim. Add these lines to the bottom of the file, and you are all set:

set nobackup
set nowritebackup
set noswapfile

Save and exit. Simple when you know how.

I am EXTREMELY paranoid. Read that again: EXTREMELY paranoid. I tend to back up important data two or three times to multiple locations. It’s just not worth the headache of losing it. So kids, here is a quick and dirty bash script to dump all of your MySQL databases and compress them into individual archives. I know it’s not rocket science, but can it, it works.

#!/bin/bash
password="mysqlrootpassword"
backupdir="/home/backup/mysqldumps/"
cd $backupdir
for database in $(mysql --password=$password -e "show databases" | grep "^\|" | grep -v Database);
do
  mysqldump --password=$password $database | bzip2 > $database.sql.bz2;
done
chmod 600 $backupdir/*

Please excuse the ugly spacing, the wordpress theme seems to have chopped it up a bit.

scp resume

For years I wished that there was a resume option for scp. After a bit of Google work, along with some testing, I now have one using our good friend rsync. Stick this in your .bashrc

alias scpr="rsync --partial --progress --rsh=ssh"

Simple. If you are strange and don’t use bash, stick that in your specific shell’s startup file.

Although not exactly what I was hoping for, it is about time SOMETHING happened. Finally, the Flyers signed Antero Niittymaki to a two year deal. They expect him to back up the newly signed Marty Biron. For most normal NHL teams, the backup goalie doesn’t tend to see a lot of ice time. However, with the non-normal Flyers, they tend to split the duty about 60%-40%. Of course, with a completely new coaching and administrative staff, things may change. Let’s just hope the future will be bright for the Flyers.

If I have to go through what I did last season, I’m not sure how long my heart will last.

After quite a long time, I finally finished reading Watchmen. I really did enjoy it. Much more then I thought I would. Alan Moore, the writer, does tend to get a little overzealous in some political regards, but once I looked past that, I enjoyed it thoroughly. I will look into more of his work and will most likely pick up The League of Extraordinary Gentlemen series. I’ve already watched the movie, which I know is bad form. Movie before book = bad bad bad.

So much to do, so little time.