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
#!/bin/env python | |
# This script assumes a ton of facts about your system: | |
# 1) You're using a Logitech G930 (you can change this below) | |
# 2) aplay is installed and available on the PATH | |
# 3) amixer is installed and available on the path | |
import subprocess as sp | |
import re |
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
var txt = "This is some example text"; |
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
/** | |
* Decode a UTF-8 quoted printable string into a UTF8 string | |
* | |
* @param {string} str - UTF quoted printable string (ex. "=E8=97=A4=E6=A3=AE") | |
*/ | |
function utf8QuotedPrintableDecode(str) { | |
// Grab the ascii bytes separated by "=", trim first/last elements if empty | |
var asciiHex = str.split(/=+/); | |
if (asciiHex[0] === "") { asciiHex.shift(); } | |
if (asciiHex[asciiHex.length - 1] === "") { asciiHex.pop(); } |
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
(require 'moz) | |
;; This gist is just a combination of two gists that @nonsequitur thought up in 2010: | |
;; https://gist.github.com/nonsequitur/442376 | |
;; https://gist.github.com/nonsequitur/666092 | |
;; One-line change was made to support recent emacs requirement of 'provide' function (@ bottom) | |
;;; Usage | |
;; Run M-x moz-reload-mode to switch moz-reload on/off in the | |
;; current buffer. |
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
/* Test fixtures and example objects for various tests to use */ | |
var os = require('os'), | |
fs = require('fs'), | |
temp = require('temp'), | |
u = require('underscore'), | |
portfinder = require('portfinder'), | |
child_process = require('child_process'), | |
Q = require('q'), | |
rdb = require('rethinkdb'), |