Skip to content

Instantly share code, notes, and snippets.

@daktak
daktak / xvfb-run.py
Created February 5, 2014 03:23
Run a program in the X virtual frame buffer
#!/usr/bin/env python
import subprocess
import sys
from xvfbwrapper import Xvfb
vdisplay = Xvfb()
vdisplay.start()
# launch stuff inside virtual display here
@daktak
daktak / musicbrainz-server.sh
Created March 28, 2014 00:17
musicbrainz chroot gentoo init script
#!/sbin/runscript
PID="/var/run/musicbrainz/server.pid"
depend() {
need net
after portmap
after iptables
after dnsmasq
}
@daktak
daktak / xbmcsendmsg.py
Created April 22, 2014 02:15
Send notify popup to XBMC
#!/bin/env python2
import json
import requests
import getopt, sys
HOST='localhost'
PORT='8080'
TITLE="Testing"
MESSAGE="Hello"
@daktak
daktak / nZEDb-nginx.conf
Created May 21, 2014 06:33
nZEDb nginx.conf
location /nzedb/ {
try_files $uri $uri/ @rewrites;
alias /opt/nzedb/nZEDb/www/;
}
location /nzedb/covers/ {
try_files $uri $uri/ @rewrites;
alias /opt/nzedb/nZEDb/resources/covers/;
}
@daktak
daktak / config
Last active August 29, 2015 14:03
vimb config file - dvorak keymapping http://fanglingsu.github.io/vimb/
set home-page=http://duckduckgo.com
set editor-command=gvim -f %s
nnoremap b n
nnoremap B N
nnoremap t j
nnoremap n k
nnoremap h d
nnoremap l h
nnoremap <C-r> <C-I>
nnoremap <C-c> <C-O>
@daktak
daktak / FailEmail.py
Last active August 29, 2015 14:21
NZBGet ppscript modified to send email only on failure
#!/usr/bin/env python2
# GistID: d92a0fccbe76f275ff2e
#
# E-Mail post-processing script for NZBGet that notifies on failure only
#
# Copyright (C) 2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
# With modifications by Chris Pickett "Parnic"
#
# 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
#!/usr/bin/env python2
# GistID: 2a0460ce2b2243ffaa55
#
# Add NZB file to the queue
#
# Copyright (C) 2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# This program is free Series; 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
@daktak
daktak / SendFiles.py
Last active August 29, 2015 14:21
Modified to support conversion of files before sending
#!/usr/bin/env python2
# GistID: 8f261d9852d5fc0bcfe8
#
# Send files post-processing script for NZBGet
#
# Copyright (C) 2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# 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
@daktak
daktak / wot_ccg_dice_ti83.txt
Created December 4, 2012 05:46
Wheel Of Time Card Game Dice Rolling Program for TI83 Calculators
\start83\
\comment=WOT CCG Dice Rolling Prog
\name=WOTDICE
\file=F:\WOTDICE.TXT
Lbl 0
ClrHome
0\->\Xmin
94\->\Xmax
1\->\Xscl
0\->\Ymin
@daktak
daktak / rc.lua
Last active December 10, 2015 20:48
awesome 3.5 rc.lua
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library