Skip to content

Instantly share code, notes, and snippets.

View ThomDietrich's full-sized avatar

Thomas Dietrich ThomDietrich

  • Erfurt, Germany
View GitHub Profile
@ThomDietrich
ThomDietrich / git-anonymize
Created January 12, 2021 12:17 — forked from pozorvlak/git-anonymize
Anonymise Git history
#!/bin/sh
# Suppose you want to do blind reviewing of code (eg for job interview
# purposes). Unfortunately, the candidates' names and email addresses are
# stored on every commit! You probably want to assess each candidate's version
# control practices, so just `rm -rf .git` throws away too much information.
# Here's what you can do instead.
# Rewrite all commits to hide the author's name and email
for branch in `ls .git/refs/heads`; do
@ThomDietrich
ThomDietrich / amtrak.csv
Last active March 11, 2019 08:56 — forked from brentajones/amtrak.csv
Amtrak stations, dumped from National Transportation Atlas Database (2015) - Fix newlines and tabs
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 2. in line 8.
X,Y,OBJECTID,STNCODE,STNNAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,STNTYPE,STFIPS
-82.44084200005824,38.415404999740986,1,HUN,"Huntington, West Virginia",1050 8th Avenue,,Huntington,WV,25701,RAIL,54
-97.930060999815225,38.055858999992893,2,HUT,"Hutchinson, Kansas",North Walnut St & East 3rd Ave,,Hutchinson,KS,67501,RAIL,20
-85.469924999738907,43.395728999693631,3,HWC,"Howard City, Michigan",130 North Ensley St.,Sunoco Station,Howard City,MI,49323,BUS,26
-116.233170000495079,33.714751999705072,4,IDO,"Indio, California",NE Corner Hywy-111 and Monroe Street,Sunline Bus Stop,Indio,CA,92201-3917,BUS,06
-94.429297999503035,39.086975000296093,5,IDP,"Independence, Missouri",600 South Grand Ave.,,Independence,MO,64050-3564,RAIL,29
-86.160309000060295,39.762154000007172,6,IND,"Indianapolis, Indiana",350 South Illinois Street,,Indianapolis,IN,46225-1198,RAIL,18
-117.759192999657159,33.674767000296868,7,IRV,"Irvine, California",15215 Barranca Parkway,Irvine Transportation Center,Irvine,CA,92618,RAIL,06
-90.190598000297427,32.
@ThomDietrich
ThomDietrich / sine.py
Last active February 6, 2020 00:04 — forked from otoolep/sine.py
Pump a sine wave signal as data points into a influxdb database
#!/usr/bin/python
# A little script to send test data to an influxdb installation
# Attention, the non-core library 'requests' is used. You'll need to install it first:
# http://docs.python-requests.org/en/master/user/install/
import json
import math
import requests
import sys
@ThomDietrich
ThomDietrich / zfs_report.sh
Created January 5, 2016 12:22 — forked from cypres/zfs_report.sh
ZFS scripts
#!/bin/sh
echo "ZFS listing:"
/sbin/zfs list
echo
echo "ZFS compression ratio:"
/sbin/zfs get compressratio | /usr/bin/grep -v @
echo