Skip to content

Instantly share code, notes, and snippets.

» brew install klavaro
==> Downloading http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
######################################################################## 100.0%
==> Patching
######################################################################## 100.0%
patching file gettext-runtime/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/execute.c
patching file gettext-tools/gnulib-lib/pipe.c
patching file gettext-tools/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/unsetenv.c
function beech() {
len=`echo "$1" | wc -m`
if [ "$len" -gt "140" ]
then
echo "Tweet length is $len, exceeds max. 140 characters"
return
fi
echo -n 'Sending Tweet... '
# TODO correct parameter for extended regexes => BSD: `sed -E`; GNU: `sed -r`
/usr/bin/curl -Ss -u $TWITTER_BEECH_USER:$TWITTER_BEECH_PASS -d status="$1" http://twitter.com/statuses/update.xml | grep 'error' | sed 's/<[^>]+>//g'