Skip to content

Instantly share code, notes, and snippets.

Ph.D. in progres...

Thomas Rausch thrau

Ph.D. in progres...
View GitHub Profile
thrau / jekyll-git-post-receive
Last active Oct 29, 2020
git post receive hook for building jekyll website remotely
View jekyll-git-post-receive
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
# To enable this hook, rename this file to "pre-receive".
set -e
thrau /
Last active Aug 28, 2020
Why I write shell scripts

I write scripts to:

  • combine a sequence of commands i could type manually, but am too lazy to (example: proxy-chrome)
  • turn commands i need frequently but can't remember into ones i can (example: ex, ssh-forward, ishostup, rmcaps)
  • do things recursively on a file tree (rgit, mvnrc, chres)
  • perform transformation operations on many files that are too complicated for find (svg2pdf, imgscale)
  • systematize workflows into a script (mvn-release)
  • procrastinate (gdwc)

The given examples are a subset of all the scripts I have in my doftiles that can be found in thrau/dotfiles.

thrau /
Last active Mar 24, 2020
who has time for proofs anyway?
def is_congruent(a, b, n):
return (a - b) % n == 0
def gen_primes():
""" Generate an infinite sequence of prime numbers.
D = {}
View win-caps2ctrl.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
thrau / tuwel-grade-import-mapper.js
Created Apr 8, 2017
TUWEL automatic grade item mapper
View tuwel-grade-import-mapper.js
// ==UserScript==
// @name TUWEL automatic grade item mapper
// @namespace
// @version 0.1
// @description Automatically selects the form fields in the grade item mapper where the item name corresponds to the column name
// @author Thomas Rausch
// @match*
// @grant none
// ==/UserScript==