Add spacers in your OSX dock

Run this command in the terminal to add a spacer

jitsejan@MBP $ defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

and restart the dock by running

jitsejan@MBP $ killall Dock

Change the last modified time of a file

This script will change the last modified time of a file in the current directory to 4 days back.

#!/bin/ksh 
numDays=4
diff=86400*$numDays
export diff
newDate=$(perl -e 'use POSIX; print strftime "%Y%m%d%H%M", localtime time-$ENV{diff};')
lastFile=$(ls -lt | egrep -v ^d | tail -1 | awk ' { print $9 } ')
touch -t $newDate $lastFile