/home/jeff/blog

Sucking away valuable moments of your life ...

Open Mic at the Stonewall Tavern

| Comments

As a kind of public service of some sort, I’ve been recording the Open Mic night at the Stonewall Tavern in Eagleville, CT, which has been hosted by the terrific Blaney Brothers for the past few years. I have been putting the recordings up for anyone who wants them, arranged by date and artist on MediaFire, at . Enjoy… (But don’t complain too much about it. It’s all straight board-out to mp3 using this little gem: arecord -f cd -t raw -D hw:1,0 lame –verbose -x -s 44.1 - “${OUTPUTFILE}”)

(Also, I’ve been fortunate enough to do an actual studio session with the Blaneys. I’ll probably release it at some point, with their permission, of course.)

Thank You, Metro North

| Comments

I’m writing you, the good people of the MTA, to thank you for the ride on the Metro North train to New Haven yesterday.

The complimentary sauna included with the train ride left me peeling myself off the seat, and the lack of any openable window compounded this. I think I’m a few pounds lighter for the experience.

All kidding aside, this leads me to ask a simple, stupid question: Why aren’t we funding public transportation in this country? A ride on the Metro North costs about 16 USD one way from New Haven to Grand Central station, which still is more expensive than the ride in a gas-guzzling air-conditioned SUV at the current petrol prices. I can’t help but think that if we hadn’t been pissing money down the toilet while tilting at windmills in sand dunes halfway around the world, we could have sunk some of that money into improving, subsidizing (gasp! not subsidizing! what will conservatives say!) and maybe even air-conditioning our public transportation.

That being said, we could also try using solar power, since the train lines take up a pretty large amount of ground space, to subsidize the drain on the power grid. I know, I know, it doesn’t have quite the ring that “shock and awe” has, but at least it might have a net positive effect on the world. Wouldn’t that be nice for a change?

Hating People for the Wrong Reasons, Political Edition

| Comments

I just had a fascinating phone conversation with one of my more conservative friends. He proceeded to tell me how Obama is a muslim, Clinton let terrorists into the country, Clinton abandoned our valiant troops in Somalia (I think they call this “cut and run” now), and how McCain is a true compromiser with integrity in his beliefs. The best part was how he told me that he formulated these opinions himself, since five minutes and The Google will tell you otherwise. You should note that if you didn’t know that Clinton/Somalia piece was about the Somalia conflict, it would almost read like a certain chimpy president and his Middle Eastern policy.

It just never ceases to amaze me, the incredible *stupidity*, or at least lack of willingness to doubt crackpots at their word, which hangs over this country. And what a short memory we have…. McCain was the victim of such a hitjob when running against our current poor excuse for a drunk loser of a President back in 2000 for the GOP nomination. Now, just as he endorses torture after having been a victim of it, he does the same kind of hitjob attacks on his opponent. Now *that* is integrity, or something. I think I’m leaning towards the something.

If you’re going to dislike someone, do it based on how they play in the role they’re vying for. If someone is running for congress, evaluate them on what kind of Congressman they’d be, not whether or not you’d want to drink a beer with them. I want a President who is, at the least, brighter than I am. Being more respected and a better leader would also be requirements for the job. For some, inexplicable reason, Americans love to pick they person they think has the best “character”, attends church with the most regularity, and would be a good candidate to date their daughter.

Maybe we do deserve the last eight years of plague …

Roving Access Point

| Comments

I finally got around to getting a 12VDC power supply for the car (15 USD, cheap!), so my WRT54G3G-ST is mobile, and I got to enjoy trying out Skype while doing 65mph on the Mass Pike.

There’s some sort of gee-whiz factor in all this, but I guess it’s just another way to become more and more endlessly connected.

NSLU2 Based Load Balancer

| Comments

Another day, another project …

A few days ago I put together an NSLU2-based load balancer using haproxy to do the load balancing.

If you don’t have an NSLU2, go get one. Those things are incredible, and ridiculously useful. I’m using OpenSlug/BE, but any distro is awesome on these things.

Hint: It takes some manual hacking of the haproxy.conf file and the init script to get it working from the optware packages. Of course, you have to tune it for the application you’re running…

Booting an Old Machine

| Comments

If you’ve ever been stuck booting an old machine with a bad CD drive, or worse yet, no CD drive and an old enough BIOS not to properly boot a USB drive, you’ve experienced the wallbanger I have today. (and no, PXE boot wasn’t an option)

Fortunately, it appears that there is a nice boot floppy which allows booting via network or USB, which is available at … Direct link to the zipped floppy disk image is at etherboot.org.

Backing Up a Motorola RAZR V3m With Ubuntu

| Comments

I’ve had a Sprint Motorola RAZR v3m for a while, and when the time came to move to a Blackberry (for work), getting the information off of it would have been a horrendous process.

Instead, I present a pretty simple way of doing this using the Subversion version of opensync’s sync-moto script. Note that I did this under Ubuntu 7.10 (Gutsy Gibbon):

• Get the id by using lsusb:
$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 004 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 002: ID 0a5c:2110 Broadcom Corp.
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 003: ID 22b8:2a64 Motorola PCS
Bus 001 Device 002: ID 046d:0a02 Logitech, Inc.
Bus 001 Device 001: ID 0000:0000
• Add the following definition under /etc/modprobe.d/somethingorother :
alias cdc_acm usbserial
options vendor=0x22b8 product=0x2a64

• Plug in the phone and issue a:
** sudo /sbin/modprobe cdc_acm vendor=0x22b8 product=0x2a64**
• Download the Subversion copy of the opensync moto-sync plugin from:

https://svn.opensync.org/plugins/moto-sync/

• Issue the following sync command:
./mototool -d /dev/ttyUSB0 –backup –file mybackupfile.csv

Surviving

| Comments

I had a bit of a revelation the other day. Natasha and I had gone to pick up food to bring to a small dinner party, although it wasn’t a very formal occasion. She, on a lark, decided to grab one of those ridiculous celebrity tabloid-type magazines to read in the car on the way over.

The cashier, who looked to be somewhere between her mid forties and fifties, reacted with much excitement, and started talking to Natasha about some of the celebrities mentioned on the cover. None of this would have been very interesting, until I hear her start defending one of them. She said that it “wasn’t fair” that they were treating the celebrity “like that”, and that “she’s too good for that”. As if she knew her.

And something that has made a lot of sense to a lot of other people finally clicked in my head. A forty to fifty year old woman working a dead end cashiering job in the middle of nowhere doesn’t have anything to look forward to, and probably won’t ever attain any measure of fame and fortune. But by living vicariously through the glossy images in the impulse purchase area, she gets to feel as though she has some great connection. I used to think that welfare and Jerry Springer were our modern day bread and circus combination, but maybe that’s not it.

When you feel that you’re part of something bigger than yourself, you have some sort of purpose, and that the Universe is a sane, fair and rational place. You ignore poverty, poor health, overwork and stress, and instead focus on a place where the Universe revolves around you. Not exactly a “Total Perspective Vortex“, if you catch my drift. Maybe it’s just as much a way of getting by as betting the house on a better afterlife, or blowing all of your spare change on lottery tickets. I can’t exactly complain about it, since I think the perception of happiness trumps the reality of misery almost every time.

Pass the remote control, I’m tired of this station.

Modding That Old XBox

| Comments

If you’ve got an old junky XBox around, and would like to put something, well, *useful* on it, like XBMC, then I’ve got a great link for you which allows soft modding without having a copy of any of the exploitable games.

Patched xboxhdm 1.9 with exploits will allow you to boot another PC while hotswapping your XBox hard drive into that machine. It has all of the known exploits on it, I believe, so you don’t have to have your XBox connected to another machine or anything, nice and simple. After that, use a fully automated installer like Auto Installer Deluxe to do everything else for you.

So, don’t throw that XBox out, make it into something much better.

Deploying GWT Applications With Jetty

| Comments

I’m not a big fan of tomcat, preferring Jetty where possible. Unfortunately there are a lot of catches involved with getting GWT applications working. I’ll try to break the changes down here. This assumes that you already have a GWT project built and made with projectCreator which you are migrating into Jetty.

1) Pull the start.jar, bin/jetty.sh script (which will be moved to the base of your distribution), lib and etc directories from your Jetty distribution, and put them in $DIST (your distribution directory)

2) Change your (appname)-shell script to be like the following: JettyTest-shell

1
2
3
4
5
6
7
8
9
#!/bin/sh
GWT_HOME=/usr/lib/gwt
ENTRY_POINT=net.cognitiveconsulting.gwt.JettyTest
HOST_PAGE=JettyTest.html
APPDIR=`dirname $0`;
CPGWT=$APPDIR/src
CPGWT=$CPGWT:$GWT_HOME/gwt-user.jar
CPGWT=$CPGWT:$GWT_HOME/gwt-dev-linux.jar
java -cp $CPGWT com.google.gwt.dev.GWTShell -logLevel DEBUG -noserver -port 8080 "$@" $ENTRY_POINT/$HOST_PAGE

3) Change your (appname)-compile script to look like:
JettyTest-compile

1
2
3
4
5
6
7
8
#!/bin/sh
APPDIR=`dirname $0`;
echo "Compiling GWT portion of application ... "
java  -cp "$APPDIR/src:$APPDIR/bin:/usr/lib/gwt/gwt-user.jar:/usr/lib/gwt/gwt-dev-linux.jar" com.google.gwt.dev.GWTCompiler -out "$APPDIR/webapps" "$@" net.cognitiveconsulting.gwt.JettyTest;
echo "Compiling native Java part of application ... "
ant -f net.cognitiveconsulting.gwt.JettyTest.ant.xml
echo "Moving pieces into Jetty library path ... "
( cd bin ; jar cf ../lib/net.cognitiveconsulting.gwt.JettyTest.jar * )

Remember, after this, your output directory is no longer www, it’s now “webapps”.

4) Create the directory $DIST/webapps/(appname)/WEB-INF, and create a web.xml file like this, with the definitions for your remote services:
webapps/net.cognitiveconsulting.gwt.JettyTest/WEB-INF/web.xml

1
2
3
4
5
6
7
8
9
[servlet]
    [servlet-name]Test[/servlet-name]
    [servlet-class]net.cognitiveconsulting.gwt.server.TestImpl[/servlet-class]
  [/servlet]

  [servlet-mapping]
    [servlet-name]Test[/servlet-name]
    [url-pattern]/rpc/net.cognitiveconsulting.gwt.client.Test[/url-pattern]
  [/servlet-mapping]

(Please note that because wordpress ate my XML, I used a different kind of brackets, please substitute as required.)

5) Create the ant build file:
/usr/lib/gwt/projectCreator -ant net.cognitiveconsulting.gwt.JettyTest

6) Make sure you have created working servlets under the internal tomcat implementation before you proceed, making sure that the servlet information is in the .gwt.xml file in your source directory like this:

7) Make sure that a copy of $GWTDIR/gwt-servlet.jar and any other libraries you are using are installed in $DIST/lib — forget this and nothing is going to work.

8) Create an empty “logs” directory under $DIST.

You should be able to start Jetty at your convenience and browse to the (appname)/(startpage).html page. If you want to pack it as a war, just zip the (appname) directory in $DIST/webapps with a .war extension. Also, running jetty.sh with the parameter “supervise” will allow you to watch the logs as they go by.

Hope this has been informative and helpful.

UPDATE: Jan, one of the webtide guys, was nice enough to send me an ant build file which does much the same type of thing I was attempting to do here. It is attached here, for anyone else who would like a copy.