Skip to content

Instantly share code, notes, and snippets.

View chrkau's full-sized avatar
💭
cucumber

Christian Kaula chrkau

💭
cucumber
View GitHub Profile
@chrkau
chrkau / changepguser.sh
Created March 20, 2012 16:17
change owner of all tables in a pg db
#!/bin/sh
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" ${2}` ; do psql -c "alter table $tbl owner to ${1}" ${2} ; done
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" ${2}` ; do psql -c "alter table $tbl owner to ${1}" ${2} ; done
@chrkau
chrkau / 0146u1.diff
Created February 27, 2012 01:26
mame0146u
This file has been truncated, but you can view the full file.
--- makefile-old 2012-02-05 17:54:00.000000000 +0100
+++ makefile 2012-02-16 10:47:18.000000000 +0100
@@ -643,6 +643,8 @@
# $(OBJ)/libflac++.a
+7Z_LIB = $(OBJ)/lib7z.a
+
#-------------------------------------------------
# defines needed by multiple make files
@chrkau
chrkau / mame.rb
Created February 26, 2012 16:12
mame.rb
require 'formula'
class Mame < Formula
url 'http://mamedev.org/downloader.php?file=releases/mame0145s.zip'
#head 'svn://messdev.no-ip.org/mess'
homepage 'http://mamedev.org/'
version '144u6'
depends_on 'sdl'
diff '--exclude=*.orig' -urN vim73.orig/runtime/doc/eval.txt vim73/runtime/doc/eval.txt
Index: macvim/runtime/doc/eval.txt
===================================================================
--- macvim.orig/runtime/doc/eval.txt
+++ macvim/runtime/doc/eval.txt
@@ -6409,8 +6409,8 @@ jumplist Compiled with |jumplist| suppo
keymap Compiled with 'keymap' support.
langmap Compiled with 'langmap' support.
libcall Compiled with |libcall()| support.
-linebreak Compiled with 'linebreak', 'breakat' and 'showbreak'
@chrkau
chrkau / growlnotify.py
Created June 28, 2011 20:44
super simple cmus growl notify script
import os
import sys
if __name__ == '__main__':
data = {}
for k, v in zip(sys.argv[1::2], sys.argv[2::2]):
try:
data[k] = v.decode('utf-8')
except UnicodeDecodeError: