This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# shell function to print graphite graphs as sparklines in the terminal | |
# needs https://github.com/holman/spark | |
# from: https://twitter.com/mrtazz/status/226297265512402946 | |
# | |
function graphline() { | |
GRAPHITEHOST="graphite.example.com" | |
if [ ! -n "$1" ]; then echo "Usage: $FUNCNAME METRIC [minutes]"; return 1; fi | |
if [ ! -n "$2" ]; then MINUTES=10 ; else MINUTES=$2; fi | |
curl -s "${GRAPHITEHOST}/render?from=-${MINUTES}minutes&target=${1}&format=raw" | sed s/,None//g | cut -d"|" -f 2 | spark ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Fairly Automated Paster | |
# | |
# Automatically creates gists ('gisting') by pasting text. | |
# FAP lets you gist really quickly and easily, all over the place. | |
# This first version only allows you to create anonymous gists. | |
# | |
# Nicholas Tang (nicholastang@gmail.com) |