Skip to content

Instantly share code, notes, and snippets.

View djui's full-sized avatar

Uwe Dauernheim djui

View GitHub Profile
@djui
djui / emacs-24_undash_mode-line.patch
Created April 19, 2011 11:33
This patch removes the dashed line from Emacs' mode-line
--- lisp/bindings.el 2011-04-19 13:21:26.000000000 +0200
+++ lisp/bindings.el 2011-04-19 13:17:12.000000000 +0200
@@ -334,9 +334,7 @@
(propertize " " 'help-echo help-echo)
'mode-line-modes
`(which-func-mode ("" which-func-format ,spaces))
- `(global-mode-string ("" global-mode-string ,spaces))
- `(:eval (unless (display-graphic-p)
- ,(propertize "-%-" 'help-echo help-echo)))))
+ `(global-mode-string ("" global-mode-string ,spaces))))
@djui
djui / quotes.md
Created May 29, 2011 20:31
Random Quotes

"We’re in a strange state now where people who actually take textbook economics and simple arithmetic seriously are seen as dangerously radical and irresponsible, while people who believe in invisible bond vigilantes and confidence fairies, who claim to know what the market will want even though there’s no sign of that desire in current asset prices, are viewed as Very Serious."

@djui
djui / goodreads-export.py
Created October 6, 2015 14:43
Simple script to export Goodreads exports
#!/usr/bin/env python3
import csv
import sys
def main(args):
if not args:
return 'Usage: goodreads-export FILE'
@djui
djui / cli_template.py
Last active October 7, 2015 13:27
Commandline Tool template for Python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import os
import sys
import traceback
__version__ = '1.0'
@djui
djui / DSF.md
Last active October 9, 2015 12:34
Delay-Sensitivity Framework (DSF)
@djui
djui / jira2branch.sh
Created August 29, 2012 20:52 — forked from andreineculau/jira2branch.sh
JIRA ticket to branch name
#!/bin/sh
case $(uname) in
"Linux") S=$(xclip -o);;
"Darwin") S=$(pbpaste -prefer txt);;
esac
python -c "
import sys,re;
F = sys.argv[2].split('\n');
@djui
djui / jira2branch.sh
Created August 29, 2012 20:52 — forked from andreineculau/jira2branch.sh
JIRA ticket to branch name
#!/bin/bash -e
# Usage # copy from browser "JIRA-205\nTicket title"
# $ jira2branch # echoes jira-205-ticket-title
# $ jira2branch team # echoes jira-205-team-ticket-title
OS=`uname`
function paste() {
if [ $OS == "Darwin" ]; then
@djui
djui / tmux-p0wn.sh
Created October 1, 2012 18:22
p0wn your tmux session
alias tmux-p0wn='tmux list-clients | sed "s|^\(/dev/ttys[0-9]\+\).*\[\([0-9]\+x[0-9]\+\).*$|\2 \1|" | sort -r -n | tail -n +2 | cut -d " " -f 2 | xargs -n 1 tmux detach-client -t'
@djui
djui / ast.erl
Created October 1, 2012 20:58
create Erlang Modules
-define(A(A), erl_syntax:atom(A)).
-define(I(I), erl_syntax:integer(I)).
-define(S(S), erl_syntax:string(S)).
-define(V(V), erl_syntax:variable(V)).
s_f(N, P, B) -> erl_syntax:function(N, erl_syntax:clause(P, [], B)).
s_c(M, F, A) -> [erl_syntax:application(?A(M), ?A(F), [A])].
s_m(M) -> s_d(module, [?A(M)]).
@djui
djui / malcolm.zsh
Created November 3, 2012 20:32
malcolm - most amazing list comprehender of log messages
#!/bin/zsh
PRODUCT="malcolm"
PRODUCT_LONG="most amazing list comprehender of log messages"
VERSION=1.0.0
PORT=8080
VERBOSE=false
_usage() {
echo "Usage: $(basename $0) [-V|--version] [-v|--verbose] <command> [<args>]"