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
import sys | |
import os | |
import contextlib | |
from subprocess import Popen, PIPE | |
def die(message, error_code=1): | |
print message | |
sys.exit(error_code) |
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 | |
# Copyright (c) 2013 Alon Swartz <[email protected]> | |
# | |
# This file is part of Fab | |
# | |
# Fab is free software; you can redistribute it and/or modify it under the | |
# terms of the GNU Affero General Public License as published by the Free | |
# Software Foundation; either version 3 of the License, or (at your option) any | |
# later version. |
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
var doc = new jsPDF("p","cm","a4"); | |
//19x27px gradient background image | |
//doc.addImage(imgData,"JPEG",0.1,0.1,20.8,29.4); | |
//Data URL Size: 1187 bytes | |
//Original size: 872 bytes | |
//doc.setDrawColor(255,0,0); // draw red lines | |
doc.setLineWidth(0.03); |
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 | |
# Uses a PID file to add daemon-like behavior to an arbitrary program. | |
################################################################################ | |
usage() { | |
echo "Usage: `basename $0` PROGRAM {start|stop|restart|force-stop|force-restart|status} [PIDFILE|PID]" >&2 | |
echo "Where: PROGRAM is an executable file." >&2 | |
echo " PIDFILE is the file that contains (or will contain) the PID." >&2 | |
echo " PID is a process id to use in place of a PIDFILE." >&2 | |
} |
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 | |
######################## | |
# | |
# mkgoogle.sh - convert blockchain.info json language files | |
# | |
# to this specification http://developer.chrome.com/extensions/i18n | |
# to be used with this tool http://translate.google.com/toolkit | |
# The optional "description" tag provides context to translators | |
# but is not yet included by this script. | |
# |
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
/**********************/ | |
//jslint vars: true // change from block comment to line comment if you want to ignore a jslint option | |
/*jslint sloppy: true */ | |
/*jslint white: true */ | |
/*jslint indent: 2 */ | |
/*jslint debug: true */ | |
/**********************/ | |
/**********************/ | |
/* make jslint happy */ |
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 | |
wget -U "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.102 Chrome/32.0.1700.102 Safari/537.36" -q -O - http://bitcoin-otc.com/otps/YOURKEYID | gpg -q --output - --decrypt | xclip -i -selection clipboard |
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
section: screens | |
osx.lan: | |
halfDuplexCapsLock = false | |
halfDuplexNumLock = false | |
halfDuplexScrollLock = false | |
xtestIsXineramaUnaware = false | |
switchCorners = none | |
switchCornerSize = 0 | |
ubuntu: | |
halfDuplexCapsLock = false |
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
To support clamshell mode on a mac laptop, meaning: | |
When slepping and external display is connected, wake with usb keyboard or other usb stick. | |
Magsafe needs to be connected. | |
sudo nvram boot-args="iog=0x0" | |
To disable this behavior: | |
sudo nvram -d boot-args |
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 | |
""" | |
A pure Python "ping" implementation, based on a rewrite by Johannes Meyer, | |
of a script originally by Matthew Dixon Cowles. Which in turn was derived | |
from "ping.c", distributed in Linux's netkit. The version this was forked | |
out of can be found here: https://gist.github.com/pklaus/856268 | |
I've rewritten nearly everything for enhanced performance and readability, | |
and removed unnecessary functions (assynchroneous PingQuery and related). |