Adams Bros Blog


CentOS Routing with multiple ISPs

Author: Trenton

I searched everywhere for a simple solution to routing through two ISPs.  There are more complex examples that balance the routing using round robin or whatever, but I wanted a simple port based solution.  So, after spending literally hours reviewing other people's stuff, which never actually worked, I finally figured it out.

Filed under: Linux Continue reading

tgtd reload targets.conf failing

Author: Trenton

I've spent hours trying to figure out why tgtd is not working properly.  I change things in targetd.conf, and nothing actually changes for the initiator (clients).  I can even change the password, and the old one still works but the new one does not.   I found out that tgtd will frequently refuse to stop, even though you shut the service off, and no clients are connected.  So, if you're having this problem where your targetd.conf just doesn't seem to be reloading, check if tgtd is still running.

ps awxuf | tgtd
  • tgtd reload configuration not working
  • tgtd reload configuration fails
  • tgtd config reload
  • tgtd configuration won't reload
  • tgtd config won't reload
Filed under: Linux No Comments

Razer Deathstalker Stuck Enter Key On Login

Author: Trenton

There have been two updates since they said they'd fix it.  Neither update fixed it.  If you run into this, please contact razer and bug them about fixing it.  In the end, I posted on their facebook, and ended up getting a very quick response and resolution.  My keyboard firmware was out of date by quite a bit.  Once support got back to me with a firmware update file, I installed it and all is well.  If you are having troubles, please contact them; perhaps mention the firmware, because the people I was originally dealing with just kept blowing me off.

I've been having this problem with Windows 7.  I'm not sure if this solution will work on any other Windows platform, but it may.  I am not even sure that this is a safe operation for Razer Synapse, as it may lose your settings.  I haven't had a problem, but I make no claims or warranties as to whether this causes problems on your system.

If this is happening to you, it's because of synapse, not your keyboard. Their software gets messed up during the unlocking of the session somehow. This solution will fix it.

Filed under: Games Continue reading

apache tomcat 7 rpm

Author: Trenton

So, I decided to get an apache tomcat 7 rpm going.  I ended up finding someone who had created one, and then made it work a little bit better.  I had one guy that used to be a fedora RPM contributor help out a bit as well.  The result is a repository on github.

If you want to help contribute, and make it better, by all means fork it and work away. :D

Filed under: Java, Linux No Comments

Age of Empires Cannot Detect CD

Author: Trenton

I have the collectors edition, which includes AOE 1/2 and the expansions.  I was having troubles with this game, as it kept asking for the CD, when the DVD was in the drive.  This was because I applied a patch downloaded off the original site, thinking I needed to make sure it was up to date.  Well, as the story goes, the readme.txt on the DVD tells you NOT to do that, and that all the latest patches are already applied, and the ones on the website are not compatible with the DVD version.

Filed under: Uncategorized No Comments

Upgrade Android SQLite Database

Author: Trenton

After fiddling with a few different styles of coding a database upgrade implementation for Android, I've settled on a fairly simple method.  Basically, I take the old version, and increment a counter until I get to the current version.  Through each iteration, I use switch on the value of the upgradeTo variable, and upgrade each cycle.  If things get too complex for your application, you can always create individual upgrade methods, for each version.

Of course this method will only work if your database version is incremented by one each time you change the database.  And, this really should be the way you version it anyhow.

    public void onUpgrade(
        final SQLiteDatabase db, final int oldVersion,
        final int newVersion)
        int upgradeTo = oldVersion + 1;
        while (upgradeTo <= newVersion)
            switch (upgradeTo)
                case 5:
                case 6:
                case 7:

Someone asked in a comment, why we do the upgrade in a loop.  I do this because I do not know what version they will be converted from or to. So, I must either put a bunch of logic for every possible upgrade variation, such as 1 => 2, 1 => 3, 1=> 4, 3=> 4, etc, etc, or, I can loop through and do one upgrade at a time, and increment the version through each loop.  This GREATLY simplifies the database upgrade.

Filed under: Android, Java 10 Comments

perltwit just release

Author: Trenton

Perl Twit is a Linux/Unix command line utility for sending twitter messages.

I've been using this for probably well over a year now, and just never managed to release it.  Today I decided to push it up to, and let the world have at her.

Filed under: Linux, Perl No Comments

Send Email in your Android Application

Author: Trenton

I've seen a lot of examples of how to send email from an android application.  All of them result in applications coming up in a chooser list that are not appropriate for sending email.  In this post, I'll described the various solutions I found, and the solution that brings up only email clients.

Filed under: Android, Java Continue reading

Conversion to Dalvik format failed with error

Author: Trenton

I went looking, and looking, and looking, for a solution to this problem. None of them seemed to fit the bill. I tried...

  1. updating proguard
  2. not using libraries I shouldn't be
  3. re-importing the project
  4. removing duplicate android jars
  5. removing all android jars
  6. a host of other "suggestions" from Eclipse Android users
Filed under: Android, Java Continue reading

Eclipse Android Hello World Tutorial Video – Part 3

Author: Trenton

In third part of the android hello world video, we explain the different components of the application, and why things are done in a certain way.  This video is a bit raw.  However, rather than editing the videos, I'm going to try and improve my presentation skills as I go.