This file contains hidden or 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
| #!/bin/bash | |
| # | |
| BACKUPDEST="$1" | |
| DOMAIN="$2" | |
| MAXBACKUPS="$3" | |
| if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
| echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
| exit 1 |
This file contains hidden or 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 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # asterisk.py | |
| # | |
| # Copyright 2014 James Finstrom<jfinstrom at gmail> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or |
This file contains hidden or 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
| XVFB=/usr/bin/Xvfb | |
| XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" | |
| PIDFILE=/var/run/xvfb.pid | |
| case "$1" in | |
| start) | |
| echo -n "Starting virtual X frame buffer: Xvfb" | |
| start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
| echo "." | |
| ;; | |
| stop) |
This file contains hidden or 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
| # store all solarized files in one place | |
| mkdir ~/.solarized | |
| cd ~/.solarized | |
| # http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html | |
| git clone https://github.com/seebi/dircolors-solarized.git | |
| eval `dircolors ~/.solarized/dircolors-solarized/dircolors.256dark` | |
| ln -s ~/.solarized/dircolors-solarized/dircolors.256dark ~/.dir_colors | |
| git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git |
This file contains hidden or 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 | |
| ''' | |
| This is more of a personal reference as I use json very often. | |
| The httplib2 examples are VERY good, and you should refer to them: | |
| http://code.google.com/p/httplib2/wiki/Examples | |
| ''' | |
| from httplib2 import Http | |
| try: |

