This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# version: 1.0 | |
# author: Sorin Sbarnea | |
require_clean_work_tree_git () { | |
git rev-parse --verify HEAD >/dev/null || exit 1 | |
git update-index -q --ignore-submodules --refresh | |
err=0 | |
if ! git diff-files --quiet --ignore-submodules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Georgia Tech Printer Setup Script | |
# Compatible with most Linux-based systems | |
# Requires a recent version of CUPS | |
# Written by Siddu Duddikunta <siddu@siddu.me> | |
fail() | |
{ | |
echo '[FAILED]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# A simple Python script to convert csv files to sqlite (with type guessing) | |
# | |
# @author: Rufus Pollock | |
# Placed in the Public Domain | |
import csv | |
import sqlite3 | |
def convert(filepath_or_fileobj, dbpath, table='data'): | |
if isinstance(filepath_or_fileobj, basestring): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $(seq 0 10) | |
do | |
date=$(date --date="$i days ago" +%D) | |
first=$(git log --format="%h" --after="$date 00:00" --before="$date 23:59" | tail -n1) | |
last=$(git log --format="%h" --after="$date 00:00" --before="$date 23:59" | head -n1) | |
if [ -n "$first" ] && [ -n "$last" ]; then | |
diff=$(git diff --shortstat $first^..$last) | |
echo "$(date --date=$date): $diff" | |
else |