Skip to content

Instantly share code, notes, and snippets.

View armiller's full-sized avatar

Anthony Miller armiller

  • Linkedin
  • Sunnyvale, CA
View GitHub Profile
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'tpope/vim-fugitive'
"Plugin 'tpope/vim-endwise'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
@armiller
armiller / gist:da6ec42f11bb89be5602
Last active September 16, 2015 23:59
git aware prompt
export GITAWAREPROMPT=/home/armiller/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
export PS1="\${debian_chroot:+(\$debian_chroot)}\[\033[01;32m\]\u@workstation\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
@armiller
armiller / unicorn.rb
Created March 23, 2016 18:17
Example unicorn configuration file
# set path to application
app_dir = File.expand_path("../..", __FILE__)
shared_dir = "#{app_dir}/shared"
working_directory app_dir
# Set unicorn options
worker_processes 2
preload_app true
timeout 30
@armiller
armiller / recipe.rb
Created March 25, 2016 19:35
install packages from file
::File.open('/root/packages', 'r') do |f|
f.each_line do |l|
package l.strip
end
end
@armiller
armiller / .bashrc
Last active July 20, 2016 23:18
test kitchen remote
alias kitchen='$HOME/git/chef-repo/osuosl-cookbooks/workstation/files/default/kitchen/bin/kitchen'
export KITCHEN_GLOBAL_YAML='$HOME/git/chef-repo/osuosl-cookbooks/workstation/files/default/kitchen/kitchen.global.yml'
@armiller
armiller / test.rb
Last active September 7, 2016 14:34
Recursive test for node attributes
require 'chef/sugar'
def loop_hash(hash, keys = [], &block)
hash.each do |k, v|
if v.is_a?(Hash)
loop_hash(v, keys.push(k), &block)
keys.pop
elsif block
p = keys << k
yield(p.clone, v)
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"