Skip to content

Instantly share code, notes, and snippets.

View chriskirkland's full-sized avatar
:fishsticks:

Chris Kirkland chriskirkland

:fishsticks:
View GitHub Profile
@chriskirkland
chriskirkland / printAST.go
Created September 16, 2019 15:55
print AST for Go file
package main
import (
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
"os"
)
@chriskirkland
chriskirkland / more-instantly-better-github-reviews.js
Last active March 4, 2019 22:50
more, instantly better github reviews
# For use with chrome extension JavaScript Injector
# pattern: https://github.*/*/*/pull/*/files
var divs = document.getElementsByClassName("container new-discussion-timeline experiment-repo-nav")
for (let i = 0; i < divs.length; i++) {
divs[i].style.width = 'auto';
divs[i].style.marginLeft = '25px';
divs[i].style.marginRight = '25px';
}
@chriskirkland
chriskirkland / .bashrc
Last active May 12, 2017 14:00
Bash prompt with kubernetes & git decorations
# Based on http://www.terminally-incoherent.com/blog/2013/01/14/whats-in-your-bash-prompt/
# Requires Bash >= 4.2
# Colors
Color_Off='\033[0m'
Red='\033[0;31m'
Green='\033[0;32m'
Purple='\033[0;35m'
LightBlue='\e[94m'
Dim='\e[2m'
@chriskirkland
chriskirkland / .bashrc
Created May 11, 2017 19:48
Decorating bash aliases to print the underlying command
# prints the underlying command for an alias
function print_alias() {
BLUE="\033[1;34m" # Light Blue
NC='\033[0m' # No Color
printf ">>> Running ${BLUE}$(alias $@ | cut -d"'" -f2 | cut -d";" -f2- | cut -d'&' -f3-| xargs)${NC}\n"
}
### source aliases to decorate
source ~/.bash_aliases_decorated