Archive for the ‘Linux’ Category

Using Subversion to Manage Your Life

Friday, July 18th, 2008

Over the past few years, I’ve become a big fan of subversion. Obviously, I like to use it for coding purposes, but less obviously, I like to use it to manage my schoolwork, documents, presentations, etc. Since it works so well for me, I thought I would write a quick summary of how one would probably go about doing this themselves.

This article assumes that you have the following:

  • An SSH Server
  • Subversion installed on the SSH Server
  • Subversion installed on your machine

The following code will make your repository on the remote machine:

ssh username@hostname "mkdir -p ~/local/reps;svnadmin create ~/local/reps/my-repo"

You can then checkout your repository:

svn co svn+ssh://~/local/reps/my-repo
cd my-repo

Add files to it:

touch hi my-file
svn add hi
svn add my-file

And commit the changes:

svn commit

Basic OpenSSL Usage

Tuesday, July 8th, 2008

I keep on forgetting how to use OpenSSL to do basic tasks; here is a reference before I forget again.

Decrypt an openssh key:

openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa

Encrypt an openssh key:

openssl rsa -des3 -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa

Encrypt an arbitrary file:

openssl enc -e -des3 -in testfile -out testfile.encrypted

Decrypt an arbitrary file:

openssl enc -d -des3 -in testfile.encrypted -out testfile

More details can be found here