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
#!/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
# | |
# 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
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
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
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
# latex logic symbols imported from snipt.net | |
Allquantor = \forall | |
Existencequantor = \exists | |
OR = \vee | |
AND = \wedge | |
NOT = \neg | |
Implies = \Rightarrow |
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/bash | |
# | |
# shell script to invoke gvim with working directory as default | |
# created for easier use of gvim in a mingw32 environment such as | |
# the git bash | |
# | |
if [ $# == 0 ] | |
then | |
C:\\Programme\\Vim\\vim72\\gvim.exe . & |
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
# treat as binary to prevent newline fixes, showing in diffs and include in merges | |
# caveat: still shown as conflict in merges, although it won't have changed | |
*.pbxproj -crlf -diff -merge |
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
# | |
# adds 'brew refresh' as an external command, which essentially does | |
# 'brew update' followed by 'brew outdated' | |
# | |
require 'update' | |
def outdated | |
outdated_brews.each do |keg, name, version| | |
if $stdout.tty? and not ARGV.flag? '--quiet' | |
versions = keg.cd{ Dir['*'] }.join(', ') |