Skip to content

Instantly share code, notes, and snippets.

@blatyo
blatyo / .bashrc
Created August 21, 2011 18:41
.bashrc
##### Aliases #####
#Shortcuts
alias mysql="mysql -u root"
#Processes and Ports
alias fp="ps -ef | grep -i "
alias fpp="lsof -i -P | grep -i listen"
#Git
@nasamuffin
nasamuffin / npp-rgrep
Created January 29, 2014 20:18
Finds files containing the search string and feeds them to Notepad++. Assumes 'npp' is aliased to the full path of notepad++.exe. Automagically sets focus in each file to the line where the search string matched!
echo $(grep -rIn "$@" | cut -d":" -f1-2 --output-delimiter=" -n" | rev | uniq -f1 | rev ) | xargs -n2 npp &
@nasamuffin
nasamuffin / UPS Track
Last active August 29, 2015 13:56
Track a UPS package (so you don't have to do it yourself).
#!/bin/bash
RETVAL=1
while [ "$RETVAL" -eq "1" ]; do
sleep 1m
PAGECONTENT=$(wget "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=$1" --quiet -O -)
RETVAL=$?
if [ "$RETVAL" -eq "0" ]; then
echo "$PAGECONTENT" | grep -q Delivered
RETVAL=$?
fi