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/bash | |
set -e | |
# Substitute environment variables in Prosody configs | |
for tpl in /etc/prosody/*.tpl; do | |
envsubst < $tpl > ${tpl%\.tpl} | |
done | |
exec su -s /bin/bash -c "$*" prosody |
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
#lang racket/base | |
(require racket/match | |
racket/async-channel | |
net/http-client) | |
(define urls '(["icanhazip.com" "/"] | |
["icanhazepoch.com" "/"] | |
["example.com" "/"])) |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document url-prefix("about:reader") { | |
body.light { | |
color: #657b83; /* base00 */ | |
background-color: #fdf6e3; /* base3 */ | |
} | |
body.dark { | |
color: #839496; /* base0 */ |
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
from __future__ import print_function | |
import sys | |
import subprocess | |
from os.path import isfile, join, splitext, sep, normpath | |
from glob import glob | |
ENGINE = 'quakespasm\\0.91.0\\quakespasm.exe' | |
GAME = 'sm' | |
QARGS = ['-heapsize', '256000', |
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/awk -f | |
BEGIN { | |
# first the system ones: | |
print "System colors:" | |
for (color = 0; color < 8; color++) { | |
printf "\x1b[48;5;" color "m " | |
} | |
print "\x1b[0m" | |
for (color = 8; color < 16; color++) { | |
printf "\x1b[48;5;" color "m " |
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/python | |
import re | |
import csv | |
import sqlite3 | |
from contextlib import closing | |
TYPES = [ | |
('INTEGER', re.compile('^[-+]?(\d+,)*\d+$')), | |
('REAL', re.compile('^[-+]?((\d+,)*\d+)?\.?[0-9]+([eE][-+]?[0-9]+)?$')), |
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
NOTE_TO_KEY = { | |
36: Key.Q, | |
38: Key.W, | |
40: Key.E, | |
41: Key.R, | |
} | |
def update(midi): | |
data = midi.data |
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
"""Analog of Unix ``ln`` for Windows since Vista.""" | |
import sys | |
import os | |
import subprocess | |
if len(sys.argv) < 3: | |
sys.exit('usage: ln.py TARGETS DEST') | |
args = map(os.path.abspath, sys.argv[1:]) | |
targets, dest = args[:-1], args[-1] | |
os.chdir(dest) |
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
import csv | |
import itertools | |
import sys | |
def main(): | |
reader = csv.reader(sys.stdin, delimiter='\t') | |
conditions = {} # ordered dict is assumed | |
for line in reader: | |
if not line: |
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
Windows Registry Editor Version 5.00 | |
; Registry file that maps the solarized palette to the 16 avaliable colors | |
; in a Windows command prompt. Note, hex values in the table are RGB but byte | |
; ordering of a DWORD is BGR, e.g. "ColorTable<##>"=dword:00<B><G><R> | |
; | |
; Solarized color table from http://ethanschoonover.com/solarized. | |
; | |
; NR cmd.exe PowerShell SOLARIZED HEX DWORD | |
; -- ------- ----------- --------- ------- -------- |
NewerOlder