Archive for July, 2007

Automate, wherever possible

Written on July 26th, 2007 by
Categories: Information Insemination

Repetition is boring, and tedious. Chances are there are many parts of our life can be automated. This time I just want to share a very simple script that I use to print out current date, which I occasionally use, in different situations.

To save time on trying to remembering (or needing to ask for) current date, I normally issue this command:

shakir@herugrim ~ $ date
Thu Jul 26 16:12:05 GMT 2007
shakir@herugrim ~ $ date +%F
2007-07-26
shakir@herugrim ~ $ date +%F | tr -d "-"
20070726

The next step is to create a bash script named xxdate, as based on my previous post, which looks something like this:

#!/bin/bash
date +%F | tr -d "-" 

Let’s try it out..

shakir@herugrim ~ $ mkdir -p Pics/`xxdate`" - Honeymoon… I wish"
shakir@herugrim ~ $ ls -lh Pics/ | grep Honeymoon
drwxr-xr-x 2 shakir shakir   48 Jul 26 16:20 20070726 - Honeymoon… I wish" 

p/s: The date format is the school of thought that I use when I want to have a sortable folders / files, which turns to be very important when I started to be very dependent on my laptop (file counts increase steadily and really need proper management). Opinions might vary though.

p/s: This posting is not to promote the script (though it’s very useful to me by itself) but the thought, which is automation…

PDT

Written on July 9th, 2007 by
Categories: Information Insemination, Nerd Public Journal?

I’ve technically been taking a very long break (3 months without blogging about anything but my wedding, you know what I mean) and started to feel like I need to get out of the shell and start doing something useful. I quickly remember some PHP projects that I did for fun and the next thing I knew was my PDT Eclipse installation was outdated. The online update seems to take forever and by that I decided to grab the latest release and do a re-install of PDT, and upon running it I get this error;

shakir@herugrim ~ $ temp/bin/eclipse/eclipse
* run-java-tool is not available for sun-jdk-1.6 on i686
* IMPORTANT: some Java tools are not available on some VMs on some architectures

There’s no need to panic and a quick googling show me exactly how to get over the problem which is to execute the program as the following;

shakir@herugrim ~ $ temp/bin/eclipse/eclipse -vm $(java-config –java)

That solves the problem, and the next thing is to update my KDE link and shortcut for the program using kmenuedit;

That was easy. After launching Eclipse it complains about not being able to handle the SVN stuff that I’ve been using for the project. It’s time to install subclipse, and PyDev came next, among few other plugins that I normally install for my Eclipse.

Happy coding to myself :)

p/s: I’m installing PDT Eclipse downloaded from the official site, and not using Gentoo’s portage. I don’t know if those using other distro to face the same problem.