Archive

Visiting Card 1.0

I haven't had a visiting card since I left Virtusa around 2005. I needed one when I was freelancing but never got around to it.

I got this done in a hurry, which is why there is a typo and the alignment could be a bit better. I've put in only the essentials here. I'm happy with it for now, until the next version. Any feedback would be appreciated.

Visiting card 1.0

Technorati Tags:

Sinhalen FOSS

Listening to Sinhalen FOSS. Sounds good! This is probably the first Sinhala podcast!

Some people couldn't read the Sinhala text. Get the fonts at www.fonts.lk. Kottu will also start to look better.

Technorati Tags:

Drupal db_query trimming leading 0

The Drupal db_query was killing my leading zeros. According to this post I added single quotes and it seems to work fine now. This is in MySql 5.x and Drupal 5.7.


$query = db_query("select active from {active} where name= %s", array($user->name));


$query = db_query("select active from {active} where name = '%s'", array($user->name));

I would have added single quotes anyway but the api doc said not to.

Valid %-modifiers are: %s, %d, %f, %b (binary data, do not enclose in '') and %%.

Technorati Tags:

Save 50 bucks with Dialog TV Today!

Here is a good call by Dialog TV Forum.

For those who do not want "CiTi HiTz" - get it deactivated or pay

The tiny red text at the bottom of the Dialog TV Tariff page sayings something like this.

* CitiHitz is activated for a monthly rental of Rs. 50/-
* Channel C is offered to all packages Free of charge until 31 May 2008

I don't really care about 50 LKR but on principal its wrong to shove down a paid channel without asking. I noticed this CitiHitz crap while channel surfing, its not worth 50 cents.

Thanks again to Dialog TV Forum.

Update: I have personally opted out of Citi Hitz.

Speed Up Firefox With A New Profile

I was happy with Firefox Preloader only for a few days. Then it started hanging Firefox altogether and then crashing when I wanted to close it.

From what I can remember my current Firefox profile is at least an year old. I copy it from computer to computer. So I created new profile to see if it makes a difference. To get to the Firefox profile manager run Firefox like this.

firefox /profilemanager

I copied my signons2.txt and key3.db to migrate my passwords over.

Now Firefox starts up in a few seconds and runs well. Now I have to install my old extensions and it should be good to go.

You can find more about your Firefox profile folder here.

A better ssh-copy-id | smithii.com

I wanted to authorize my web host with my Cygwin shell to do some backups. I'm used to ssh-copy-id but Cygwin doesn't have it. I found this script that does the trick.

A better ssh-copy-id | smithii.com

I put this code in a ssh-copy-id.sh file.

#!/bin/sh
# $Id$

SSH="${HOME}/.ssh"

if [ ! -f "${SSH}/identity.pub" ]
then
PASSPHRASE=
read -p "Enter ssh passphrase for ${HOSTNAME}:" PASSPHRASE
ssh-keygen -t rsa1 -N "$PASSPHRASE" -f "${SSH}/identity"
ssh-keygen -t rsa -N "$PASSPHRASE" -f "${SSH}/id_rsa"
ssh-keygen -t dsa -N "$PASSPHRASE" -f "${SSH}/id_dsa"
chmod -f go-w "${SSH}" "${SSH}/authorized_keys*"
fi

cd "${SSH}" && \
tar -c id*.pub | \
ssh $* 'tar -x
SSH="${HOME}/.ssh"
if [ ! -f "${SSH}/identity.pub" ]
then
PASSPHRASE=
read -p "Enter ssh passphrase for ${HOSTNAME}:" PASSPHRASE
ssh-keygen -t rsa1 -N "$PASSPHRASE" -f "${SSH}/identity"
ssh-keygen -t rsa -N "$PASSPHRASE" -f "${SSH}/id_rsa"
ssh-keygen -t dsa -N "$PASSPHRASE" -f "${SSH}/id_dsa"
fi
cat identity.pub >>"${SSH}/authorized_keys"
cat id_dsa.pub id_rsa.pub >>"${SSH}/authorized_keys2"
chmod -f go-w "${SSH}" "${SSH}/authorized_keys*"
rm -f identity.pub id_dsa.pub id_rsa.pub
'

Linky Love

Speed up Firefox Startup with Firefox Preloader

My Firefox startup was slow. Its one of my primary applications as a web developer so its very important that it runs well.

I found Firefox Preloader and it did the trick. It cut down my initial startup time to a few seconds.

One more thing. It turns out I've been blogging here for a year now and I just past my 100th post. This is post 101. Feels good still to be around. Thanks for visiting.

Choosing Your Freelance Clients

Freelancers have this advantage over companies. You can choose who you want to work with on a personal level. Old school business types would tell you its not personal just business, that you should be able to work with anyone.

But when we work from home and get to know our clients first hand and see their software grow up with them, it becomes personal.

Choose your clients well. A few will stick with you for a long time. That one annoying client that pays more but gives you too much stress will take your attention away from your other, probably better clients.

Oh sometimes you get great clients that pay well too! :)

Update: similar articles

Top 10 Ways to Fire the Client From Hell - Inside CRM

SitePoint Blogs » How to fire a client

Internet on the Road with WIFI, 3G and JoikuSpot

I tried out JoikuSpot with my Nokia N80 and notebook. Its simple to setup and worked pretty well. This is definitely useful on the road.

This method can't beat 3G modems since they can go up to 7.5Mbps. The Nokia N80 only supports 384 kbps. But its better than buying a dedicated 3G modem for me because I don't need to use it often between ADSL points.

If you don't already have a 3G phone it might be cheaper and faster to get a 3G modem.

I checked Mobitel and Dialog for 3G modems a few months ago. Back then I was on Linux only and they didn't have drivers etc. This should work on Linux as well since its on WIFI.

JoikuSpot has a few limitations at this time. It only supports HTTP/HTTPS and the WIFI hotspot is not secure. They say other protocols and security is on the way.

Here is the introduction from the developers:

JoikuSpot is a free mobile software solution that turns a Nokia Smartphone to a WLAN HotSpot. You will carry internet in your pocket. Connect your laptop to web everywhere! FREE -- INSTANT -- EASY

Technorati Tags: