cornmaster

Jun 292010
 

Announcement

At long last, The Director! is complete. This is the URL redirection php/apache script that I mentioned early last month. Had a few minor things to fix up, which I finally did last night, and now it is available to all.

It is a very rough looking piece of software, true to my views that admins shouldn’t care what the software looks like, provided it works correctly, and it looks pretty to the public. Since I suck at UI, AND The Director! has no public face, this is the perfect project for me!

So what does The Director! do?

The Director! is a URL shortening/redirection service similar to tinyurl and others that allow you to point one web address to another (presumably a short one to a longer one). Currently it does some simple stat tracking (if you want) on the URLs, and allows you to manage your redirects. More information and a download can be found here: http://www.cornempire.net/go/director (this shows The Director! in action as I have it installed on my site now).

Requirements and Cost

The Director! is a free download, available under an undetermined licence at this time. You are free to use it, just don’t take the code and sell it. If you make any modifications, feel free to share them back to us (submit an issue to the bug tracker and attach your code). We provide no support or guarantees/warranty for the code, if you choose to use it, you are on your own. Later, I’ll enumerate that into some sort of formal licence.

In order to make use of The Director! you will need:

  • A webserver
  • PHP running on the webserver
  • A domain name of some sort
  • A rewrite module for fancy redirects (instructions provided for apache and mod_rewrite)

You will need access to edit your webserver config, or .htaccess file if you are on shared hosting.

If you run into any issues, make a note below and I’ll do my best to help. But again, no formal guarantees or warranty come with the application.

Screenshots

Certainly nothing to be proud of…but here are some screenshots of The Director! in all of it’s ugly orange glory:

Credits

Other then me, many thanks to Pat for his help in writing The Director!. As well as credit to Mark James for the Silk Icons which I don’t think I’ve actually put to use yet, but when I redesign the GUI, I will.

Jun 282010
 

This past weekend, me and a few friends played in the National CBC Play On street hockey tournament. It is a 3-on-3 tournament with a goalie. We played in the Adult Beginner division, and we had a pretty good go of it. Ended up finishing in second place, losing the championship game after a tough string of games to get that far.

I played defence most of the time as did Stefan, while Pat and Matt played forward and Chris played goal.

In the round robin we finished in 3rd place, tops of the teams who suffered a defeat:
Game 1: Hawk’s Heroes vs Doom’s Crew: 2 – 1 win. (8 AM)
Game 2: Hawk’s Heroes vs Johnsons: 8 – 5 loss. (Noon)
Game 3: Hawk’s Heroes vs GFW Shockers: 14 – 6 win. (6:40 PM)

In game 3, we only had 3 players, so we had no substitution. Stefan played goal in Chris’ absence. We played an exhausted Shockers team and ended up doing quite well (I even scored 2 goals).

Sunday was a different story. Starting at around 11 (they were late starting the game..as usual), we had a rematch with sixth seeded Doom’s Crew. Another hard fought 2-1 victory.

This win saw us playing at 12:40 against the undefeated Dark Park Destroyers. This was our hardest game yet. The game was tied at ones after the first half. The second half of the game, we could hardly get the ball out of our end. We had no solid chances to score, and defencively we were scrambling to stay alive. Late in the second half, Matt took a nasty fall on his chest as he went hard to the net and got tangled up with the goalie. Chris played awesome in goal, and managed to get us to a shootout. Pat, Stefan and Matt were our three shooters, and Matt managed to score on our final shot, and Chris shut the door to preserve the win. So we punched our ticket to the championship game at 2:40.

By this time we were all starting to get pretty beat up, and very exhausted. We were facing the number one seeded team who had only played one other game that day. This game started on time, and we managed to make it out of the first half with a 2 – 1 lead, but that is when the wheels fell off. It started to rain, and the street got very slippery, especially where the buses stop, as that pavement was full of oil. Our earlier games caught up with us, and we didn’t have much run left in us. They racked up a few quick goals with some great passing and ended up 6 – 2. We got one back, at 6 – 3, but they finished off 7 – 3.

So we ended up in second place. It was a great weekend, and we did better then we all thought we would, especially since most of us only play once a month or so. Hopefully we will be able to play again next year, and win it all. Attached is the playoff bracket.

Did you play in one of these events across the country? If so, leave a post below.

May 192010
 

Art…with ASCII you say. Well yes I do. Anyone from back in the day will appreciate ASCII art. Better yet is the ability to create ASCII art and diagrams easily. Enter the players:

asciio is a tool that allows you to easily make ASCII diagrams.

ditaa is a tool that converts ASCII art diagrams into rendered images suitable for webpages or publications.

These tools allow you to make nice rendered images and ASCII diagrams. As some have put it, ASCII Visio.

I’ve created a tutorial an how to modify asciio to better create ditaa diagrams. You can view this tutorial here: http://wiki.cornempire.net/asciiart/start Soon, many of these changes will be integrated with the package available with Debian Sid (and by extension, any Debian based Linux distribution).

The ideas for the modifications came from here: http://strawp.net/archive/geeking-out-with-diagrams-in-ascii/ and those ideas lead to the more expansive tutorial linked above. Thanks to David Paleino at Debian who has packaged Ditaa and asciio and may integrate some of these changes into the packages in the future.

If you use, or have interest in ASCII diagrams, leave a comment below.

May 072010
 

Just a quick announcement that I’m working on a new programming project called The Director!. It is essentially a url redirection/shortening service written in PHP and utilizing the apache rewrite module to do the really cool stuff.

Those in the know realize that creating such a service is just a few lines of code in the vhost entry for apache, and then a few lines of code in a php script to do the redirection, but the goal here is to make it easy to use management interface with a bit of simple stat tracking.

Hoping to have version 0.1 out this weekend (depending on how my fence construction goes this weekend).

You can view more information here: http://wiki.cornempire.net/thedirector/start

May 052010
 

Here are some neat database commands I recently came across while I was trying to get statistics and status information on some mysql and postgres databases.

Postgres

This will give you a list of all of the databases in the server.*
select datname from pg_database;

* If you don’t know how to connect to postgres from the command line, don’t fear (well fear a little). What I had to do was su to the user that is a DB user, and then run /usr/local/pgsql/bin/psql This launched a command line client (without needing a password), that let me query the server. I can’t provide a better understanding then that, as this is the first time I’ve ever interacted with a postgres server.

This tells you how big a particular database is.
SELECT pg_size_pretty(pg_database_size('xythosdocs'));
The output is like this:
pg_size_pretty
----------------
2834 MB
(1 row)

Mysql

Get all database sizes:
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema;
Produces output like this on the command line:


+--------------------+----------------------+------------------+
| Data Base Name     | Data Base Size in MB | Free Space in MB |
+--------------------+----------------------+------------------+
| blogadmin          |           0.35750008 |       0.00098896 |
| blogs              |          90.60342026 |      27.73141003 |
| information_schema |           0.00781250 |       0.00000000 |
| musicschedule      |           0.00548172 |       0.00020599 |
| mysql              |           0.54032421 |       0.00000000 |
| phpflash           |           0.77745819 |       0.00000000 |
+--------------------+----------------------+------------------+

Get some status information on the sever. Run this from the command line:
mysqladmin -uroot -p status
Phpmyadmin also provides a lot of process status information if you have that installed.

Apr 152010
 

So, you have a nice new database table, and you forgot (or couldn’t) add comments to the columns when you created it. I recently ran into this problem, and my usual internet searches didn’t turn up much.  One would expect a statement similar to this:
ALTER COLUMN `columnname` ADD COMMENT 'a comment'
However, that statement doesn’t exist.

If you have gotten to my post, you probably realize that there is no easy way to add comments (unless you have a nice application that does it for you). The real statement is something along the lines of this:
ALTER TABLE `courses` CHANGE `courseid` `courseid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'a new comment'

Which means you need to know the table definition, and restate it every time you want to change the comment. If you are doing this in bulk, that is a pain in the butt.

So, I wrote this little script that will take a create table definition, and turn it into Alter Table commands, that will add comments to each of your columns.

All you need to do is run ‘SHOW CREATE TABLE `tablename`’ on your database table, and insert that definition into my script here, and it will spit out a series of Alter Table calls with a space for a comment appended to the end.

The script is very basic at this point, and expects the formatting as shown in the example. The GUI I use, DbVisualizer, as well as the mysql command line client spit this out. So hopefully yours will to.

If you find this useful, or run into any problems with the script, please let me know.

Edit (April 15, 2010): Uploaded v0.2. Small mistake that was placing the column name in place of the table name. Sorry to anyone that was used it before and noticed it.

Apr 102010
 

I’m in the process of migrating multiple blogs into a single installation of WordPressMU. Please stand by as I correct the problems here.

In the end, I promise to have a nice blog post on it. :)

Apr 052010
 

In one of my many Linux Game RSS feeds, I ran across an announcement for L++. This is a multiplayer version of the old Lemmings game. Lemmings is a puzzle game where you have to guide your no-brain lemmings from the entrance, to the exit.

L++ has all of the original single player content, plus a lot of extra player created content. It has a built in level editor (which I found wasn’t super easy to use) and 8 player network multiplayer.

It is quite surprising how fun multiplayer lemmings could be. If you are a lemmings fan, and have a friend or two, I’d highly recommend giving this a try.

Update: I just went to the site, and they currently have taken the download off as they remove some of the copyrighted content that was in the game. You can read more here: http://lplusplus.co.cc/topic.php?topic=16. Oddly enough, I only downloaded the windows version as that was the machine I was on when I decided to try this. I guess I’ll have to wait with you to give it a try.

Apr 052010
 

I recently installed the excellent OpenShot video editor for Ubuntu because I had to splice together some video from our curling league. We had two cameras shooting the action from the Semi-Final, and Final games.

OpenShot is a very easy to use program from making some basic movies and it handled the two different format videos pretty well.

However, after installing, I noticed that I could no longer use AMSN, my instant messenger of choice. When launching from the terminal, I would receive an error about GStreamer problems. This also affected Pidgin, and I’ve heard reports of problems with Empathy and others too. The problem lies in frei0r-plugins package, which messes up gstreamer for some programs, and is required by OpenShot. The easy solution to get it working is to remove frei0r-plugins, but of course, OpenShot won’t work anymore.
sudo apt-get purge frei0r-plugins

After searching the net a bit, I ran across a launchpad page that pointed the finger at libgavl. The problem is fixed in libgavl 1.1.1. Of course, 1.1.0 is the highest version you can get with Ubuntu 9.10.

So, to correct this once and for all, you can compile 1.1.1 yourself, or you can download the .deb for Ubuntu 10.04. So, go here: http://packages.ubuntu.com/lucid/libgavl1 and download the correct version for your architecture, and you should be good to do.

I got some warnings about an older, more supported version being available in the repositories, but you can safely ignore that.

Dec 062009
 
Edit: I’ve made a new post regarding Hesk and these enhancements for the new version 2.2. You can read it here: http://cornempire.net/2010/07/31/hesk-enhancements-for-version-2-2/

I came across the free, open source Hesk Helpdesk (http://www.hesk.com) while I was looking for a light weight help system for a project that was starting up. The project has since been put on hold, but Hesk is still a great application for a helpdesk/knowledge base. Hesk is offered as a free downloadable PHP script, as well as a Hosted Version if you do not have a server. The hosted version will cost you $20 US a month. You can also by a license for the downloadable version for $39.95 US to remove the Hesk branding.

While this application is great…

  1. Allows unlimited staff
  2. Granular permissions to the system and help desk categories
  3. Excellent knowledge base built in
  4. Innovative system that doesn’t require user accounts for clients

It is lacking a few features. I plan to use this application to respond to clients from a number of different projects. As such, it would be nice if they didn’t see ALL of the problem types when submitting tickets. Because Hesk is open source, we can make a few tweaks to get directly to a specific problem type.

Hesk also allows custom fields for your tickets, but it shows all custom fields on all problem types. This can get confusing for users in a multi-project environment. I’m developing a little hack to get around this limitation.

I’ve outlined both of these changes required on my wiki, you can take a look here.