Skip to content

Instantly share code, notes, and snippets.

View dep-deprecated's full-sized avatar

danny peck dep-deprecated

  • Asheville, NC
View GitHub Profile
@dep-deprecated
dep-deprecated / Gmail Summary
Created May 29, 2013 14:31
This script will pull a summary of unread messages from your gmail account.
#!/bin/sh
IFS=$'\n'
arrayEmail=(`curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | sed -n '/<author>/,/<\/author>/p' | grep -a "email" | sed -e "s/\<email>//g">let Emails=${#arrayEmail[*]}
arraySubject=(`curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | grep -a "title" | grep -v 'Gmail - Inbox for' | sed -e "s/\<title>//g" | s>
let Subjects=${#arraySubject[*]}
i=1
m=0
@dep-deprecated
dep-deprecated / gist:c66743742377e433933b
Created September 23, 2014 20:56
Put your git branch in your prompt (.bash_profile)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="${TITLEBAR}\
$WHITE[$LIGHT_GRAY\w$GREEN\$(parse_git_branch)$WHITE]\
$GREEN\$ "
PS2='> '
PS4='+ '
}