Skip to content

Instantly share code, notes, and snippets.

for file in ~/.{path,bash_prompt,exports,aliases,functions,git-completion.bash}; do
[ -r "$file" ] && source "$file"
done
unset file
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
export PATH="$HOME/.cargo/bin:$PATH"
#!/usr/bin/env ruby
#
require "csv"
require "timeout"
bad_ips = []
time = ARGV[1].to_i || 3
CSV.foreach(ARGV[0], headers: true) do |row|
defmodule LoanSchedule do
def perform(apr, monthly_payment, balance) do
schedule = calculate(apr, monthly_payment, balance, 0, %{})
total_payments = Map.keys(schedule) |> Enum.max
total_paid = Map.values(schedule) |> Enum.reduce(0, fn(loan, acc) -> loan[:monthly_payment] + acc end)
[
payment_schedule: schedule,
loan_details: %{
apr: apr,
monthly_payment: monthly_payment,
function parse_git_dirty() {
[[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*"
}
function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}
function this() { # obtain git branch
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
MAGENTA=$(tput setaf 125)
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
colorflag="-G"
fi
alias be='bundle exec'
alias ber='bundle exec rake'
alias bes='bundle exec rspec'
set nocompatible " Must come first because it changes other options.
silent! call pathogen#runtime_append_all_bundles()
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
runtime macros/matchit.vim " Load the matchit plugin.
set showcmd " Display incomplete commands.
[alias]
# Show verbose output about tags, branches or remotes
tags = tag -l
br = branch -a
paths = remote -v
# Pretty log output
lol = log --graph
c = commit -m
a = add .
st = status --short --branch

Keybase proof

I hereby claim:

  • I am bomatson on github.
  • I am bomatson (https://keybase.io/bomatson) on keybase.
  • I have a public key ASB0pH0YZrJbszO1L3ybur33QddMcUxlueRsIEBMFFgYEQo

To claim this, I am signing this object:

@bomatson
bomatson / index.html
Created August 18, 2015 01:29
oXRoOa
.bobby
h1.heading Bobby