Skip to content

Instantly share code, notes, and snippets.

@drjova
drjova / My IP
Created February 27, 2014 22:15
Return my IP
function my_ip() # Get IP adress on ethernet.
{
MY_IP=$(/sbin/ifconfig en0 | awk '/inet/ { print $2 } ' |
sed -e s/addr://)
echo ${MY_IP:-"Not connected"}
}
@drjova
drjova / Youtube categories
Created December 18, 2013 17:32
Get youtube categories
https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&regionCode=US
@drjova
drjova / bash_prompt.sh
Last active December 30, 2015 08:29 — forked from insin/bash_prompt.sh
# The various escape codes that we can use to color our prompt.
RED="\[\033[0;31m\]"
YELLOW="\[\033[1;33m\]"
GREEN="\[\033[0;32m\]"
GREENBOLD="\[\033[1;32m\]"
BLUE="\[\033[1;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"