People seem to like my iTunes font size editor for Windows. A few people have asked for the same capability on a Mac.
Well, I don't have a fancy GUI for it, but I do have a command-line perl script. The script works for iTunes 10.x (tested up to 10.4).
There are instructions here.
Saturday, November 28, 2009
Thursday, October 29, 2009
Hilarious song
I was listening the weekly "Car Talk" podcast. They take several "breaks" in the show, during which they play car-related songs. To be completely honest, I always always skip them because the music is typically horrible. However, on this occasion I instantly recognized the notes of Beethoven's "Moonlight Sonata". In addition to the expected piano were hilarious lyrics about a driver being stopped at a red light. The melody of the song turns into drivers "beeps" of their horns.
It turns out the song is by a group called "Beethoven's Wig" that turns Classical songs into sing-a-longs (basically for children). You can preview and/or buy the song on iTunes.
It turns out the song is by a group called "Beethoven's Wig" that turns Classical songs into sing-a-longs (basically for children). You can preview and/or buy the song on iTunes.
Monday, September 28, 2009
The constantly-opening Help window...
One of my users came into my office today, complaining that the Microsoft Office "Help" window kept coming up. Every time she closed it, it would open right up again.
So I go in there, and sure enough, when I close the Help window, it comes right back up! But then I look down at the keyboard... it's on a sliding keyboard tray that can go under the desk. And that's exactly where it is now -- partly under the desk, with the F1 key jammed under there and held down.
After laughing my head off, I pointed out the problem, lowered the keyboard tray a quarter-inch, and told the user to be more careful!
So I go in there, and sure enough, when I close the Help window, it comes right back up! But then I look down at the keyboard... it's on a sliding keyboard tray that can go under the desk. And that's exactly where it is now -- partly under the desk, with the F1 key jammed under there and held down.
After laughing my head off, I pointed out the problem, lowered the keyboard tray a quarter-inch, and told the user to be more careful!
Labels:
keyboard,
silly user,
sysadmin
Tuesday, September 22, 2009
Resizing an NTFS partition with free tools
The guy that set up some of the Windows XP systems at work partitioned the drives to theoretically separate the OS (C:) from the data (D:). However, he didn't complete the process; i.e. he didn't move the default "Documents and Settings" folder, nor the "Program Files" folder to the "data" disk.
So, of course the "OS" partition eventually filled up with user data. A few months ago I moved the main user's Documents and Settings folder to the data drive, and used a junction point in the original location to point to it. That only staved off the disk filling up for a while -- this week I finally got around to deploying Office 2007, and the system didn't have enough space to install it.
I wanted to delete the "data" partition and consolidate everything into one partition. The old version of Partition Magic we had wouldn't boot the system for some reason, so I needed to find another tool to do it.
The answer: a Ubuntu 9.04 Desktop CD. The process is pretty simple. In summary, backup the data, delete all the NTFS partitions, recreate a single NTFS partition in the same cylinder space, then use ntfsresize to fix the NTFS partition.
So, of course the "OS" partition eventually filled up with user data. A few months ago I moved the main user's Documents and Settings folder to the data drive, and used a junction point in the original location to point to it. That only staved off the disk filling up for a while -- this week I finally got around to deploying Office 2007, and the system didn't have enough space to install it.
I wanted to delete the "data" partition and consolidate everything into one partition. The old version of Partition Magic we had wouldn't boot the system for some reason, so I needed to find another tool to do it.
The answer: a Ubuntu 9.04 Desktop CD. The process is pretty simple. In summary, backup the data, delete all the NTFS partitions, recreate a single NTFS partition in the same cylinder space, then use ntfsresize to fix the NTFS partition.
- Boot the system from the Ubuntu CD. At the boot menu, select "Try Ubuntu".
- Open a terminal (Applications, Accessories, Terminal) and sudo to root with
sudo -s
- Figure out which disk is the one you want. Likely candidates are /dev/hda (IDE) or /dev/sda (SATA). If you're not sure, use
dmesg | less
to find the disk device. - Start fdisk on the device (e.g. fdisk /dev/sda), and print the existing partition table. Note the cylinder numbers for where the current NTFS partitions start and end (especially the start of the first NTFS partition, and the end of the last NTFS partition).
- Delete all of the existing NTFS partitions. Then create a single new partition, starting at the same cylinder as the first partition, but ending at the cylinder number for the last NTFS partition.
- Mark the NTFS partition as bootable! Exit fdisk.
- Resize the partition to its maximum size using ntfsresize. Read the ntfsresize man page to learn how. You may also refer to this page on shrinking an NTFS volume (starting at step 8). For example, if the device size is 32079 MB, you may try
ntfsresize -n -s 32079M /dev/sda
If you don't get any errors, proceed by removing the -n option. If you get an error that the partition size cannot exceed the device size, reduce the size by 1MB (e.g. 32078M). - Reboot the system with reboot. Windows will run chkdsk, reboot, and then everything should work as before.
- Restore the data from the lost partition (D:).
Friday, July 31, 2009
command-line edit foswiki topics
We use foswiki at SDO for our "Local Operating Procedures" (LOPs). These many consist of numbered steps, with some metadata attached.
I recently was tasked to add a document number to the metadata. Easy, except with hundreds of documents, I didn't want to do this manually.
Each Wiki topic is a text document. The text document also stores the metadata (like the document number). Of course, since it's text it is easy to edit and script the edit with perl.
However, each topic text file also has an associated RCS file for versioning information. If you just edit the text file, the web page itself looks fine, but you can't see the change you made in the page's history (unless you make another change using the web interface).
But it turns out to be very easy to record your direct text file edits in RCS. Simply do
That's it! Now the edits you made from your terminal are visible in the topic's history.
I recently was tasked to add a document number to the metadata. Easy, except with hundreds of documents, I didn't want to do this manually.
Each Wiki topic is a text document. The text document also stores the metadata (like the document number). Of course, since it's text it is easy to edit and script the edit with perl.
However, each topic text file also has an associated RCS file for versioning information. If you just edit the text file, the web page itself looks fine, but you can't see the change you made in the page's history (unless you make another change using the web interface).
But it turns out to be very easy to record your direct text file edits in RCS. Simply do
rcs -l TextFileName.txt ## now make your changes using whatever method (manual, scripted, etc.), then: ci -mnone -t-none -wusername -u TextFileName.txt
That's it! Now the edits you made from your terminal are visible in the topic's history.
Labels:
command-line,
foswiki,
sysadmin,
twiki,
wiki
Sunday, July 26, 2009
WTF: drive-by Jehovah's witnesses?
On my way to work, I stopped to get gas. As I get out, a car pulls up on the other side of the pump, and I see an smiling old lady. She says "hi" or some other greeting and I replied with some meaningless friendly greeting ("morning", perhaps). I then proceeded to start pumping gas.
As I take my hand off the handle, to turn lean on the car to wait for it to finish, the old lady is RIGHT THERE next to me, trying to hand me a brochure of some kind. I looked down at it, and it reads "blah blah Jehovah blah blah" (I don't remember what the other words were).
WTF? Since when to Jehovah's witnesses do fucking drive-bys?
I was instantly angry. It's bad enough knowing these delusional people exist, let alone having them come by your home, and now apparently in public as you try to go about your day, to try to spread their bullshit!
"God does not exist", I said. "Now get away from me!" I glared at her, practically daring her to say anything else to me.
She wasn't a very good Witness, I guess, because she got away.
As I take my hand off the handle, to turn lean on the car to wait for it to finish, the old lady is RIGHT THERE next to me, trying to hand me a brochure of some kind. I looked down at it, and it reads "blah blah Jehovah blah blah" (I don't remember what the other words were).
WTF? Since when to Jehovah's witnesses do fucking drive-bys?
I was instantly angry. It's bad enough knowing these delusional people exist, let alone having them come by your home, and now apparently in public as you try to go about your day, to try to spread their bullshit!
"God does not exist", I said. "Now get away from me!" I glared at her, practically daring her to say anything else to me.
She wasn't a very good Witness, I guess, because she got away.
Labels:
delusions,
drive-by,
jehovah's witness,
religion
Thursday, July 16, 2009
Setting up a Linux system with a 3.5TB disk
As mentioned in my last post, I have this remote linux system with 3.5TB of disk, but broken into two LVMs. I want most of the storage to be in one big disk.
Today I had my remote monkey put the RHEL4 WS DVD in the machine and rebooted it. I entered the RAID BIOS (Dell PERC 5/i) to delete the existing virtual disks. I then created two new virtual disks -- one of 250GB for the OS, and one of the remaining 3.4TB for the data.
I booted from the RHEL DVD and entered "rescue" mode, because anaconda does not support making GPT disks. Then I entered
That's mostly it! I rebooted and ran anaconda this time, setting up LVM on /dev/sda (except /boot, of course). I left /dev/sdb alone.
Today I had my remote monkey put the RHEL4 WS DVD in the machine and rebooted it. I entered the RAID BIOS (Dell PERC 5/i) to delete the existing virtual disks. I then created two new virtual disks -- one of 250GB for the OS, and one of the remaining 3.4TB for the data.
I booted from the RHEL DVD and entered "rescue" mode, because anaconda does not support making GPT disks. Then I entered
parted /dev/sdb mklabel gpt mkpart primary 0 3571900M quitThen:
mkfs.ext3 /dev/sdb1Making the EXT3 FS took about 22 minutes.
That's mostly it! I rebooted and ran anaconda this time, setting up LVM on /dev/sda (except /boot, of course). I left /dev/sdb alone.
Wednesday, July 15, 2009
Want to convert partition table from MBR to GPT
One of the Linux (RHEL4) systems at work has about 3.5 TB of disk in a RAID configuration. Unfortunately, the guy who setup the system (not me) had apparently never heard of GPT before. So, he partitioned the RAID into two portions -- one of 2 TB, and the other 1.5 TB. Each of those partitions is managed by LVM.
Despite hours of searching, I am unable to figure out a way to convert these to one big 3.5 TB partition. The operating system is mostly installed on LVM-managed parts of the disk, so I can't destroy the partitions and redo them without reinstalling the OS.
The best part is that the system is 2,000 miles away. Fortunately, we recently installed a digital KVM switch to the system. We also have someone there that can manage to insert the installation CD. With the KVM I can reconfigure the RAID and reinstall the OS remotely.
By the way, if you are thinking of getting an Avocent KVM switch, and you want to use LDAP authentication -- well, you better have Active Directory, because Avocent's crappy software does not allow you to configure the LDAP authentication query. In addition, their tech support seems to be both clueless and illiterate.
Despite hours of searching, I am unable to figure out a way to convert these to one big 3.5 TB partition. The operating system is mostly installed on LVM-managed parts of the disk, so I can't destroy the partitions and redo them without reinstalling the OS.
The best part is that the system is 2,000 miles away. Fortunately, we recently installed a digital KVM switch to the system. We also have someone there that can manage to insert the installation CD. With the KVM I can reconfigure the RAID and reinstall the OS remotely.
By the way, if you are thinking of getting an Avocent KVM switch, and you want to use LDAP authentication -- well, you better have Active Directory, because Avocent's crappy software does not allow you to configure the LDAP authentication query. In addition, their tech support seems to be both clueless and illiterate.
Friday, July 10, 2009
Make the Windows XP Calculator always start in scientific mode
I got very tired of having to select "View..Scientific" every time I started the calculator (calc.exe).
It turns out that if you are a non-administrative user (you're not doing daily work as an admin, are you?), then it doesn't save the last-used state.
To make the calculator start in scientific mode every time, edit C:\WINDOWS\win.ini, and add this:
[SciCalc] layout=0
If you're using Vista, you can set it in the registry
Labels:
calc,
calculator,
scientific mode,
windows
Subscribe to:
Posts (Atom)