I hereby claim:
- I am guitsaru on github.
- I am guitsaru (https://keybase.io/guitsaru) on keybase.
- I have a public key whose fingerprint is F939 6BCA DB3D 1249 B84C BE50 D780 2993 7E96 C6EE
To claim this, I am signing this object:
#!/bin/bash | |
export DOTENV_ENV=${DOTENV_ENV:-dev} | |
GIT_DIR=$(git rev-parse --show-toplevel 2>/dev/null || pwd) | |
DOTENV_FILE=$GIT_DIR/.env.$DOTENV_ENV | |
if [ -e $DOTENV_FILE ]; then source $DOTENV_FILE; fi | |
$@ |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'formula' | |
class Forego < ScriptFileFormula | |
homepage 'https://github.com/ddollar/forego' | |
url 'https://godist.herokuapp.com/projects/ddollar/forego/releases/0.8.2/darwin-amd64/forego' | |
sha1 '62f4c0cb7e48647ca7c9ef4a801f49576b577d4a' | |
version '0.8.2' | |
test do | |
system "#{bin}/forego", "version" |
class Tournament < ActiveRecord::Base | |
include Bracket::Swiss # (OR Bracket::KOTH OR Bracket::SingleElimination etc) | |
end | |
module Bracket | |
module KOTH | |
def self.included(base) | |
base.workflow do | |
# state and events for a king of the hill tournament | |
end |
stateString :: Int -> Bool -> String | |
stateString i False = "Case #" ++ show i ++ ": OFF" | |
stateString i True = "Case #" ++ show i ++ ": ON" | |
isOn :: Int -> Int -> Bool | |
isOn snappers snaps = isInt ((fromIntegral (snaps + 1) :: Double) / (fromIntegral (2^snappers) :: Double)) | |
where isInt :: Double -> Bool | |
isInt d = (d - fromIntegral (floor d) :: Double) == 0 | |
readInput :: String -> [(Int, Int)] |
$('.action.new[data-content][data-association]').click(function () { | |
var new_id = new Date().getTime(); | |
var regexp = new RegExp("new_" + $(this).attr('data-association'), "g"); | |
$(this).before($(this).attr('data-content').replace(regexp, new_id)); | |
return false; | |
}); |
class Array | |
def pick(number) | |
result = [] | |
original = self.clone | |
if number < original.size | |
number.times { result << original.delete_at(Kernel.rand(original.size)) } | |
else | |
result = original | |
end |
define_index do | |
set_property :enable_star => true | |
set_property :min_prefix_len => 3 | |
set_property :delta => true | |
indexes number, city, state, zip, status | |
indexes message.transcription, :as => :message | |
indexes assignee.display_name, :as => :assignee | |
indexes tags.name, :as => :tag | |
indexes comments.body, :as => :comments |