One Liners
Unset (http) env vars
Only if you trust your environment, mind.
eval $(env | grep -i http | sed 's/^/unset /; s/=.*//')
Core Count
cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l
Socket Count
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
Iterate through arrays in bash
for i in ${!ARR[@]}; do echo ${ARR[$i]}; done
Restrict outgoing bandwidth on Linux
burst is ((<rate in bits/s> / ) / 8)
`latency` is the amount of data to queue before dropping traffic
`tc qdisc add dev bond1 root tbf rate 4.5gbit burst 562500 latency 100ms`
Remove:
`tc qdisc del dev bond1 root`