Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🔧
computer plumbing

Daniel Schauenberg mrtazz

👨‍🔧
computer plumbing
View GitHub Profile
@mrtazz
mrtazz / history.txt
Created Sep 15, 2011 — forked from kennethreitz/history.txt
Most used commands, in order by usage, since last install
View history.txt
588 git
328 ls
249 cd
146 make
112 vim
100 cat
73 echo
64 chef-client
61 knife
57 gcc
View tsplit.py
def tsplit(string, delimiters):
"""Behaves str.split but supports multiple delimiters."""
delimiters = tuple(delimiters)
stack = [""] # stack to return
for i in xrange(len(string)):
if string[i] in delimiters:
stack.append("")
else:
View fresh-install.mkd
View console_progress.py
import sys
import time
def progressbar(it, prefix = "", size = 60):
count = len(it)
def _show(_i):
x = int(size*_i/count)
sys.stdout.write("%s[%s>%s] %i/%i\r" % (prefix, "="*x, "-"*(size-x), _i, count))
sys.stdout.flush()
View license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Daniel Schauenberg
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View carbon.md

Vim

autocmd BufWritePre * :%s/\s\+$//e

Emacs

(add-hook 'before-save-hook 'delete-trailing-whitespace)

Textmate