Tuesday, August 26, 2008

Automount External USB Hard Drive in SuSE 10.3

To automount an external USB hdd in OpenSuSE 10.3 and up, just follow these simple instructions:

First, create a new directory to mount the external HDD:
mkdir /media/usb-hdd
Next, modify /ets/fstab to include a new label entry for the external HDD. You can label it anything you want without spaces.
LABEL=YOUR-HDD-LABEL /media/usb-hdd ext3 auto,nofail,defaults 1 2
Finally, create a script in /etc/udev/rules.d/ called 99-mount.rules containing the following command:
#run mount -a everytime a block device is added/removed
SUBSYSTEM=="block", run+="/bin/mount -a"
Now, whenever you boot into OpenSuSE, the external USB hdd labeled YOUR-HDD-LABEL will be automatically mounted.

Monday, August 25, 2008

Mounting USF/USF2 BSD Filesystem in Ubuntu Linux

Ubuntu only supports read-only of BSD filesystems (USF/USF2). To mount the disk just issue the command:
mount -r -t ufs -o ufstype=44bsd /dev/yourdevice /mnt/destination


Thursday, July 03, 2008

Getting a List of Installed System Fonts in Java

Previously, you could get a list of fonts installed in the running system by using using the Java AWT Toolkit:
Toolkit tk = Toolkit.getDefaultToolkit();
String[] fontNames = tk.getFontList();
However, the Toolkit.getDefaultToolkit() method has been deprecated in favor of the java.awt.GraphicsEnvironment. The GraphicsEnvironment class describes the collection of java.awt.GraphicsDevice objects and java.awt.Font objects available to a Java application on a particular platform.

To get a list of font names installed on the system, just use the the getLocalGraphicsEnvironment() method:
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontnames = ge.getAvailableFontFamilyNames();
There are many other usefull methods in GraphicsEnvironment class, for more information, take a look at the API.

Wednesday, April 16, 2008

Update

WOW! It's been a well over a year since I last posted on my blog. I'd like think it's because I've been busy, but it's mostly a combination of being busy, being lazy, and not finishing what I started.

Well, based on a suggestion from my former CTO, it would be good for my career to get back into blogging. However, I'll be changing what I'll be posting. Instead of concentrating about my life and personal stuff, I'll be blogging more about technology and programming problems in hopes of helping out other people who have run into the same problem and are looking for a solution. That's not to say I won't be blogging about my life completely, I'll just be blogging about the cool and interesting events.

Alot has happened in the past year-and-a-half, so here's a quick run down:
  • Got a new job at Integrated Services, Inc. in October 2006 to take on a more senior role and work on some cool technologies like Eclipse RCP and SWT.
  • Went on a bunch of hiking and camping trips (be sure to check out my gallery).
  • Went on a Summer vacation to Guam after seven long years. Had some of the best times of my life while visiting some relatives and old childhood friends.
  • Got a new job at ARRIS as a Software Application Engineer in April 2008. I felt like I've done and learned as much as I can at ISI. "If you find yourself the best person in the band, it's time to find a new band." - Pat Metheny
That's where I stand right now, starting the new job and getting ready for the Summer. Oh, I forgot to mention, I was able to partially tear my MCL while skiing this pass Winter. My knee still hurts and it will be another couple weeks until I'll be able to start doing anything intensive. During my recovery, I'll have alot more time on my hand, so be sure to check back for updates to my blog!

Tuesday, January 16, 2007

Snow Storm


The past week saw cold spells in the NW causing temperatures to drop at or below freezing. Where I live and work in the Beaverton/Tigard area, temperatures got as low as the teens (Fahrenheit) at night; the day didn't get much warmer. The one good thing about the cold spell was that it was pretty sunny during the day with very little wind.

That all changed today. Around 5:00 AM, the Portland-metro area woke up to a blanket of white snow. It snowed pretty heavily for most of the day and afternoon - some places saw around 3-5" of snow. It was the most snow I saw in the metro area since I moved here 6 years ago.

The roads were pretty bad, so I decided to skip work and stay home (I doubt my Z would have made it through all that snow). For the better part of the day, ODOT even required all vehicles to be equipped with chains or traction tires. All schools in Washington Co. were closed, along with other schools in the surrounding area. There were countless fender-benders across the area, many road closures, abandoned automobiles, and minor injuries caused by this snow storm. The worst part of all this will be when the snow starts to melt in the next day, but then refreeze at night, causing dangerous black ice.

You can take a look at the pictures I took around my apartment in my album.