Skip to content

Instantly share code, notes, and snippets.

@parvez
Created March 29, 2012 10:33
Show Gist options
  • Save parvez/2235711 to your computer and use it in GitHub Desktop.
Save parvez/2235711 to your computer and use it in GitHub Desktop.
My Bash Profile - Quick
search() {
find . –name "*.*" -exec grep -l $1 {} \;
}
alias ll='ls -lha $1'
alias ..='cd ..'
alias ...='cd ../..'
convert2pdf() {
/System/Library/Printers/Libraries/convert -f "$1" -o "$2" -j "application/pdf"
}
launchpad_cleaner() {
sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps; \
DELETE from groups WHERE title<>''; DELETE from items WHERE rowid>2;" \
&& killall Dock
}
alias rm_ds='echo "recursively removing .DS_Store folders from";pwd;echo "--------------";find . -name ".DS_Store" -exec sudo rm {} \;'
alias rm_svn='echo "recursively removing .svn folders from";pwd;echo "--------------";find . -name ".svn" -type d -exec sudo rm -rf {} \;'
alias google='ping -c 10240000 google.com'
alias wget='curl -O'
alias dnsflush='dscacheutil -flushcache'
alias vacuum_sqlite='for i in *.sqlite; do echo "VACUUM;" | sqlite3 $i ; done'
softlink_to_xampp_htdocs() {
htdocs="/Applications/XAMPP/xamppfiles/htdocs";
sudo rm "$htdocs";
echo "Linking: $1";
sudo ln -s "$1" "$htdocs";
ls -lha "$htdocs";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment