Skip to content

Instantly share code, notes, and snippets.

@bobbyno
bobbyno / amz.boot
Created April 11, 2014 17:36
Quick test of manipulating amazon with boot
#!/usr/bin/env boot
#tailrecursion.boot.core/version "2.3.1"
(set-env! :dependencies '[[amazonica "0.2.11"]])
(require '[amazonica.aws.ec2 :as ec2]
'[amazonica.core :refer [defcredential]])
(defcredential
(System/getenv "AWS_ACCESS_KEY_ID")
@bobbyno
bobbyno / prod.sh
Created May 22, 2013 17:54
See the commit currently running in Heroku
#!/usr/bin/env bash
git ls-remote heroku | awk 'END{print $1}' | xargs git show
@bobbyno
bobbyno / repl.sh
Created February 9, 2013 07:04
Use your Heroku .env settings to initialize environment variables available within a Groovy shell.
#!/usr/bin/env bash
eval "$(tr '\n' ' ' < .env)mvn groovy:shell"
@bobbyno
bobbyno / deploy.sh
Last active December 12, 2015 02:28
Workarounds for compilation errors in the Heroku asset pipeline
#!/usr/bin/env bash
printf "Precompiling assets..."
rake assets:precompile
printf "\nCommitting assets to git..."
git add public/assets/
git commit -am "Update asset pipeline"
printf "\nDeploying to Heroku..."
git push heroku
printf "\nRemoving assets..."
@bobbyno
bobbyno / mit_scheme_bindings.txt
Created August 11, 2012 17:53
MIT Scheme bindings suitable for rlwrap completion
#
#!optional
#!rest
#(
#\
#\altmode
#\backnext
#\backspace
#\call
#\linefeed
@bobbyno
bobbyno / tcurl
Created March 27, 2012 21:58
curl with timing
#!/usr/bin/env bash
result=`curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $1`
echo -e "Time_Connect\tTime_startTransfer\tTime_total"
echo $result | awk -F: '{ print $1"\t"$2"\t"$3 }'