Skip to content

Instantly share code, notes, and snippets.

View timabell's full-sized avatar
🍵
418 I'm a teapot

Tim Abell timabell

🍵
418 I'm a teapot
View GitHub Profile
@timabell
timabell / clean-mdp.sh
Created April 16, 2010 18:48
strip non-existent files from monodevelop project file
#!/bin/bash
#strip non-existent files from monodevelop project file
projectFile=$1 #first arg should be the .mdp file to process
if [ "$1" == "" ]
then
echo "usage: $0 project.mdp"
exit 1
fi
#set IFS to allow processing of files with spaces.
#ref http://tldp.org/LDP/abs/html/internalvariables.html
@timabell
timabell / env.sh
Created May 21, 2010 17:38
environment setup for grails on ubuntu 9.10
#!/bin/bash
#environment setup for grails on ubuntu 9.10
#use the source "$ source env.sh"
export GRAILS_HOME=/home/tim/programs/grails-1.3.1
export PATH=$PATH:$GRAILS_HOME/bin
export JAVA_HOME=/usr/lib/jvm/default-java
@timabell
timabell / scan-revs
Created July 8, 2010 09:42
scan git revision list for bug #s in the comments
#!/bin/bash
#scan revision list for bug #s in the comments
#convert into comma separated values
bugs=`git log $1..$2 --pretty=oneline | grep -o " bug *[0-9]*" | \
cut -d " " -f 3 | sort -n | uniq | while read x; do echo -n $x,; done;`
#strip final comma
bugs=${bugs%,}
@timabell
timabell / convertnew.sh
Created July 25, 2010 20:42
convert new tango files to gpx files - tango2gpx
#!/bin/bash
# convert new tango files to gpx files
# relies on convert2gpx to do actual conversion http://www.tangogps.org/downloads/convert2gpx.pl
# folder layout:
# first arg - source files from tangogps logging
# second arg - output folder
input="$1"
output="$2"
@timabell
timabell / aspect.sh
Created October 18, 2010 22:12
aspect ratios for files in a directory
for x in `ls`
do identify -format '%f %w %h' $x | awk '{if ($2>$3) print $2/$3 "\t" $1; else print $3/$2 "\t" $1; }'
done | sort -n
@timabell
timabell / git-tgz.sh
Created May 10, 2011 22:03
create git tarballs easily
#!/bin/sh
if [ -z "$1" ]
then
rev="HEAD"
else
rev=$1
fi
wd=`pwd`
basepath=`basename $wd`
desc=$(git describe --always "$rev")
@timabell
timabell / dephunter.sh
Created July 26, 2011 14:14
Quick script to check the hint paths in a visual studio sln file are valid
#!/bin/sh
# use "dephunter.sh -v" for verbose mode
verbose=false
if [ "$1" == "-v" ]
then
verbose=true
echo verbose mode
fi
@timabell
timabell / git-link.bat
Created November 17, 2011 13:32
script to provide multiple working folders for git in windows
@timabell
timabell / git-unlink.bat
Created November 17, 2011 13:34
script to safely remove extra working folders for git in windows
@timabell
timabell / toggle-oracle.bat
Created November 24, 2011 09:14
start or stop the oracle express service
net stop OracleServiceXE || net start OracleServiceXE