I Am Justyn

I fix things

May 8, 2011 - 4 minute read - Linux

Xen file-based vs LVM-based disk images (benchmarks)

I’ve been messing around a lot with Xen lately and have seen several different articles and forum posts debating the advantages over using file-based disk images, like /mnt/xen/VM01-disk.img, versus giving the VM direct access to a LVM partition. So, I ran a few simple tests on my own to determine what would be best for my machine.

Dom-0 is using four 1.5tb 7200rpm seagate drives in a software Raid-10, /dev/md2. Both Dom0 and DomU have 1gb of ram and are using ext3. Xen is using mainly default settings with the default scheduler.

Feb 13, 2011 - 5 minute read - Scripts

Create Your Own URL Shortener

I don’t really pay attention to twitter that often,but I did notice more and more people are starting to use personalized url shorteners. There’s a lot of free services out there you can use, but if you have somewhere you can host a simple php script, why not make your own?

I ended up buying iamj.us/tyn, and that’s what I’m going to set this up on. If I wanted to make things shorter, I could take off the /tyn but then I dont think it’d make as much sense. http://iamj.us/tyn11l redirects back to this page, for example. If you need help picking out a short domain name, try out domai.nr.

To create my own shortener, I decided just to use php’s base_convert function which will convert to and from bases 2-36. For a personal url shortener, you shouldn’t need more than base 36. I did end up having to write a base 62 converter class for sh0tz so that I can keep urls short, but that’s another post another time.

Note: This article is kind of old now, and I’ve since learned some better ways to accomplish everything mentioned here. I plan on making a follow-up post to this soon. In the mean time, this still works and I still use it as well.

Sep 29, 2010 - 2 minute read

Installing and Updating WordPress via SVN

I have quite a few WordPress installations that I semi-manage on my server, and just recently realized how time consuming it is everytime a new version comes out. WordPress does let you update it to the newest version directly from the admin interface which is definitely nice, but if you have several installations of WordPress you aren’t going to want to log in to every single one of them and click that update button.

One solution, and the one I decided on for now, is to use Subversion. Ever since 1.5, WordPress has been using subversion for its version control so of course they allow public read-only access to the subversion repository. Whether you are already familiar with subversion or not, it is relatively easy to install WordPress using svn and then keep it up to date as well.

Aug 18, 2010 - 2 minute read - Scripts

du2.php

This is based off of du.php, and is basically the same thing except it lets you click on folders to navigate through the directory structure and see how much space each directory is taking up.

It uses php’s shell_exec function to call the du utility on the directories it’s in. So if your host doesn’t allow you to use shell_exec, this isn’t going to work for you. If they do allow shell_exec, but do not allow ssh access then this is perfect.

You can view it here as well.

Aug 16, 2010 - 1 minute read

switch to vps and wordpress

I decided to switch my website from basic html/php to WordPress, and at the same time moved it over to my VPS. It was being hosted on dreamhost before. I still need to install/configure subversion, and move some of my old stuff over to wordpress. There isn’t much to move, so it won’t be hard. The old version of the site can be found here: http://justynshull.com/oldsite/