Migrating to a new provider

I’m currently in the process of migrating to a new provider. Long story that I won’t get into right now. I’m really sick of setting up wordpress, so I will be looking to migrate this to a more lightweight blogging solution in the future.

Cheers and keep on rockin’ in the free world!

Blog Refresh

I reinstalled wordpress today and purged all of the comments (100k spam comments in moderation :X ). I haven’t been posting much lately because I’ve been busy doing other things, but I have a couple things in mind that I want to post about if I get around to it.

Cheers; keep on rockin’ in the free world.

Gracefully killing "stuck" SSH sessions

On my home WiFi connection, I occasionally find my SSH sessions being stuck and completely unresponsive. The only way to resolve the issue has been to close the window of the terminal emulator, which is usually no big deal. This becomes more of an issue when using ChromeOS on my CR48 where you can’t close the shell window by any means other than the “exit” command. Prior to discovering a more graceful solution, I had been using this somewhat lengthy workaround (which requires ChromeOS to be in dev mode):

  • Press Alt-Ctrl-T to open a new crosh shell.
  • Type “shell” to open a Linux shell.
  • Run “ps fax | grep ssh” to find the process id of the stuck ssh session.
  • Kill the stuck session with “kill -9 [process ID]”

Killing the process manually is not ideal, especially when your WiFi drops whenever the router yawns.

This solution that is built into the standard openSSH client takes a lot less time and closes the connection as opposed to just killing the client process. When the session is stuck, press the following keys to close the SSH connection:

  • Enter
  • Tilde ( “~” / shift back-tick )
  • Period

That’s it! Your connection will be closed with the “Connection to [host] closed” message. I hope that you find this tip as useful as I did. Happy hacking!

Exploring Perl

Throughout my years of programming, I have heard abundant praise about the Perl language.  On the other hand, I’ve known some programmers that refuse to touch Perl with a ten foot pole.  Python had been my scripting language of choice in the past. Regardless, I decided it was in my best interest as a programmer to at least be familiar with the language.

After some quality time with “man perlintro”, I began to get fairly comfortable with the syntax.  Diving into “man perlretut” really opened my mind to ways to parse text in new ways with regular expressions instead of complicated code chock-full of nested loops and loads of conditionals that are quite frankly awkward to code.  Another great thing about regular expressions is that many other languages and programs have support for them or a similar syntax (python re and vim for starters). I highly recommend any programmer with some spare time to check out the perlintro and perlretut manpages if they haven’t already.

I wanted to dive into a bit of web programming with Perl, so I installed and configured mod_perl for my apache2 server on my Linode.  On Arch Linux, you can install mod_perl with:

pacman -S mod_perl

I added the following entry to my httpd.conf file to enable mod_perl:

<Files ~ ".(pl|cgi)$">
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlSendHeader On

Your mileage may vary with your distribution and version of everything, but that was enough to get me started with mod_perl and apache2.

My first script was a warsow server status checker for my warsow server. You can check it out here and the source can be found here. The script is pretty simple, it basically scrapes the output of qstat (a command-line program to query quake/warsow servers) and formats the output into an HTML friendly format. Regex is used to parse the qstat output into variables that can be used to form the HTML friendly output. The code probably isn’t as optimal as it could be — for anyone checking out the source keep in mind that I was learning everything about the language and regex as I was writing this. The output of the script is currently bare-bones HTML, but with CSS added the output could also be easily improved to be more eye-friendly. Maybe one day I will extend this script further, but as it stands it was a great learning experience and still serves a useful purpose. I’m looking forward to learning more Perl and regex; I feel as if I am only scratching the surface of how much these tools will make my life easier as a programmer.

FCEUX 2.1.5 Released!

Hey folks!  After many nights of dark LCD-lit rooms, coffee, and code the FCEUX team is pleased to bring you FCEUX 2.1.5.  Most notably, the GTK GUI for SDL platforms (Linux, BSD, OSX) has been drastically overhauled and moved from the previous two window layout (game window/menu window) into a single integrated window.

For the full list of changes, check the official press release and download it here.

For build instructions for SDL, check out my previous post.

Edit 6/17/11 – Arch Linux now includes fceux 2.1.5 in their community repository, so you can fetch it with “pacman -Sy fceux” (link).

If you’re an impatient archlinux user, you can use this PKGBUILD with makepkg to build a fceux 2.1.5 package for your system before the official package is updated in the community repository. Just use the following commands:

  • sudo abs community/fceux
  • cp -R /var/abs/community/fceux /tmp
  • cd /tmp/fceux
  • wget http://xannode.com/PKGBUILD
  • makepkg
  • sudo pacman -U fceux-*.pkg.tar.xz
  • Enjoy!


    Pursuing Solo Music; RIP 4#

    I have not been very public about my music on the Internet, mostly since I was never fond of MySpace Music or uploading my material to Facebook.  For the past two years, I have been playing in a rock (punk/shoegaze/postpunk/ihategenres) band with a couple of good friends.  I’m going to loosely reference this band as 4# (a name we had agreed on for a while), although we’ve gone through multiple names, drummers, and band members (as well as beer pizza and guitar strings).  We’ve had sort of a rotating line-up, which gave me the pleasure of playing my share of rhythm and lead guitar, electric bass, and drum kit.  Anyway, due to the lack of a practice area and other factors beyond the bands control, the band has come to an end.  It’s pretty disappointing for me, especially since we just about had enough original material to put together an EP…

    As disappointed as I am about this indefinite hiatus, I plan to devote more of my energy to writing and producing my own music.  Between my KORG AX300G, Gibson Les Paul (smartwood series), Presonus Firebox, a Shure SM57 and some free software I should have the tools at hand to make this happen.  I intend to share any wisdom that I might learn along the way while I start to produce my own material.

    Even with all this being said, I am really going to miss the experience of playing with a band: let alone with some of the most talented people I know.  It’s going to be tough to not have other friends to bounce ideas off of and give/take critique from.  A large amount of the material that my band wrote would not have happened indepedently: it is the product of a couple guys trying to keep on rockin’ in the free world.  But who knows what the future will hold?

    FCEUX 2.1.5

    FCEUX (FCE UltraX) ((FamiComEmulator UltraX heh)) has been a project I’ve been contributing to since 2007.  FceuX (http://fceux.com/) is a cross-platform NES (Nintendo Entertainment System) (so many acronyms!) emulator written in C++ that sports a wide-feature set, excellent ROM compatibility, and accurate emulation.  Thanks to the hard word of myself (http://sourceforge.net/users/punkrockguy318) and sf:plombo (http://sourceforge.net/users/plombo/), fceuX now also can brag about its integrated GTK2 GUI:

    FceuX 2.1.5 hasn’t been officially released yet (as of this posting), but if your running Linux or most other SDL capable platforms you can get the latest code from subversion and enjoy the new features for yourself.  The code in svn is pretty stable right now (the release is imminent), so it’s safe to run this and your computer shouldn’t explode (no guarantees 🙂 ) It’s pretty simple to compile, so I’ll just post the instructions here for anyone that is interested.

    First, install the dependencies with your package manager (or from source if you’re one of those kinds of people):

    • g++
    • scons
    • libsdl
    • libz
    • libgtk2 (optional)
    • subversion

    Now, let’s grab the latest fceux source:

    • svn checkout http://svn.code.sf.net/p/fceultra/code/fceu/trunk fceultra
    • cd fceultra/

    You can edit the “SConstruct” file if you want to turn compile-time options (like GTK) on or off.

    Now compile like so:

    • scons

    After a successful compilation, the fceux binary will exist at ./src/fceux .  You can install it wherever you’d like (or use “./install.sh to install to /usr/local/bin) and start enjoying some damn Nintendo games.

    The release is coming soon, so hopefully your-distro-of-choice will be including fceux 2.1.5 in their repositories (I know Arch will be…).


    PS:  Does anyone want to build a Mac OSX Binary?  😉  If anyone wants to give it a try give me a shout in #fceu in irc.freenode.net


    Hi internet! I figured I would start a blog to keep track of the projects that I can get in to on my spare time. I don’t really have much else to post right now except that wordpress is really easy to install, and it has a decent UI. Anyways, happy trails!