Skip to content

Instantly share code, notes, and snippets.

View joshgoebel's full-sized avatar
💭
Playing with GitHub status.

Josh Goebel joshgoebel

💭
Playing with GitHub status.
  • CoverMyMeds
  • Louisville, KY
View GitHub Profile
#!/bin/bash
# first clone the stan docs repo
# git clone https://github.com/stan-dev/docs.git
# then cd into it and run this script
grep_version=$(grep -V)
grep_=${1:-grep}
bsd='BSD'
if [[ $(grep -V) == *"$bsd"* ]] && [[ $# -eq 0 ]]
r = pipeline(3) \
| :dec \
| [:add, 2] \
| [:mul, 5] \
| :double
puts r.value
r = pipeline(3) do
dec
@joshgoebel
joshgoebel / ephemeral_token.rb
Created December 16, 2015 22:04 — forked from evadne/ephemeral_token.rb
Ephemeral Secure Token with JWT
class EphemeralToken
attr_reader :origin, :targets, :expires_at, :payload
class TokenInvalid < StandardError; end
class TokenExpired < TokenInvalid; end
Algorithm = 'HS512'
Secret = ENV['SECRET_EPHEMERAL_TOKEN_KEY']
ObjectToNotation = -> (target) { [target.class.model_name.name, target.id] }
NotationToObject = -> ((model_name, model_id)) { model_name.constantize.find_by_id(model_id) }

ruby-1.9.3-p448 cumulative performance patch for rbenv

(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)

This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

sub vcl_recv {
#FASTLY recv
}
sub vcl_hash {
#FASTLY hash
}
sub vcl_error {