Skip to content

Instantly share code, notes, and snippets.

@sleepygarden
sleepygarden / gitlog.py
Created September 13, 2013 18:05
simple python git interface with tagging and tag searching.
# gitlog.py
# -*- coding: utf-8 -*-
import subprocess
import sys
#tag ideas? you can implement your own!
INFO_TAG="[INFO]" # just a heads up, default tag
FUCK_TAG="[FUCK]" # something broke! :c
CLEAN_TAG="[CLEAN]" # ripped out stuff, removed comments, etc
TODO_TAG="[TODO]" # didn't finish what i was doing
@sleepygarden
sleepygarden / banner.py
Last active December 22, 2015 18:59
pretty print a justified banner with colorama
# auto banner
import colorama
from colorama import Fore, Back, init
if __name__ == "__init__":
init()
def print_banner(banner_lines, fg=Fore.WHITE, bg=Back.BLACK, offset=0):
'''
prints all lines in list "banner_lines" justified by <'s or >'s, with
at least "offset" of each on each side of a line.
@sleepygarden
sleepygarden / clearly-zsh.sh
Last active December 22, 2015 14:48
Clear up zsh - when changing dirs without cd, will check if that will conflict with a command.
#!/bin/zsh
. ~/.zshrc
check_for_collision(){
is_exec=false
is_dir=false
if [ -d $FOO ]; then
is_dir=true
fi
alias $FOO > /dev/null && is_exec=true
echo "E"$is_exec