iPod hacks

The iPod has changed the world of mobile music players. And as the most popular portable music player, the iPod has a large user base looking to hack their iPods.

ipodhacks.com has a lot of cool hacks for the iPod.

Installing mouse cursor themes

The following was
posted by jodrell@spod.uk.net on 2003-09-19 09:36:52 +(-23)-

If your system uses XFree86 4.3.0 or higher and you want to use a snazzy
alpha-channeled mouse cursor theme, here’s how you do it:

1. Create a directory in your home called .icons. This is the directory defined
by the Freedesktop.org standards as the place for user-defined icon themes.

2. Place the cursor theme directory into ~/.icons. The directory should have
the form ~/.icons/THEME_NAME/cursors.

3. With either gconftool or gconf-editor, set the value of
/desktop/gnome/peripherals/mouse/cursor_theme to the name of the new theme.

4. If you use another window manager or desktop environment, you can also place
a line like this in ~/.Xdefaults:

    Xcursor.theme:THEME_NAME

or you can set the XCURSOR_THEME environment variable in your startup scripts.

You can find cursor themes at the following addresses:


Read more.

Joke

Ralph Nader, Al Gore and George W. Bush go to a fitness spa for some fun. After a stimulating, healthy lunch, all three decide to visit the men’s room and they find a strange-looking gent sitting at the entrance who says;

“Welcome to the gentlemen’s room. Be sure to check out our newest feature: a mirror that, if you look into it and say something truthful, you will be rewarded with your wish. But, be
warned, if you say something false, you will be sucked into the mirror to live in a void of nothingness for all eternity!”

The men quickly entered and upon finding the mirror, Ralph Nader steps up and says, “I think I’m the most truthful of us three,” and he suddenly finds the keys to a brand new Bentley in his hands.

Al Gore steps up and says “I think I’m the most ambitious of us three,” and in an instant, he was surrounded by a pile of money to fund his next Presidential Campaign.

Excited over the possibility of having a wish come true, George W. Bush looks into the mirror and says,”I think…”, and is promptly sucked into the mirror.

— Source Email

Google Talk

Google released Google Talk. Though they only have Windows clients available. But Linux users are not left out. Using GAIM you can chat with other Google talk users.

While there’s a lot of excitement over the new Google Talk, it’s just a Jabber server with all the gmail accounts registered to it.

But they were kind enough to document the steps to connect using GAIM here.

The car saga continues

The Trans Am is starting to fall apart. I went to run an errand on Friday and when I got home the driver’s side window didn’t go up. So my project today is to remove the interior door panel, and figure out what the problem could be. The
motor seems to move the window, but it feels like it’s getting caught on something.

I found a nice article on how to remove the interior panel here.

Another interesting mod is adding express down on the passenger side window,
as seen here.

I’ll post back with my results.

Mysterious Connection Closing (part deux)

If you recall, on 2005-08-17 I was having a little problem with a JDBC connection being closed. After a few days of investigation, we have not found the actual culprit, but have found the condition under which said problem occurs.

If the application remains idle for more than two (2) hours, netstat has revealed there are no connections to port 1521, hence no JDBC connections. Hitting said application with requests after the two hour idle causes wonderful “Closed Connection” exceptions. We still can’t find “what” is closing these connections
but we suspect it has something to do with our staging environment as this problem does not occur in QA, development demo server, nor on any of the developers workstations.

The other part of the puzzle, the 500 errors which occur because of the closed
connections, is partly because we were using Hibernate’s internal connection pooling which is totally worthless except for initial development. Turns out it’s an FAQ When I leave Hibernate running overnight, I come back and find that it can no longer connect to the database. After reading that I was like, DOH! That sounds like our problem.

We didn’t want to simply turn on c3p0 without knowing what was closing our
connections. While we investigated, we delved into the Hibernate default
connection pooling code. At the very beginning it prints out “… (not for production use)”. ARGH! Can’t believe that’s actually at info level instead of WARNING. The code doesn’t
check to see if the connections in the pool are valid or idle. If a connection is closed, and returned to the pool, it will be handed out to the unsuspecting code. The pool uses a crappy FILO algorithm which leads bad connections constantly being used. That was enough to convince us to switch.

So we configured Hibernate to use c3p0. C3p0 is definitely a more robust connection pool implementation with the ability to check the connections if they are idle for a certain amount of time, etc. For more information on configuring Hibernate with c3p0, check out this link.

Unfortunately, this was a gross oversight of our team which luckily manifested itself prior to going live. We’ll now be more vigilant of these types of problems in the future.

Mysteriously closed connection

While deploying our product to our stage environment, we found a “glitch” with our Java webapp. We’re using Tomcat 5.0.27, Hibernate 2.1.7c, RHEL 4 and Oracle. I’m seeing this wonderful error:



WARN  net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17008, SQLState: null
ERROR net.sf.hibernate.util.JDBCExceptionReporter - Closed Connection


Followed by:


ERROR com.mycompany.SomeObjectFactory - HibernateException trying to commit: com.mycompany.SomeObjectImpl
net.sf.hibernate.exception.GenericJDBCException: Could not save object
...
Caused by: java.sql.SQLException: Closed Connection
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Compiled Code))
...



I’ve looked through the code and used a logging jdbc driver (which wraps the actually jdbc driver
and logs statements for certain objects.) to log the Connection. No close() method was called. So
from what I can gather our application isn’t closing it by accident. But I can’t figure out what
is closing the connection.

I’ve already checked Oracle and it is not set to close idle connections.
Checked the router between the DB and the application box.
The closest I can fathom is the kernel’s tcp_keepalive_time which is set to 7200 (which is approximately
when we see the above error occur).

We’ll continue our investigation, but this is indeed a perplexing problem.