I hereby claim:
- I am adamheins on github.
- I am adamheins (https://keybase.io/adamheins) on keybase.
- I have a public key whose fingerprint is BE6E 8AB0 440B 2DA4 9880 A284 8393 976B CE8F 5796
To claim this, I am signing this object:
#!/bin/bash | |
# Aliases for changing directories. | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias -- -="cd - >/dev/null 2>&1" |
#!/bin/bash | |
# Print all of the terminal colors. | |
colors() { | |
local count=0 | |
local cols=$(tput cols) | |
for i in {0..255}; do | |
((count+=4)) | |
if [ $count -gt $cols ]; then | |
printf "\n" |
#!/bin/bash | |
# Simple JIRA CLI utility. | |
# Currently only works on OSX (since it makes use of OSX's built-in | |
# open command). | |
jira() { | |
if [ -z "$1" ]; then | |
open "$JIRA_URL""/secure/Dashboard.jspa" | |
return 0 |
#/bin/bash | |
# If the cwd is a git repo, display the branch name in the tmux status bar. | |
get_git_branch() { | |
if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then | |
local branch short_branch | |
branch=$(git symbolic-ref -q HEAD) | |
branch=${branch##refs/heads/} | |
branch=${branch:-HEAD} | |
short_branch=$(echo "$branch" | cut -c1-20) |
import imp | |
import os | |
def secret_import(path): | |
""" Alternative way to import a module that allows importing of hidden | |
directories and files. """ | |
if os.path.isdir(path): | |
name = path.split(os.path.sep)[-1] | |
if name[0] == '.': | |
name = name[1:] |
# Sourced here: | |
# https://gist.github.com/2491147 | |
# | |
# Modified by Adam Heins | |
# | |
# Usage: git submodule rm [-c] <path/to/submodule> | |
# You must be in the root of the git repository to use this command. The -c | |
# (or --clean) option indicates that the submodule files should also be removed | |
# from the working tree. |
# ALT-C - cd into the selected directory or open file | |
fzf-cd-widget() { | |
local p="${$(command \find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ | |
-o -print 2> /dev/null | sed 1d | cut -b3- | $(__fzfcmd) +m):-.}" | |
if [ -d "$p" ]; then | |
cd "$p" | |
elif [ -f "$p" ]; then | |
"$EDITOR" < /dev/tty "$p" | |
else | |
echo "$p" |
#!/bin/zsh | |
# Author: Adam Heins | |
# Date: 2015-10-22 | |
t() { | |
# Make the ~/.t directory if it does not exist. | |
[ ! -d ~/.t ] && mkdir ~/.t | |
if [ -z "$1" ]; then |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
CMAKELISTS_FILE_NAME = 'CMakeLists.txt' | |