guide
A Guide to Setting Up Git, Gitosis, and Gitweb
Posted by HokieTux on March 3, 2009 in Guides
I have recently migrated to using Git for my (D)SCM-of-choice, and so far, I am extremely happy with it. I am hosting public and private Git trees on this server, and using it as the ‘central node’ for most of my coding and configs. I am using Gitweb for the web interface and Gitosis to manage secure commits from multiple users and machines. While getting Git set up was a piece of cake, getting everything else up and running wasn’t quite so smooth. This is a guide for getting the whole system up and running quickly and easily so you can get back to hacking =)
The meat of this post is about Gitweb, for which there seems to be far fewer useful guides and docs out there (relative to the number for Git and Gitosis). This is also the part that I found the most difficult and time-consuming. Hopefully, with this guide, it’ll be a much smoother ride for you.
Why I Use Git
There are a metric tonne of sites about why you should use Git, so I won’t try to convince you. I will, briefly, however, go over my reasons for choosing it:
- People and projects I am working with are using it – This is extremely important, especially if you plan on making any sort of contributions to these projects. As a computer engineer, I have a significant amount of interaction with Linux kernel trees (like the one over at Xilinx, for example), and nearly all such projects are using Git as their SCM.
- It works with projects that aren’t using it – The only projects I work with that aren’t using Git use Subversion. Thankfully, the ‘git svn’ tools work beautifully, and allow me to use Git to interact with svn repos. This is very significant, as it allows me to further simplify my workflow into one common thread.
- Git is quickly becoming a valuable skill – Knowing SCMs has been, and always will be, valuable skills to employers. The situation used to be that knowing CVS was a major selling point. Then it moved to Subversion. People are starting to realize the benefits of distributed SCMs, and focus is transitioning to DSCMs. Of these, Git is at the fore-front in terms of user base and company adoption.
- It is small & fast- I don’t have infinite bandwidth, and I have a lot of interaction with code repositories. Being able to clone Git trees and commit new
…
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: http://filebox.vt.edu/users/bhilburn/Public/smac-6.0b-x86.run. 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…
A Guide to Using Screen
Posted by HokieTux on June 11, 2008 in Guides
Wow, it’s already been over a month since my last post! I apologize for the hiatus in activity… especially to those whom I promised this guide to some time ago. The last month was essentially consumed by end-of-the-semester projects and finals, followed immediately by a trip to Japan, and then a research symposium. Anyways, let’s get onto discussing one of the best programs ever written for command-line junkies.
Introduction
‘screen‘ is one of my favorite terminal applications for the Linux platform, and is honestly essential, if not mandatory, for any hacker / *nix power user. Why should you use screen? Here are a few features / reasons:
- Split a terminal into multiple regions, allowing you to run multiple programs in the same terminal window (similar to the ViM functionality)
- Run multiple programs at once (and no, I’m not talking about backgrounding processes with ‘&’)
- Make virtual consoles suck a little less in terms of usability
- All the 1337 kids are doing it
- Access programs remotely (e.g. ssh into your home box and resume a ViM session you left open, as it was!)
I’m probably missing a few… but I’m only half way through my cup of coffee, and these should be enough to get you interested in screen as-is. So then, onto the technical stuff!
A Guide to Using Subversion
Posted by HokieTux on May 1, 2008 in Code, Guides
Using this topic as a blog article is cheating somewhat, since I’ve essentially already written it for another audience. However, it’s finals season (which should somehow justify my apathy in coming up with original material).
It has been my experience that most people don’t learn how to use a SCM (source code manager) until they are forced to, which is really quite tragic. SCMs have been a mature technology for some years now, and doing any sort of serious coding without using one is really just silly, if not dangerous.
Like everything else in the open source world, there is a large variety of SCMs to choose from. I will likely make a future blog post on DSCMs (distributed SCM), which are in many ways superior to non-distributed SCMs, like Subversion and CVS (if you are still using CVS, by the way, you may want to reconsider your Luddite methodologies…). Regardless, Subversion is widely used, and really is the best non-distributed SCM around.
And so, with that, here is a reference guide to using Subversion: