I hereby claim:
- I am robhurring on github.
- I am robh (https://keybase.io/robh) on keybase.
- I have a public key whose fingerprint is 433D 3918 FF86 850F 4293 9BB4 9957 F49F 5C33 DE2A
To claim this, I am signing this object:
# this: https://gist.github.com/464257 in coffeescript, without the global stuff... | |
class EventsDispatcher | |
callbacks: {} | |
bind: (event_name, callback) -> | |
@callbacks[event_name] ||= [] | |
@callbacks[event_name].push callback | |
@ | |
trigger: (event_name, data) -> |
require 'thread' | |
module Actor | |
class << self | |
def included(base) | |
base.extend(ClassMethods) | |
end | |
def current | |
Thread.current[:actor] |
I hereby claim:
To claim this, I am signing this object:
This is just a snippet. For a working example see JSFidde: http://jsfiddle.net/robhurring/eVBug/light/
/u/local: pwd b3bb610 | |
/usr/local | |
~/P/proccli: pwd master da99d97 2↓ ✽ | |
/Users/rob/Projects/proccli |
require 'selenium-webdriver' | |
module FeatureHelpers | |
DEFAULT_WAIT_TIME = 30 | |
Capybara.register_driver :poltergeist_debug do |app| | |
Capybara::Poltergeist::Driver.new(app, | |
inspector: true, | |
js_errors: true, | |
timeout: DEFAULT_WAIT_TIME |
This is just a snippet. For a working example (without geolocation) see JSFidde: http://jsfiddle.net/robhurring/fKbka/light/
# add this to your ~/.slate file | |
# source our grid | |
source ~/.slate.grid if_exists | |
# use the grid to position windows | |
alias left-half move 0;0 ${span-6};${row-12} | |
alias right-half move ${push-6};0 ${span-6};${row-12} | |
alias top-left-quarter move 0;0 ${span-6};${row-6} | |
alias top-right-quarter move ${push-6};0 ${span-6};${row-6} |
# small concern that allows you to override the field names for validation messages | |
# | |
# Example: | |
# | |
# # without concern | |
# class User < ActiveRecord::Base | |
# validates :name, presence: true | |
# end | |
# # => "Name can't be blank" | |
# |
<?php | |
function fuzzy_date($timestamp) | |
{ | |
$myDays = array("Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"); | |
if( preg_match("/[-\/:]/", $timestamp) ) | |
$timestamp = strtotime($timestamp); | |
if($timestamp > time()) | |
// All future dates |