Archive for the 'Personal' Category

Computer Assisted Jenga with the Wii Balance Board and Linux

I like to think about how games work, in the case of Jenga, it is just physics!

But don’t you wish you could peel back reality and see what is happening with the physics from the inside? Well now you can, with the help of a Wii Balance Board.

For the setup you need these ingredients:

  • Wii Balance Board
  • Computer with Bluetooth
  • Linux, preferably Ubuntu
  • Jenga Set, alternatively “Tension Tower
  • Some know-how to compile a trunk version of Cwiid
  • Some other python stuff (see the build instructions for details)
  • And my code

I’m going to maintain all instructions on how to setup all the technical details on my wiki: http://wiki.xkyle.com/WiiJenga

Once you have it setup, you can see where the real center of balance is of your game, and you can tell how close it is to toppling over.

In reality, the balance board isn’t quite sensitive enough to very accurately detect the center of balance of the Jenga blocks, or detect how many Jenga blocks there are, but it is fun to watch:

ISPs Should Capitalize on their Reverse DNS!

Actually… no they shouldn’t. Here is what it would look like:

                                           My traceroute  [v0.75]
kyle (0.0.0.0)                                                              Tue May 18 15:14:52 2010
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host                                                           Loss%    Snt  Last  Avg  Best  Wrst StDev
 1. 192.168.0.1                                                 0.0%     10   12.0  15.6  11.3  33.6   6.7
 2  UPGRADE-YOUR-CONNECTION-1800-COMCAST.res.comcast.net        0.0%     10   13.1  15.8  11.5  31.1   5.9
 3. TURBOBOOST-UP-TO-50MBS.car1.Den.core.comcast.net            44.4%    10   15.3  17.7  11.8  23.1   4.5
 4. LIKE-WHAT-YOU-SEE?-GET-WITH-LEVEL3!.Level3.net              0.0%     10   27.5  22.5  12.5  43.5   9.0
 5. v----LEVEL3-EATS-SAVVISs-PACKETS.Level3.net                 0.0%     10   43.6  35.9  29.7  43.6   5.7
 6. ^----SUCK-IT-L3.das3-v3037.ch3.savvis.net                   50.0%    10   31.2  32.1  30.8  34.5   1.5
 7. FOR-A-GOOD-PING-TIME-CALL-888-638-6771.dallas3.savvis.net   0.0%     9    28.8  31.8  28.8  43.5   4.8
 8. We-heart-savvis.dllstx0.us.bb.gin.ntt.net                   0.0%     9    30.1  33.1  29.4  51.5   7.0
 9. 4.2.2.2......jk..25.209.2.4                                 0.0%     9    70.3  83.1  68.1 186.6  38.9
10. 0.0.0.zero                                                  0.0%     9    51.6  58.0  51.6  72.9   8.0
11. nothing.here.move.along.                                    0.0%     9    55.4  55.1  51.7  62.1   3.5
12. THIS-SPACE-FOR-RENT!!!                                      0.0%     9    86.3  87.4  83.7  91.3   2.7
13. the-real-site.net                                           0.0%     9    103.9 105.9  84.0 128.2  12.0

Stream of Conciousness Youtube Videos on Linux

While sitting watching TV I yearned for a more stream-of-consciousness experience. Youtube was the answer.

However, Youtube requires too much interaction. I wanted to vege out and let it just feed me the stream of random images and sound. Selecting purely random youtube videos sounded like a bad idea though…

I decided to do a twitter search for anything with a youtube link, and then let a script just enqueue them into totem, ad-infinitum. Here is my abomination:

#!/bin/bash
while [ 1 ];
do
 for EACHVIDEO in `wget -O - -q "http://search.twitter.com/search.atom?q=youtube.com" | grep http://www.youtube.com | grep "<content" | sed 's/quot;/\n/g' | grep "http://www.youtube.com" | cut -f 1 -d "&" `
 do
 totem --enqueue `youtube-dl -g -b "$EACHVIDEO" ` &
 sleep  2s
 done
 sleep 30s
done

You need a recent version of the youtube-dl script, located here. Put it in your path as appropriate. Press N for next! Next! Next!



							

Yes yes… very professional…

I’m not saying that all OS’s don’t have problems, but it would be nice if you didn’t plaster the problems all over the store :)

How to Fix a Power Plug with Sugru!

I have a first generation Asus Eeepc, but the power plug is failing. All plugs do this eventually. Lots of tiny wires, bending back and forth all the time… It just happens.

So should I throw it away and buy a new one? No! It can be easily fixed. Here is what you need:

  • Soldering Iron + Solder
  • Flux helps if you have it (If you have not soldered with flux, you are missing out big time)
  • Heat shrink or electrical tape
  • Sugru can add a nice touch

Start by using a sharp blade to cut off the plastic molding around the connector to expose the raw barrel connector and wires:

Now your soldering skills will be put to the test. Flux helps! Don’t forget to put the heat shrink on first before you solder:

Yea, the sugru, graciously provided by DangerJim could use an artist’s touch.

But it works! Looks pretty good.