$ grep -o "ZSH_THEME_GIT_[A-Z_]\+" lib/git.zsh| sort | uniq
ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX
ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX
ZSH_THEME_GIT_PROMPT_ADDED
ZSH_THEME_GIT_PROMPT_AHEAD
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR
ZSH_THEME_GIT_PROMPT_BEHIND
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE
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
int main() { | |
/*************************************************************************** | |
** Section header 1, with short description | |
**************************************************************************/ | |
// some code here, implementing section 1 | |
/*************************************************************************** | |
** New section header 2, with short description |
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
alias ls='ls -F' | |
#alias grep='grep --color=auto' | |
# Git completion stuff | |
# Credit to bronson on Github | |
# https://raw.github.com/bronson/dotfiles/731bfd951be68f395247982ba1fb745fbed2455c/.bashrc | |
__define_git_completion () { | |
eval " | |
_git_$2_shortcut () { | |
COMP_LINE=\"git $2\${COMP_LINE#$1}\" |
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 |
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
3beca26 HEAD@{0}: commit: test | |
803f48e HEAD@{1}: reset: moving to HEAD^ | |
929730f HEAD@{2}: reset: moving to 929730f | |
6d45432 HEAD@{3}: checkout: moving from master to temp | |
6d45432 HEAD@{4}: commit (amend): update: correct bug in deletion checking | |
6cc3850 HEAD@{5}: commit: update: correct bug in deletion checking | |
78fd620 HEAD@{6}: reset: moving to HEAD^ | |
0602db4 HEAD@{7}: revert: Revert "update: add debug output" |
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
from spiral import write_spiral | |
write_spiral(7) | |
# Prints: | |
# 37 36 35 34 33 32 31 | |
# 38 17 16 15 14 13 30 | |
# 39 18 5 4 3 12 29 | |
# 40 19 6 1 2 11 28 | |
# 41 20 7 8 9 10 27 |
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 | |
# 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
/** | |
* Given "w h" on the first line of stdin, then `h` lines of grid with '0's for | |
* dead cells and '1's for live cells, output the next generation according to | |
* the rules of the Game of Life. | |
*/ | |
object GameOfLife extends App { | |
val Array(width, height) = readLine.split(" ").map(_.toInt) | |
val lines = for(i <- 0 until height) yield readLine | |
lines |
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
Metrics/ClassLength: | |
Max: 10 |
OlderNewer