Archive for the ‘Software’ Category

29
Nov

Time Tracking in the Command Line (Python and Shell Scripts)

If you’re doing consulting work and/or wanting to keep track of time spent on your todo list items from a command line interface (CLI), look no further than the following two scripts. They are simple to use and have a fair amount of power and flexibility in them. The first is a shell script which tracks your todo items. The second is a Python script which wraps itself around the todo list and give you the ability to punch in and out of the task your working on. Be sure to visit the homepages of each tool to get more information.

http://ginatrapani.github.com/todo.txt-cli/
http://code.google.com/p/punch-time-tracking/

10
Nov

XML Pretty Printer

A nifty tool when dealing with misfit XML documents is XML Pretty Printer. This command line tool will do exactly as it says: print pretty XML. Example usage:

xml_pp foo.xml > foo_pp.xml

In order to install xml_pp, you’ll need to use your package manager. For example, in Fedora you use yum install perl-XML-Twig and in Debian/Ubuntu you use apt-get install xml-twig-tools.

As always, be sure to check out the man page for xml_pp.

8
Nov

Gobby: Cross Platform Real-Time Collaboration Software

Take a moment or set aside some time to check out a cross platform, real-time collaboration software program called Gobby. Here’s the standard blurb from the projects homepage:

Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms.

Gobby has many excellent features and is a very promising application in terms of synchronous collaboration software. I have yet to get my hands dirty with it, but my initial thought is that this is the “missing-link” that I’ve been searching for so that I may assist or collaborate code with others. I’ve given ethercodes.com and Google docs a whirl, but they just seem clunky when it comes time to actually testing the program you’ve collaborated on (lots of copy/paste between web browser and terminal).

Looks like Linux.com has a nice article on setup and usage, so be sure to check it out for more information. I will probably try to create my own once I get the hang of it. :)
http://www.linux.com/archive/articles/55361

27
Oct

Mercurial SCM for Code Management Like CVS, SVN, or GIT

Mercurial is yet another open source code management system in the sea of SCM systems like CVS, SVN, or GIT. Honestly, I don’t know much about it to dive into details on setup and capabilities, but it’s something to push onto my plate for a little digestion and might be for you as well. Be sure to take a look at the main homepage to find out more: http://mercurial.selenic.com/

One capability that it has, which the others probably do as well, is that it has a fairly nice and clean looking web interface which can be hosted on your development PC or server for working with your code. I also know that in order to interact with the Mercurial SCM, you use the command ‘hg’, which is the element symbol for mercury. Clever, no? See the man pages here: http://linux.die.net/man/1/hg

3
Aug

How To: Install MySQL Query Browser in Fedora 13 (mysql-gui-tools)

As of Fedora 13, the package mysql-gui-tools is no longer available (replaced by mysql-workbench; see this page), so we’ll have to do things the hard way by digging into the archives over at http://dev.mysql.com. It’s not all that tough, but there are some issues currently (see end of post). I would like to ask others to provide any insight to the issues. So, for now, I present the beginnings of how to install MySQL Query Browser on Fedora 13…

Open the terminal, login as root with ‘su’, and copy/paste the following commands:

<br />
wget http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-gui-tools-5.0r12-linux-i386.tar.gz/from/http://mysql.he.net/<br />
tar xzvf mysql-gui-tools-5.0r12-linux-i386.tar.gz -C /opt<br />
cp /opt/mysql-gui-tools-5.0/MySQLQueryBrowser.desktop /usr/share/applications/<br />

A menu link to the program should be available under “Applications -> Programming -> MySQL Query Browser“, however if you want to run it from the terminal, use the following commands:

<br />
PATH=$PATH:/opt/mysql-gui-tools-5.0/<br />
mysql-gui-tools<br />

Now, if your luck is anything like mine, you’ll notice that if you run the program from the command line, you’ll get the initial setup window (strange looking, like theme isn’t being used), then an error message, then nothing happens after filling out the setup information. The error message will probably look something like:

<br />
[root@localhost ~]# /opt/mysql-gui-tools-5.0/mysql-query-browser<br />
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:55: error: unexpected character `@', expected string constant<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 190: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 199: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 208: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 217: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 226: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 235: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/65-fonts-persian.conf&quot;, line 244: invalid match target &quot;scan&quot;<br />
Fontconfig warning: &quot;/etc/fonts/conf.d/80-delicious.conf&quot;, line 17: invalid match target &quot;scan&quot;<br />
Fontconfig warning: line 73: unknown element &quot;cachedir&quot;<br />
Fontconfig warning: line 74: unknown element &quot;cachedir&quot;<br />

This is actually where I need your help. Does anybody have any ideas? My thought is that symbolic colors were introduced in GTK+2.10 and the mysql-query-browser doesn’t expect symbolic colors, so it throws an error message and messes everything up. However, I wonder if it doesn’t matter since it’s only the appearance of the window. This shouldn’t cause the program to stop working. Maybe it has something to do with the font warnings? But wait, when have warnings ever stopped a program from running?

Anyways, if anybody out there can offer some advice, it would be much appreciated by myself and readers (I’m sure).  If it’s just not going to be possible, I’ll remove this post from the blog to avoid confusion (I’m sure it’s already caused quite a bit).

Source: http://dev.mysql.com/doc/query-browser/en/install-generic-tarball.html
Full list of downloads/mirrors: http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-gui-tools-5.0r12-linux-i386.tar.gz/from/pick#mirrors
Note: If ‘wget’ is not available on your system, install it with ‘yum install -y wget’ or use ‘curl url -o filename’ instead.

26
Jul

Tools Worth a Gander: expect and pexpect

For those of you interested in programming a dialogue (simulating user actions) for an interactive program take a look at expect (pexpect if you’re into python). The tools are useful if you’re in an environment that needs a lot of test automation. Here’s an article that goes into a bit more detail:
http://www.noah.org/wiki/Pexpect#Description_of_Pexpect

29
Mar

Distribute Program Compilation Over Several Machines on a Network

I just learned about a couple little jewels of applications today which help you compile your large programs faster by distributing them over several different computers on the network. The tools are called distcc and icecream. Here’s a blurb from their man pages:

distcc
distcc distributes compilation of C code across several machines on a network. distcc should always generate the same results as a local compile, is simple to install and use, and is often much faster than a local compile.

icecream
Icecream is created by SUSE and is based on ideas and code by distcc. Like distcc it takes compile jobs from your (KDE) build and distributes it to remote machines allowing a parallel build on several machines you’ve got. But unlike distcc Icecream uses a central server that schedules the compile jobs to the fastest free server and is as this dynamic. This advantage pays off mostly for shared computers, if you’re the only user on x machines, you have full control over them anyway.

More information can be found here:
http://linuxreviews.org/man/distcc/
http://code.google.com/p/distcc/
http://en.opensuse.org/Icecream