Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Ph.D. in progres...

Thomas Rausch thrau

🐢
Ph.D. in progres...
View GitHub Profile
@thrau
thrau / reasons-to-write-shell-scripts.md
Last active Apr 29, 2020
Why I write shell scripts
View reasons-to-write-shell-scripts.md

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
thrau / bogoproof.py
Last active Mar 24, 2020
who has time for proofs anyway?
View bogoproof.py
def is_congruent(a, b, n):
return (a - b) % n == 0
def gen_primes():
""" Generate an infinite sequence of prime numbers.
https://stackoverflow.com/a/568618/804840
"""
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
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 http://dsg.tuwien.ac.at/staff/trausch/
// @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 https://tuwel.tuwien.ac.at/grade/import/*
// @grant none
// ==/UserScript==
You can’t perform that action at this time.