vimrc updated

Posted by HokieTux on December 3, 2008 in Code, News

This is just a heads-up that the vimrc I provide via bzr (or via direct link) has been updated.  Tom recently found a site or two that had some nifty settings I hadn’t stumbled across yet.  Changes include:

  • Now using smarter buffer-management via ’set hidden’
  • Window title will now make sense
  • *** No longer have to scroll to bottom of screen for your screen to start scrolling! There is now a 15-line DMZ between your cursor and the bottom of the window!  Sorry for the asterisks… but this is the feature I’m most excited about.
  • Some smarter key mappings
  • Menu-completions for command-mode options/commands
  • Enabled the ‘matchit’ plugin (available in most repos)

There are a few other usability changes if you really feel like digging through it.  If anyone has anything they think should be added, please post and let me know!

You can find the file here: http://hokietux.net/~daedalus/bzr/configs/vimrc

Read the entire post...

No Comments »

I’m Still Alive

Posted by HokieTux on November 19, 2008 in General, News

This is really just a ‘ping’ post to say that this site is still up and I plan on getting back to it as soon as I can.  This semester, the last of my time as an undergraduate, has been extraordinarily rough in terms of coursework.  I have had just about no time to do anything but work, and so updating this blog and website quickly got put on the back-burner.

As of start of classes in January, I will be a GRA here at Virginia Tech, pursuing my Masters in Computer Engineering.  I very much hope to have more time to keep this site updated with new, useful material.

So, I’m Still Alive, and I’ll be back soon!

Read the entire post...

1 Comment »

Fix: OS X’s ’self-assigned IP’ Problem

Posted by HokieTux on August 4, 2008 in Hacks

I recently came back to my old man’s place for a couple of days before we headed out on a vacation, and quickly discovered that my Macbook wouldn’t play nicely with his wireless network.  My sister has an iMac that she struggled to make work with the wireless, but had forgotten what she had done to get it up and running.

The issue was that when I connected to the network, I had no actual internet access.  I had an IP, and I could ping the router, but I couldn’t get anywhere else.  Looking in network preferences, it said:

Airport has a self-assigned IP address and may not be able to connect to the internet.

I spent a good amount of time searching around online and digging through forums for a good fix.  There seem to be a lot of different solutions out there, each of which work for a small percentage of the people with this problem.

The fix that ended up working for me was thus:

Add a ‘$‘ to the beginning of the WEP password.

No joke.  I deleted the wireless network from the Airport preferences, reconnected to it, and prefaced the password with a dollar-sign… and it worked.

I hope this fix works for someone else out there with this problem.  I also hope that Apple gets their shit together and fixes their broken network stack.  OS X’s networking stack has always been weak, and Leopard was supposed to change all of that.  I love my Mac, but come’on Apple - you can do better than this.

Helpful Threads If This Didn’t Work:

  • http://forums.macrumors.com/showthread.php?t=429435
  • http://discussions.apple.com/thread.jspa?threadID=1111788&tstart=0
  • http://ryanjbonnell.com/journal/self-assigned

Read the entire post...

No Comments »

HowTo: Alpha Centauri on Linux

Posted by HokieTux on July 21, 2008 in Guides, Hacks

For the unacquainted, Alpha Centauri is one of the most acclaimed turn-based strategy games of all time.  Released in 1999, it revolutionized strategy gaming and is still considered one of the best games ever made (look at any top 100 games of all time list, and you will likely see AC appear).

Before they shut their doors, Loki Software ported Alpha Centauri and it’s expansion, Alien Crossfire, to the Linux platform.  Unfortunately, due to some library compatibility issues, the old release of Alpha Centauri will no longer work out-of-the-box on Linux.  I discovered this when, feeling somewhat nostalgic, I decided to install it and fire it up.  After a lot of searching and tinkering, I got it up and running almost perfectly.  I still experience a little buzzing in the sound… but otherwise it’s excellent.  Here is what I had to do to get it up and running:

Installing Alpha Centauri Planetary Pack

1)  Obviously, make sure you have a copy of Loki Software’s Alpha Centauri Planetary Pack (ACPP) for Linux.  These haven’t been in production for years, and are nearly impossible to find on the web.  Indeed, I’ve seen them sell for hundreds of dollars on eBay… so if you don’t already have one (and since I’m in no way recommending any sort of illegal activity), you are probably shit-out-of-luck.

2) Install ACPP by running their installer script.  When asked if you want to install the Loki Updater, say no (it doesn’t work).  You will also be asked if you want to install the Loki Uninstaller… I haven’t tested this, so I have no idea whether or not it works.  I’m not sure why it wouldn’t, but why bother?  AC is bloody awesome.  Also, make sure you install all content so you don’t need to have the CD in your machine to play (this came before all that shitty anti-piracy software).

3) Install the smac-6.0b-x86 patch.  You can find it here.  Just download it, set the executable flag with:

$ chmod +x smac-6.0b-x86.run

And then run it (as root):

# sh smac-6.0b-x86.run

4) Next, you will need to download and put the ‘Loki Compatible Libraries’ somewhere where AC can see them.  You can find them on the Gentoo wiki, or here is a direct link: loki_compat_libs-1.3.tar.bz2.  Unless you changed something, ACPP likely installed to /usr/local/games/smac.  I recommend putting the ‘Loki_Compat’ directory that comes out of that tarball in that directory so you don’t lose track of it.  So, for example, do:

$ tar jxvf loki_compat_libs-1.3.tar.bz2
# mv Loki_Compat /usr/local/games/smac

5) You likely need to change the ownership of your personal Loki directory since the installer likes to install it with root as the owner.  This should do the trick:

# chown -R <your username> ~/.loki

6) Now, you can’t run the game with a composite engine running (Compiz-Fusion, for example).  So make sure you turn it off if you have it running.  You might also need to disable the composite extension in your Xorg configuration file.  Edit /etc/X11/xorg.conf (as root, obviously), and add the following:

Section "Extensions"
    Option "Composite" "Disable"
EndSection

Or, if it already exists, make…

Read the entire post...

2 Comments »

HowTo: rtorrent & SSL certificates

Posted by HokieTux on July 13, 2008 in Hacks

Since Comcast decided to shove their heads up their fourth point-of-contact and muck with all torrent traffic (apparently not realizing that there are many legitimate uses for the protocol despite what the MPAA/RIAA would have everyone believe), using HTTPS announces with trackers has become a necessity if you are stuck with Comcast as an ISP. Unfortunately, getting this running with many clients isn’t always as easy as it should be. This post will focus on getting SSL certs working with rtorrent.

I’ve now run into problems with SSL certificates and rtorrent twice, and it has been a little different both times due to changing versions of rtorrent and the libraries it depends on. The first time I hit a problem, the error message was:

Peer certificate cannot be authenticated with known CA certificates

The second time, the error was:

problem with the SSL CA cert (path? access rights?)

Regardless, the fix was mostly the same. First, you need to get the SSL certificate from your tracker. You can use this bit of code to do the job:

# openssl s_client -connect <your tracker.com>:443 </dev/null 2>/dev/null | sed -n
'/BEGIN CERTIFICATE/,/END CERTIFICATE/p' >> /etc/ssl/certs/ca-certificates.crt

You will need to put that all on one line in your terminal. Also, remember to replace <your tracker.com> with the base URL of your tracker. Also, if you run into an error where ca-certificates.crt doesn’t already exist, just use one ‘>’ near the end of that code line instead of ‘>>’ (the difference being that ‘>>’ appends to an already existing file, and ‘>’ will create the file).

Now, you need to rehash your certificates. Run:

# c_rehash

from your /etc/ssl/certs directory.  You should be all set now. Verify that everything is working properly using curl:

$ curl -I --capath /etc/ssl/certs https://your_tracker.com

The next time you fire up rtorrent, you shouldn’t have any problems. If you do, then try starting rtorrent like this:

$ rtorrent -o http_capath=/etc/ssl/certs

If you still have problems, post a comment here and I will try to help you out. If you use Arch, you can also post there. Here are a couple of threads you might find useful:

Thanks to the fellow Arch users out there (especially those in that first thread) that helped me figure this out, and happy torrenting! Cheers!

Read the entire post...

6 Comments »