Skip to content

Instantly share code, notes, and snippets.

View simonwagner's full-sized avatar

Simon Wagner simonwagner

  • Munich, Germany
View GitHub Profile
@simonwagner
simonwagner / ale2csv.py
Last active May 30, 2023 23:54
Convert Avid ALE files to CSV
#!/usr/bin/env python
from collections import OrderedDict
from itertools import dropwhile, izip
import csv
import argparse
import os.path
argparser = argparse.ArgumentParser()
argparser.add_argument("ale_file", metavar="ALE", type=argparse.FileType(mode="rb"))
argparser.add_argument("csv_file", metavar="CSV", type=argparse.FileType(mode="wb"), nargs="?", default=None)
@simonwagner
simonwagner / .gitconfig
Created March 14, 2014 17:04
Fixup alias for simply fixing a commit.
#This will the fixup command to git
#git fixup $commit will use your current index to fixup the specified commit
#This is done by doing git commit --fixup $commit and then using rebase with autosquash
#Based upon http://stackoverflow.com/a/21148981/460564
[alias]
fixup = "!sh -c '(git diff-files --quiet || (echo Unstaged changes, please commit or stash with --keep-index; exit 1)) && COMMIT=$(git rev-parse $1) && git commit --fixup=$COMMIT && git rebase -i --autosquash $COMMIT~1' -"