Skip to content

Instantly share code, notes, and snippets.

@rsdy
rsdy / repa.sh
Created September 11, 2011 23:45
reppa -- review, pick, phuck around
#!/bin/ksh
#
# REview - Pick - Phuck Around
#
# Copyright (C) 2011 Peter Parkanyi <[email protected]>
# Distributed under the MIT license
#
SHA1='[a-f0-9]{40}'
LISTPATCHES=$(git log HEAD..$1 |grep -E "${SHA1}\$" |sed "s/^.*\(${SHA1//@([\{\}])/\\\1}\)\$/\1/")
alias show='git show --patch-with-stat'
@rsdy
rsdy / Makefile
Created September 11, 2011 22:54
grafika makefile
# usage:
# to build hazi1.cpp: make hazi1
# to build and run: make RUN=1 hazi1
# to build and strip //-style comments: make STRIP=1 hazi1
# guess what: make RUN=1 STRIP=1 hazi1
CC = g++
OPTS = -g --pedantic -Wall --ansi -lglut
.cpp:
$(CC) $(OPTS) $*.cpp -o $*
@rsdy
rsdy / post-receive
Created January 25, 2011 21:09
git post-receive hook to post the last commit message and committer onto an irc channel through irssi-proxy
#!/bin/sh
USER='username'
PASS='password' # password for the irc server or irssi-proxy
PORT=6668 # port where irssi-proxy runs
HOST='localhost' # host where irssi-proxy runs
CHAN='#test' # channel in which to post
read oldrev newrev _branch
branch=$(echo $_branch | sed 's/.*\/\([a-z0-9][a-z0-9]*\)$/\1/')
@rsdy
rsdy / pwconv.py
Created December 28, 2010 01:43
convert from chrome password db csv dump to password exporter ff4 plugin csv format
#!/usr/bin/env python
import fileinput
print """# Generated by Password Exporter; Export format 1.1; Encrypted: false
"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField" """
for line in fileinput.input():
s = line.split('","')
if s[0] == '"origin_url': continue # skip the header