Posted on October 7, 2009 by ragrawal
Tip 1: Importing DBF Files
shp2pgsql command is mainly to import shapefiles. However, it does come with an optional parameter -n that allows to import dbf files. You might need to install postgis in order to have shp2pgsql command.
> shp2pgsql -n filename > outfile.sql
> pgsql -h hostname -U username -d database -f outfile.sql
The above two commands [...]
Filed under: General | Leave a Comment »
Posted on October 3, 2009 by ragrawal
Shell scripting is a powerful way to automate things. However, writing a shell script to automate interactive shell commands can be tricky. For instance, I weekly download log files from the server to my local machine. For this, I use scp command. While I had written shell script to automate this process, it wasn’t really [...]
Filed under: General | 3 Comments »
Posted on July 11, 2009 by ragrawal
Any geographical analysis almost invariably involves calculating distance between two points on the surface of the Earth (or two geographic coordinates). Below are four different options/formulas to calculate geographic distance. Each formula makes different assumption about the Earth’s shape and thereby has different accuracy and computational complexity.
Formula 1: Pythagorus’ distance formula
distance = ( (lat2 – [...]
Filed under: Map | Tagged: Distance, great circle, haversine, pythagorus, vincety | 2 Comments »
Posted on June 26, 2009 by ragrawal
17th June 2009
In an unfortunate event of mugging and assault, I severely damaged my left knee.There are four ligaments in and around a knee: ACL, PCL, MCL, and FCL. ACL and PCL corss each other and are at the center of the knee. They help prevent excessive forward and backward movement of the knee. MCL and FCL are [...]
Filed under: General | Tagged: acl reconstruction, Health, Knee, Orthopedic, surgery | 3 Comments »
Posted on May 17, 2009 by ragrawal
Challenge: Go for 30 days workout streak.
Motivation: They say it takes 30 days to make a habit.
Starting Date: 17th May 2009
Rules:
Keep track of thoughts. Especially note down all the positive and negative thoughts.
No breaks. Although, on some days I can go for easy workout such as walking only. However, break days should be at-least 3 [...]
Filed under: Challenge | Tagged: Challenge, Gym, habit | 8 Comments »