Skip to content

Instantly share code, notes, and snippets.

@lottspot
lottspot / gollum-init
Created January 14, 2013 01:58
Init script for the gollum wiki engine
#!/bin/bash
GOLLUM_DIR='/home/git/docs.git'
GOLLUM_USER='gollum-data'
CURRENT_USER=$(whoami)
INVOCATION='gollum --mathjax --user-icons gravatar'
PID=${$}
as_user(){
21[[ ${GOLLUM_USER} != ${CURRENT_USER} ]] && su ${GOLLUM_USER} -c "$1"
[[ ${GOLLUM_USER} == ${CURRENT_USER} ]] && bash -c "$1"
@lottspot
lottspot / pianobar-mediakeys.py
Created September 22, 2012 19:25 — forked from flaviocdc/pianobar-mediakeys.py
Quick python script to handle media keys for pianobar
#!/usr/bin/env python
import gobject
import dbus
import dbus.service
import dbus.mainloop.glib
import os.path
APP_ID="pianobar-mediakeys"
pianobar_key_bindings = {}