Skip to content

Instantly share code, notes, and snippets.

View att14's full-sized avatar
🐢

Andrew Tribone att14

🐢
View GitHub Profile
@att14
att14 / blamer.py
Created December 5, 2012 09:45
print sorted blame counts by author
import re
import subprocess
def blame_and_add(filepath):
def find_author(blame_line):
match = re.compile(
'\((.*?)\s*[0-9]{4}'
).search(blame_line)
author = match.group()
return author.strip('( 0123456789')
@att14
att14 / tab_replacer.py
Created December 5, 2012 09:39
tab -> space for all files in git repo
import os
import shutil
import subprocess
filenames, _ = subprocess.Popen(
['git', 'ls-files'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
).communicate()