This file contains hidden or 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
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* | |
* Modified by | |
* (c) Tony Schneider | |
* | |
* MIT License | |
*/ | |
(function( win ){ |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'raptor' | |
class Posts | |
end | |
class Users | |
end |
This file contains hidden or 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
startOfMonth: (date) -> | |
startOfMonth = date.beginningOfMonth() | |
console.log startOfMonth.format('{MM}-{DD}-{YYYY}') | |
endOfMonth: (date) -> | |
endOfMonth = date.endOfMonth() | |
console.log endOfMonth.format('{MM}-{DD}-{YYYY}') | |
# Maybe this? |
This file contains hidden or 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
000 SUB RECEIVE_REFUND | |
010 ASK POLITELY | |
020 IF REFUND = "YES" THEN | |
030 GOTO GOODBYE | |
040 ELSE | |
050 GOTO ASK_STERNLY | |
060 END IF | |
070 ASK_STERNLY: | |
080 ASK STERNLY | |
090 IF REFUND = "YES" THEN |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
body { | |
background: white; | |
text-align: center; | |
padding: 20px; | |
font-family: Georgia, serif; |
This file contains hidden or 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
# Original definition | |
class Whatever | |
def initialize | |
end | |
end | |
# Redefinition | |
class Whatever | |
alias_method :old_initialize, :initialize | |
def initialize(*args, &block) |
This file contains hidden or 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
class MeetingDates | |
def initialize | |
@crb_dates = [] | |
@jam_dates = [] | |
calc_meeting_dates | |
end | |
def calc_meeting_dates | |
start_date = Date.today.beginning_of_year | |
(0..12).inject([]){|s, num| dates_for_month(start_date + num.months)} |
This file contains hidden or 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
roles do | |
role :admin, [:read, :write, :execute] | |
role :user do |r| | |
action :read | |
end | |
end |
This file contains hidden or 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
require 'rspec' | |
require 'date' | |
describe "Tim's Methods:" do | |
let(:tim) { TimAffinity.new } | |
context "Tim is in India and" do | |
it "should be clear that Tim needs to get his ass back here" do | |
tim.do_we_want_him_back?.should be_true |
NewerOlder