Tuesday, November 27, 2007

$363 19" All-In-One PC

George Ou is a crazy man, his projects like this are what keeps me coming back to his blog. If you have 5 minutes read the blog post and check out the pictures.

The $363 19-inch dual-core all-in-one LCD PC by ZDNet's George Ou -- This is the new all-in-one Intel dual-core 2.0 GHz E2180 19″ LCD PC computer I built for the family. The shocker is that I did it for less than $363 in parts (not including keyboard and mouse). The 19″ LCD (1440×900 resolution) was on sale for $140 and the dual-core Intel CPU/Motherboard/graphics was on sale [...]

Monday, November 26, 2007

Mount Disk by UUID

Have you ever been in a situation where you are wanting to mount your disk drives (USB, ATA, SATA, Firewire, etc.) by some unique identifier due to the occasional weirdness where you get the joy of what used to be your USB thumb drive -> /mnt/disk is now /mnt/disk2? If not then move on and pretend like you never stumbled across this post, if you have been scratching your head or read a convoluted solution that was driving your crazy this is your post.

The most consistent way I've found is to mount a device by the device's UUID, also known as its Universally Unique Identifier. What this alpha numeric looks like can depend on the device but I've yet to discover two devices that have the same UUID.

In the example below we'll assume we want to mount /dev/sda1 as /media/windows

Step 1 - Get the UUID of your drive by executing the following:
user@machine ~> sudo vol_id -u /dev/sda1
208861208860Z1A6


Step 2 - Add the proper line to your /etc/fstab file to property mount the partition in the future, snippet below:
# /dev/sda1
UUID=208861208860Z1A6 /media/windows ntfs defaults,umask=007,gid=46 0 1


Another example which mounts a FAT32 partition:
# dev/sda#
UUID=A123-B456 /media/fat32 vfat gid=46,umask=000 0 1

If you wish to 'reload' the fstab file instead of rebooting:
user@machine ~> mount -a

Retrieve System Information

As usual with Linux (and Windows in some cases) there are multiple ways to accomplish the same task but here is one for getting information on disks, usb devices, etc. attached to your computer.

user@machine:~$ sudo lshw

The listing can be quite long so don't forget to run it with the less, more or grep if you just want to see if a particular device is installed. For example if I wanted to check if one of my PQI mini-flash memory sticks was installed.

user@machine:~$ sudo lshw | grep pqi
vendor: pqi


If you're allergic to the command line use the GUI by installing lshw-gtk.

Tuesday, October 30, 2007

Setting up a Linksys NSLU2 with Debian

In case you've been out of the loop for awhile there is a nice little network device called NSLU2 put out by Linksys. It is not the perfect device nor the end all solution to having a small machine that can run multiple USB drives as well as other USB accessories however it is cheap and has a large following which helps if you're not one of those types that likes to spend long weekends figured out things. Even if you do atleast you can easily get the operating system installed and get moving on to the business at hand.

As of right now there are a few issues with the default Debian installer so the manual method must be used however it is fairly simple. The first order of business is to download the Debian image to install on the NSLU2. Finally just head over to Martin's How-To and you should be up in running in no time.

Best wishes.

Monday, October 29, 2007

Scan for Wireless Networks on Ubuntu

Now that I'm beginning to travel more I run into situations where I need to search for wireless networks. Since I'm running Xubuntu some of the utilities that would exist in the more full featured desktops do not exist in Xubuntu but I found a few alternatives.

One solution is to install the wifi-radar package. Another that I found was running the following commands:

user@machine ~> sudo iwlist scan
user@machine ~> sudo iwconfig wlan0 mode Ad-Hoc {In this example wlan0 is the name of the wireless inteface}

The interface can also be edited with:
user@machine ~> sudo iwconfig

Test nginx Configuration File

If there is a time when it becomes necessary to test out a nginx.conf file prior to attempting to use it (IOW on a live/production system) here is a handy little command.

user@machine ~> nginx -t -c /etc/nginx/nginx.conf

Sunday, September 30, 2007

PHP Based SMTP Script with TLS Support

After some searching on the web I found a quick and easy to implement script that has support for TLS which is required for all Google SMTP (Outbound) email. Their documentation is thorough and gave me everything I needed to email without spending hours playing around with things.

XPertMailer - Advanced PHP Mail Engine