Skip to content

Instantly share code, notes, and snippets.

View jaronson's full-sized avatar

Josh Aronson jaronson

View GitHub Profile
def get_fizzy_with_it(value)
''.tap do |out|
is_multiple(value, 3) && out << 'Fizz'
is_multiple(value, 5) && out << 'Buzz'
end
end
def is_multiple(value, n)
value % n == 0
end
@jaronson
jaronson / yardoc_cheatsheet.md
Created September 26, 2015 01:04 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

#!/usr/bin/env bash
name=$1
config='.tmuxrc'
[[ -n $name ]] && config=".$name.$config"
if [ ! -f "$config" ];
then
echo "$0: cannot stat '${config}': No such file."
@jaronson
jaronson / ubuntu-bootstrap.sh
Created May 11, 2015 02:39
ubuntu-bootstrap
sudo apt-get -y update
sudo apt-get install build-essential git
cd /home/ubuntu
curl -k -O \
https://gist.githubusercontent.com/jaronson/ebd2da49ce5ea33bf7cf/raw/0a84bb4b0500a67bab096533b208c3ba8c6a6a75/.vimrc
curl -k -O \
https://gist.githubusercontent.com/jaronson/3a6e2104740ffcb79128/raw/8d26ea5dae957fdc63fd28c98a9669b9aeffddfb/.tmux.conf
@jaronson
jaronson / tmuxg
Created March 26, 2015 14:44
tmuxg
#!/usr/bin/env bash
name=$1
config='.tmuxrc'
[[ -n $name ]] && config="$name.$config"
if [ ! -f "$config" ];
then
echo "$0: cannot stat '${config}': No such file."
echo "export PATH=/opt/puppet/bin:$PATH" >> ~/.bashrc
echo "alias l='ls -lah'" >> ~/.bashrc
echo "alias vi='vim'" >> ~/.bashrc
source ~/.bashrc
yum -y install screen
curl -k https://gist.githubusercontent.com/jaronson/42a1ab237055861eac16/raw/8be9de09a00bd26c70cda1b185770dd989b17022/.screenrc-main-example -o ~/.screenrc
curl -k https://gist.githubusercontent.com/jaronson/ebd2da49ce5ea33bf7cf/raw/0a84bb4b0500a67bab096533b208c3ba8c6a6a75/.vimrc -o ~/.vimrc
escape ^Tt
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# Enables use of shift-PgUp and shift-PgDn
termcapinfo xterm|xterms|xs|rxvt ti@:te@
set nocompatible
let mapleader=","
let maplocalleader=","
let g:mapleader=","
let g:Powerline_symbols='unicode'
let g:airline_powerline_fonts=1
let g:localvimrc_ask=0
let g:indentLine_char='|'
let g:indentLine_color_term=0
unbind C-b
set-option -g prefix C-t
set -g status on
set -g status-bg colour234
set -g status-utf8 on
set -g status-utf8 on
# Start numbering at 1
set -g base-index 1
@jaronson
jaronson / unicorn
Created May 28, 2014 19:48
Unicorn init script
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the unicorns at boot
# Description: Enable at boot time.
### END INIT INFO