Archive for March, 2009

Tunnel Traffic through SSH with a Socks Proxy

If you have a laptop then you surely have been in a situation where you need to have a secure connection while on the move. This is most important when you are at a random hotspot and need to log into a non-secure site (authentication over http) or do not trust the vendor providing the connection. If you have access to a server running SSH then you can use a great feature in openssh to set up a SOCKS proxy and route all your traffic through. This is very similar to VPN’ing but you can do it on the fly and dont have to have an special client software on your machine.

This is written specifically for Unix based systems with some stuff even more specific for Gnome. If you are using Mac OSX, Linux or Unix variants you can set up the proxy with the commands but telling your system to use the tunnel may vary. Under windows there is a way to perform all these same things with putty, my apologies for not covering that here. If you are a windows user and cant find any good documentation please let me know I would be happy to write it up.

(more…)

RAID gets Revisited (TLER and the WDTLER utility)

I have a friend that I talk about computer parts and prices with non stop, he spends a lot of time down in the trenches with enthusiasts and keeps his finger close to prices on almost all PC components. Recently he let me know that 500GiB Western Digital hard drives (WDC500AAKS) were going used for about $50. My original array was built out of 6 of these drives, and brand new 1TiB drives are hovering around $100. So a couple of fedex boxes later I am the new proud owner of some 1TiB drives.

I have heard horror stories about these drives regarding RAID arrays, with them dropping out for no reason and causing the array to degrade and rebuild. Looking a little further, in particular the newegg reviews, I found that by enabling TLER (Time-Limited Error Recovery) all of the issues with RAID on these drives are solved. In fact one of the only major differences between the Caviar line of HDDs from Western Digital and the RE line is this TLER feature. Lucky for the poor college kids in the computing crowd Western Digital makes a tool named WDTLER that will enable or disable TLER on Western Digital HDDs.

TLER exists because there are sometimes conflicts in whether the error handling should be undertaken by the HDD or the RAID controller, if TLER is not enabled the drive can be marked as unusable and cause significant performance degradation. With TLER enabled the HDD will wait for the RAID controller to resolve errors up to the amount of time that has been set. In my case Ihave set the drives to their recommended RAID times of 7 seconds.

(more…)

File Syncronization in Linux

There is a great tool in unix and windows to perform file synchronization called Unison. Unison shares a number of features with other file management/tracking packages (CVS, SVN, BitKeeper). It also runs on windows and many variations of Unix, and provides the ability to sync across platforms without worry.

I really need to sync my schoolwork and settings for varios programs (Evolution, Pidgin, Firefox) between my main desktop and laptop. To do this in Unison you need to create profiles for each directory that will need synchronization. You can do this with the GUI, but ultimately I would check the profiles in your ~/.unison directory. Here is an example where I am syncing my documents:

(more…)

Transcoding Video for Zune 4GiB/8GiB/80GiB

My brother has a zune that my parents bought him, this all took place unknown to me because I would have suggested an ipod or something else. Not that the little player is bad, the software for Zune is so terrible that I wont even begin discussing the issues I have had with it.

Handbrake can convert video from all kinds of sources to something readable by your zune, I will discuss the presets for handbrake here and they should work for all Zunes except the Zune 30 because it doesn’t support MPEG-4 or H.264. If you have a Zune 30 you can use these methods to convert video, however the Zune software will convert whatever your videos are to WMV during the syncing process.

(more…)

Install (Set Up) Jflap on Ubuntu

Jflap is great software for experimenting with formal language topics, you can construct and test examples and view them in a visual manner that would take way too much time on paper. Jflap handles the following language topics:

  • Nondeterministic Finite Automata
  • Nondeterministic Pushdown Automata
  • Multi-tape Turing Machines
  • Grammers, Parsing and L-systems

(more…)

Install (Set Up) WordPress from Subversion

This is a quick and simle guide, installing from subversion is fantastic because you pull down the most recent version from the beginning and doing updates is as simple as running another subversion command in the webroot. Make sure you have subversion installed by running this command:

sudo apt-get install subversion

Get WordPress Files

So to install wordpress from subversion go ahead and make a directory someplace in the webroot and run this command to pull down wordpress:

svn co http://svn.automattic.com/wordpress/trunk .

Now remember that trailing period, that will specify to copy to the directory that you are in.

So when you want to do an update all you have to do is go back to that directory in which you pulled down wordpress and type:

svn up

Prepare the Database

The very basics, you need to create a new schema and user, give that user permissions to the schema from a local connection. I would supply some pretty pictures for this right now but for some reason I cannot connect to my own database at the moment…. Grrr. I will solve that later

Setup a configuration file

You should still have your terminal in the directory the blog was in, now we have to setup a configuration file to finish the install. Run this command to move the sample configuration file to the configuration file that wordpress is looking for:

mv wp-config-sample.php wp-config.php

Now you need t o edit that config file to have the proper variables for your database.  Here is an example, most of the settings are strait forward however you may want to change your table prefix for security/database reasons:

define(‘DB_NAME’, ‘putyourdbnamehere’);

define(‘DB_USER’, ‘usernamehere’);

define(‘DB_PASSWORD’, ‘yourpasswordhere’);

define(‘DB_HOST’, ‘localhost’);

$table_prefix  = ‘wp_’;

I typically install all blogs to a single schema in the database, so changing the table prefix is something that is very important so they can all co-exist.