cat count.txt | awk '{sum+=$1} END {print sum}'
linux: netstat -lnptu
mac: netstat -a -p tcp
lsof -Pnl +M -i4
SELECT pg_catalog.setval(pg_get_serial_sequence('TABLE_NAME', 'id'), (SELECT MAX(id) FROM TABLE_NAME)+1);
netstat -n -A inet
netstat -n -A inet | awk '{print $5}' | tr ':' ' ' | awk '{print $1}' | sort | uniq -c
dscacheutil -q host -a name admin.ccdev.vg
scutil --dns
find . -name '*.py' -exec sed -i '' -e "s/OLD_PATTERN/NEW_PATTERN/g" {} \;
usermod -a -G GROUP_NAME USER_NAME
usermod -G "" USER_NAME
openssl x509 -in public.pem -text -noout
su -s /bin/bash -c '/path/to/your/script' testuser
VBoxManage hostonlyif remove vboxnet1
for q in ` sudo rabbitmqctl list_queues | awk '{print $1'} | egrep "d16|celery"`;
do celery amqp queue.purge $q;
done
man kextstat
kextstat | grep -i usb | awk '{print $6}' | sort
dmesg
https://github.com/tpope/vim-pathogen
git push origin SHA:branch_name
nc -kl 5432 -c 'echo -e "HTTP/1.1 200 OK\r\n$(date)\r\n\r\n";echo "<p>How are you today?</p>"'
while true ; do nc -l 80 < index.html ; done
for pid in `ps auwwwx | grep uwsgi | grep clearcare.yaml | awk '{print $2}'`; do
ps -p $pid -o etime=
done
root@ccdev# tc qdisc add dev lo root netem delay 200ms
root@ccdev# tc qdisc del dev lo root
chmod 700 /home/your_user/.ssh
chmod 600 /home/your_user/.ssh/authorized_keys
ifconfig eth1 | grep "inet addr" | awk '{ print substr($2,6) }
sudo launchctl load -w /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist
sudo launchctl unload /Path
ssh-add -K ~/.ssh/some_key
sed 's/[<>,]//g'
FOO=${VARIABLE:-default}
git apply --check tests.patch
git apply -v --check tests.patch to see where it's blaring
git log --author=Brian --since="Feb 15, 2014" --no-merges --numstat --pretty="%H" -- tests | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
sudo killall -HUP mDNSResponder
Uninstall and purge a debian pakages…removes conf files: dpkg -P elasticsearch Install a package from a file: dpkg -i elasticsearch-0.90.7.deb
VBoxManage guestproperty set ae63d283-bd8d-44ea-be05-e61c9b2a8f73 /VirtualBox/GuestAdd/Version