This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/homebrew/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGES = FileList["**/*.eps"] | |
desc "convert eps to pdf" | |
task :epsconvert do | |
IMAGES.each do |i| | |
dir = File.dirname(i) | |
file = File.basename(i, ".eps") | |
pdffile = dir+"/"+file+".pdf" | |
pdffile.gsub!(/ /, '\\\\ ') | |
i.gsub!(/ /, '\\\\ ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# vim search and replace regex to transform and shorten numbers | |
# from excel to tex | |
# | |
s/\([0-9]\{1,3}\),\?\([0-9]\{0,2}\)[0-9]* \|\t\|\n/\1,\2 \& /g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# simple timer for pomodoro like counting | |
# Usage: pomodoro.py WORKTIME BREAKTIME | |
# | |
import sys | |
import os | |
from time import gmtime, strftime, sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rakefile for building tex file | |
require "rake/clean" | |
BASE = "documentname" | |
TYPE = ".tex" | |
OUT = ".pdf" | |
TEXFILE = FileList[BASE+TYPE] | |
OUTFILE = FileList[BASE+OUT] | |
BIBTEXCMD = "bibtex" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# script to backup to a mounted sparseimage | |
# | |
# tests if the image is mounted and if not, | |
# tries to mount it. After backup, the image | |
# is detached again | |
# | |
SOURCE=~/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Shell script to sync all content of the DropBox | |
# download folder to the OSX download folder | |
# | |
# Best used when attached to a folder action | |
# | |
SOURCE="/Users/mrtazz/DropBox/Downloads/" | |
DESTINATION="/Users/mrtazz/Downloads" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git stash | |
git symbolic-ref HEAD refs/heads/$1 | |
rm .git/index | |
git clean -f -d |