- Absolut 100
- Belvedere
- Heart of the Hudson
- Karlsson's
- Smirnoff Black
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby-prof `which rake` environment | |
/Users/corey/.rvm/gems/ruby-1.9.3-p194/gems/ruby-prof-0.11.2/bin/ruby-prof:258: [BUG] Segmentation fault | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0] | |
-- Control frame information ----------------------------------------------- | |
c:0003 p:0029 s:0010 b:0009 l:0008c8 d:000008 BLOCK /Users/corey/.rvm/gems/ruby-1.9.3-p194/gems/ruby-prof-0.11.2/bin/ruby-prof:258 | |
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH | |
c:0001 p:0000 s:0002 b:0002 l:001a48 d:001a48 TOP | |
-- Ruby level backtrace information ---------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'rubygems' | |
require 'twilio-ruby' | |
require 'nokogiri' | |
require 'typhoeus' | |
# Setup Request | |
url = "http://www.kickstarter.com/projects/martinkallstrom/memoto-lifelogging-camera" | |
selector = "#what-you-get li:nth-child(4)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# db/migration/2013_add_skills_users_join_table.rb | |
class AddSkillsUsersJoinTable < ActiveRecord::Migration | |
# see http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association | |
def change | |
create_table :skills_users do |t| | |
t.belongs_to :skill | |
t.belongs_to :user | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('div,p,section,header,footer,ul,ol,li').each(function(){ | |
var h, el, baseline; | |
el = $(this); | |
height = el.outerHeight(); | |
baseline = 13; | |
if (Math.round(height) % baseline > 0) { | |
el.addClass('boink'); | |
console.log( height, this ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Non-Blocking iFrames | |
$ -> | |
$('iframe[data-src]').each -> | |
this.setAttribute 'src', this.getAttribute 'data-src' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only bind if/when GA loads | |
ga -> | |
$('a[href*="//"]').click (e) -> | |
e.preventDefault() | |
url = $(this).attr('href') | |
# define the callback | |
action = -> document.location = url | |
# record the click as an event |
I hereby claim:
- I am coreyward on github.
- I am coreyward (https://keybase.io/coreyward) on keybase.
- I have a public key whose fingerprint is 588A B309 8DE7 3379 60A5 6BE5 8095 E17F 15D4 EE89
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body { | |
font-family: "Open Sans", Helvetica, Arial; | |
background: #1A293E; | |
color: #fff; | |
} | |
#logo, | |
#header { | |
display: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date::DATE_FORMATS[:default] = "%m/%d/%Y" | |
module FixDateFormatting | |
class EasyDate < ActiveRecord::Type::Date | |
def cast_value(value) | |
default = super | |
parsed = Chronic.parse(value)&.to_date if value.is_a?(String) | |
parsed || default | |
end | |
end |