Posts

Showing posts from April, 2009

Grub Could be A lot Simpler

Today I reinstalled Windows XP on my son's machine (my old machine). Ubuntu works perfectly with sound, video, and internet, but Windows...
In Windows, I had no sound, no internet, and problems with the video card. Then when I tried to update, it said I can't use and English version of XP in Brazil!
So I reinstalled with a Brazilian version of XP which blew away the boot sector (and thus the menu for selecting Ubuntu is gone).
There are some good instructions here on how to restore grub, but jeez, such a simple program has to be so much work:
sudo␣grub
find␣/boot/grub/stage1
root␣(hd0,1)
setup␣(hd0)
Worse, it's even picky about spaces, you need to put a space (shown above as '␣') or you'll get an error message, you've got to be kidding me. If you forget the sudo, it gives you useless error message instead of mentioning that running as root is probably a good idea.
I suggest they fix grub with tab completion so that I can just press "r" and get:
restore…

Speakers Housing Part II

Image
Today's a holiday (Tiradentes Day) , so I finished off my speakers!
This time I even tested them (last time I was so exhausted that I didn't even want to know if they worked or not).
I ended up putting the screw covers on with contact cement - I don't know how long they stay up there.
One project completed!

Speaker Housing

Image
This weekend I finished my speaker housing so I can have some sound on the veranda.
It was a lot more work that I had hoped, I'm still sore. My reciprocating saw didn't survive the experience either.

Unfortunately, I still have some work to do:
put some edge strip laminate in the missing partsplane down this piece so that it's flush.Hide the screws. I bought some covers, but I realize now they won't work, all my screws are flush and they must be protruding.

How I'd Improve the Nintendo Wii

Image
Nintendo is coming out with the Wii MotionPlus, which improves the already revolutionary controller. It started me thinking on what else Nintendo could do.

For instance, one or two cameras could be mounted on the TV pointing to the players. This has been done before and makes for some fun games. It also could be used to improve the playability of the games. Imagine a sword fight where you can physically jump out of the way of the sword!

Today if I want to play a quick game on the Wii Fit, I have to:
Drag out the Wii Fit platform and turn it on.Find the Wii Fit DVD.Eject the game that's already in the console, hope that my son saved his game and put the DVD somewhere.Put the Wii Fit DVD in the console and restart the console.Move and click the cursor to select the Wii Fit game.
Go through several screens and warnings.Select which player I am.Start playing, whew!It could be a lot easier. Putting in a DVD to select a game seems sooo 2001. I can't remeber the last time I put in…

Wake on lan works

I previously tried to get wake-on-lan to work and had no luck. I was never sure if my code was wrong, or if a firewall was filtering the command of if my motherboard just doesn't support it (probably the latter).
Today I got a new computer and the old wake-on-lan.py worked!

So here's the program that works for me.


#!/usr/bin/env python

import socket
import struct
import sys

def wake_on_lan(macaddress):
""" Switches on remote computers using WOL. """

# Check macaddress format and try to compensate.
if len(macaddress) == 12:
pass
elif len(macaddress) == 12 + 5:
sep = macaddress[2]
macaddress = macaddress.replace(sep, '')
else:
raise ValueError('Incorrect MAC address format')

# Pad the synchronization stream.
data = ''.join(['FFFFFFFFFFFF', macaddress * 20])
send_data = ''

# Split up the hex values and pack.
for i in range(0, len(data), 2):
send_data = ''.join([send_data,
stru…

Weight Log

Image
I've put together a web site to track my weight and exercise.
But mostly it's to play with Google App Engine.



In the process I discovered two things I didn't know about before:
The Google Visualization API. It's a very neat way of putting up charts easily. One nice feature is the separation of data to data views. You can, for instance, download (via AJAX) one table with six columns and produce 5 charts from it with 5 views, very neat.You can use some libraries for free (i.e. it's doesn't count for your application's quota, and you get updates without having to manage it). For my app I used the dojo library.I figure the more of these web application I make the easier it will become.

I'm not going to do an app a week like Web App Wednesday, but Google's sure making it easy to put up a site.

Hard Drive Cloning in Ubutnu

I'm buying a new computer, but the new computer is without a hard drive nor a video card. My computer is going to Victor who's has increasingly found it difficult to buy games for his computer, even games that are 4 years old. Victor will get my old 120 Gig drive and I'll just use the 450 Gig drive that's also been on my computer for a while.
I've been running my computer off an older 120 Gig Maxtor with another 450 Gig used for backup and some larger files. My idea was to offload all the files off the 450 Gig (to my 1 TB drive my video server) and move all my stuff from the 120 to the 450 and just use the 450.
I searched the Internet but it was not clear what the best method was to use.
In short I:
Copied off all the old files off my 450 Gig drive using rsync.I used GParted to clone the 120 GB drive to 450 GB (using copy-paste!). I created a bootable "live" version of GParted CD from here.
I unplugged the 120GB drive and just left the 450GB in it's pl…