Skip to content

Instantly share code, notes, and snippets.

@wozoopa
wozoopa / 0_reuse_code.js
Created August 28, 2017 09:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wozoopa
wozoopa / showips
Created September 1, 2014 02:12
Get ip addresses for each interface in linux with bash function.
showips() {
NAMES=( $($IFC | grep "lo\|eth\|wlan" -A 1 | awk -F" " '{print $1 }' | grep -v "inet\|-\|UP" | sort -u) )
for i in "${NAMES[@]}"
do
echo "$i has ip address: `$IFC | grep "$i" -A 1 | grep "addr" | awk -F" " '{print $2}' | awk -F":" '{print $2}'`"
done
}