Syndicate this site. Individual category archives are available too. Recent Entries

How to beat workday blues?
Bangalore Coonoor on Royal Enfield
Bash infinite loop script
Remove duplicate jars
Quick Ref: Linux Mint 11 #1
Quick Ref: SVN command line
Git with Dropbox
Quick Start: Git for personal use
Quick script to maintain a diary
Bicycle Diaries - I

Blogroll: Other sites I read.



Archives

Categories: with XML
Monthly

August 2014
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Disclaimer: These are my personal views, opinions and experiences. These do not reflect the views or experiences of any of my employers or clients.

Movable Type: A personal blogging system

How to beat workday blues?

My tips on how to actually feel good doing work.

Let us face it - all of us feel like having achieved or done very little after spending a long day away from family. Then you look back and find that you could’ve spent some of that time with family at least!

I’ve been observing my work habits a lot and I think I have found out something that works for me.

I am summarizing these as a NOT-TODO list of 3 items. I am a software engineer by profession and by passion.

Has this worked for me? Absolutely much better than when I was not following these rules.

More »

April 05, 2014

Bangalore Coonoor on Royal Enfield

Route is indicated by green icons on the map. Return was on next day, indicated by red icons. Each marker was done when I had stopped for at least a 5 minute break. Click/hover on the marker to get info and odometer reading.

Open Google Route Map

Onward

Outside Ramanagaram.
Outside Ramanagaram at 6:30am. From here till Mysore, 2 hours non-stop ride!

More »

March 31, 2014

Bash infinite loop script

There are times when cron won’t do for automated jobs. Classic example is when you need to start a script, enter some data and then get it into cron. Now, in most cases this can be handled by having env variables or config files. However, what if some one needs to enter a secret value? You don’t want that stored in the filesystem anywhere. For situations like these, you can get inspiration from the following script.

More »

June 17, 2012

Remove duplicate jars

Often you will find that you’ve multiple versions of the same dependency jars in your WEB-INF/lib or your classpath directories when you are merging multiple modules. This small shell script can be run on those directories to get rid of older versions of the same jar.

#!/bin/bash
#in a directory full of jar files, it is common to have multiple
#versions of the same jars. If versions are named with only periods
#and alphanumerics, then this groups the jars by the name, deletes
#all the lesser versions

#get a list of jars like x-1.0.0.RELEASE.jar, get only the jar name
#without version or .jar and get only non unique lines (ie., duplicate
#jars are found)
for PREFIX in `ls *.jar|sed  ’s/-[0-9\.a-zA-Z]*\.jar//g'|uniq -d`; do
    echo $PREFIX
    #now do a reverse sorted listing with the jar name and remove the
    #top line so that non latest versions are returned
    for FILE in `ls -r ${PREFIX}*|sed '1d'`; do
        echo "  $FILE"
        rm -f $FILE
    done
done

August 21, 2011

Quick Ref: Linux Mint 11 #1

To force a filesystem check on root filesystem on next reboot, do:

sudo touch /forcefsck

To restore the gnome panel to defaults:

gconftool-2 --shutdown
rm -rf ~/.gconf/apps/panel
pkill gnome-panel

If clicking on any file location from say google chrome download list or other links gives an error the requested location is not a folder:

sudo apt-get remove exo-utils

August 17, 2011

Quick Ref: SVN command line

#make a working dir
mkdir sandbox
cd sandbox
#checkout
svn co svn://svn-repo-machine/repo/path myproject --username myusernameatsvnserver
#go to work on items
cd myproject
#pull latest from server
svn up 
#queue a file for addition
svn add newfile.c
#queue for deletion
svn delete anoldfilewedontneed.c 
#get the info on what is different in your local vs server
svn status 
#list commit comments on a file
svn log AFILESOMEONECHANGED.c 
#commit one file. * will commit all that changed.
svn ci -m "Edited this file for ..." filethatgotchanged.c 

Now, configure vim as the svn diff tool.

Older Posts