Skip to content

Instantly share code, notes, and snippets.

View djui's full-sized avatar

Uwe Dauernheim djui

View GitHub Profile
@djui
djui / git pull-request
Created December 15, 2010 15:04
Formats the last commit and sends emails to all members in the pull request group using standard sendmail. I wrote this because the builtin 'git send-email' does only allow to send a patch file which I think is killer in a small team development.
[pull-request]
group = firstname@lastname.com firstname2@lastname2.com
[alias]
pull-request = "!branch=$(git name-rev --name-only HEAD) ; echo \"git pull $(git remote) $branch\n\n $(git log -1 HEAD --stat)\" | mail -s \"Pull request: $branch\" $(git config pull-request.group)"
SL s·l [ˈəsːəl] n. Swedish company that resists customer comfort delivering train and bus transportation service in time.
» brew install --use-gcc emacs --cocoa --with-x
==> Downloading http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3.tar.bz2
File already downloaded and cached to /Users/uwe/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file lisp/term/ns-win.el
Hunk #1 succeeded at 1267 (offset 4 lines).
patching file src/nsfns.m
Hunk #1 succeeded at 2591 (offset 2 lines).
@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 / 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 / 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 / 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>]"