Happy new year 2010
Wishing everyone a very happy new year 2010.
To download and print the following Punjabi Calendar for 2010, click here.
January 1, 2010 3 Comments
One command to rule…. alright, just return an IP
One of my friends who is into networks always joke, as why there is no single Unix command to return only the IP address and nothing else. Here is a script that just does that one thing and nothing else.
#!/usr/bin/env bash
# Arvinder Singh Kang
# askang@olemiss.edu
# Version 0.1 - 2009-06-02
# ipaddress: This snippet returns the ipaddress of the current computer. Store in a directory which is in the PATH, and make it executable by running "chmod +x ipaddress".
# Running command ipaddress should return ipaddresses of this machine.
ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'
December 8, 2009 2 Comments
Imaging ppc iMacs using Deploy Studio
For imaging(reinstalling/updating/blah blah!) more than fifty ppc iMacs and G5 Mac Towers in less than a day, I started using Deploy Studio instead of NetRestore.
However on booting a client from the NetBoot server, i got the following sign on ppc client machine

After reading some notes on NetBoot here, I found this reason:
The mach.macos.mkext file is a kernel extensions cache — a file containing all the important kernel extensions for basic network booting. Its fairly uncommon to run into problems in this stage of the Netboot process, however, there are a couple specific issues that can cause kernel panics at this point. Possible problems would be:
Not having a mach.macosx and mach.macosx.mkext file in your Netboot set
And when checked mach.macosx.mkext was actually missing from the nbi’s dmg file. So I generated one using following code
kextcache -a ppc -m /Library/NetBoot/NetBootSP0/DeployStudioRuntime-091207-145110.nbi/ppc/mach.macosx.mkext -N -L /Volumes/DeployStudioRuntime/System/Library/Extensions/
And my netboot imaging operation was back in business. Ahhh…. Freshly minted macs by the time I walk in tomorrow morning.
December 7, 2009 No Comments
Gurmukhi on Android G1 mobile

I use Google G1 running Android OS for my email. To enable Punjabi on android I used the following steps
- Download a Unicode Punjabi font.
- Copy this font to your sdcard and rename it exactly DroidSansFallback.ttf.
Now start Terminal Emulator and type exactly (watch the Case) the following commands, followed by enter.
su (then wait for the superuser screen and press yes)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
chmod 4755 /system/fonts/DroidSansFallback.ttf
dd if=/sdcard/DroidSansFallback.ttf of=/system/fonts/DroidSansFallback.ttf
reboot

Voila you should be able to read Hukamnama and emails written in Punjabi.
Thanks to Droidbot for the idea
December 3, 2009 No Comments
Web 2.0 Expo NewYork experience

I recently returned from Web 2.0 expo in New York.
What fascinated me the most is the fast pace and energy in the entrepreneurs compared to some of my friends doing startups on the West Coast.
I have compiled notes for reference. Feel free to help yourself and if you use an idea to create next web 3.0 products, 5% of your company belongs to me
Web 2.0 Expo Notes – NY November 16-19, 2009 | Learn.ArvinderKang.com
Creative Commons image by Magify.net
December 3, 2009 No Comments
Upload recipe using Net::SCP
Sharing a simple ruby recipe to automate uploads of static website, if rsync is giving you problems(like with my school web server). This script uses Net::SCP.
Net::SCP is a pure-Ruby implementation of the SCP protocol. This operates over SSH (and requires the Net::SSH library), and allows files and directory trees to copied to and from a remote server.
This solution lies somewhere between manually uploading and fully automation using Capistrano or Vlad.
November 1, 2009 1 Comment
Automating Drupal workflow using Git and Drush
Update Nov 11, 2009: Updated the script to accept username and server name as arguments and to print syntax help if no argument is passed. It would eliminate to modify script for different servers.
Drupal rocks for some things, its deployment sucks! As I automate my drupal workflows better, I should post them one by one.
Following is the my bash script recipe, for installing drupal, checking it into a git repository and replicating it remotely.
The second piece of puzzle should be automating MySQL backup and deployment using either Capistrano or Vlad.
October 29, 2009 3 Comments
A Chupacabra named ‘Health Scare’

Wrote an article yesterday in The Daily Mississippian on the current health care debate.
* Creative Commons image by lab2112
September 1, 2009 2 Comments
Installing Scala on Snow Leopard
These are instructions for quickly installing Scala. Scala is a general purpose language almost completely interoperable with Java, and having features of object-oriented and functional languages.
I installed Scala in /usr/local , the reason for which can be found here.
September 1, 2009 No Comments
Leopard firewall revisited

While bringing up firewalls for my test server, I thought of doing a little check on my machine. The logs raised both my eyebrows. Dear Google told me, I was not the only one.
Leopard introduced application based firewall, while the old ipfw still exists with just one default rule (Accept everything from everything!)
65535 allow ip from any to any
March 7, 2009 No Comments




