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
$(window).load(function() { | |
// config | |
var cyan = "#009fee"; | |
var white = "#ffffff"; | |
var paperCenterX = $(window).width() / 2; | |
// timings | |
var lineFadeInTime = 2000; | |
var whiteGFadeInTime = 2000; |
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
# original ApplicationController | |
class ApplicationController | |
def home_page? | |
"original" | |
end | |
end | |
puts ApplicationController.new.home_page? | |
# => original |
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
hash1 = %w(cat dog wombat).each_with_object({}) do |item, memo| | |
memo[item] = item.upcase | |
end | |
p hash1 | |
# => {"cat"=>"CAT", "dog"=>"DOG", "wombat"=>"WOMBAT"} | |
hash2 = %w(cat dog wombat).inject({}) do |memo, item| | |
memo[item] = item.upcase | |
memo |
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
require 'open-uri' | |
#uri = "http://www.zeldman.com/wp-content/themes/zeldman-v2/style.css?0111110710" | |
#uri = "http://asset2.betterplace.org/stylesheets/screen.css?1299172234" | |
uri = 'http://www.xing.com/css/v/144/general.min.css' | |
def parse_css_colors(uri) | |
file = open(uri).read | |
hex_colors = file.scan(/#[a-f0-9]{3,6}/i) |
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
http://zenadmin.org/en | |
http://railfrog.com/ | |
http://www.geegocms.com/ | |
http://nanoc.stoneship.org/ | |
http://slatecms.wvu.edu/ | |
http://rubricks.org/index_en.html | |
http://code.google.com/p/palani/ | |
http://agilewebdevelopment.com/plugins/station | |
http://intraducibles.com/projects/typus |
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
require 'test/unit' | |
def f(x); x != 0 && x * f(x - 1) || 1; end | |
class FactorialTest < Test::Unit::TestCase | |
def test_factorial_0_is_1 | |
assert_equal 1, f(0) | |
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
require 'test/unit' | |
def factorial(max) | |
(1..max).inject(1) { |sum, current| sum *= current; sum } | |
end | |
class FactorialTest < Test::Unit::TestCase | |
def test_factorial_0_is_1 | |
assert_equal 1, factorial(0) |
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
# | |
# CONTROLLER | |
# | |
# POST /admin/voucher_set | |
class Admin::VoucherSetController < ... | |
def create | |
VoucherSet.create!(params) | |
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
10:20 Intro | |
10:30 Patterns in Architecture Joseph Yoder Stanford Architecture http://qconsf.com/sf2009/presentation/Patterns+in+Architecture | |
11:45 Kanban vs Scrum - a practical guide Henrik Kniberg Metro Ballroom Lean/Kanban http://qconsf.com/sf2009/presentation/Kanban+vs+Scrum+-+a+practical+guide | |
13:45 adventures of an agile architect Dan North Stanford Architecture http://qconsf.com/sf2009/presentation/Adventures+of+an+Agile+Architect | |
15:00 Roadmap to Continuous Deployment Nathan Dye Stanford Architecture http://qconsf.com/sf2009/presentation/Roadmap+to+Continuous+Deployment | |
16:30 Rails in the Large ... Neil Ford Cornell Facets of Ruby http://qconsf.com/sf2009/presentation/Rails+in+the+Large%3A+How+Agility+Allows+Us+to+Build+One+of+the+World%27s++Biggest+Rails+Apps | |
18:00 The State and future of JavaScript Douglas Crockford http://qconsf.com/sf2009/ |
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
funkyness = ->(number){ puts "FUNKY! " * number } | |
(1..10).each(&funkyness) | |
FUNKY! | |
FUNKY! FUNKY! | |
FUNKY! FUNKY! FUNKY! | |
FUNKY! FUNKY! FUNKY! FUNKY! | |
FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! | |
FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! | |
FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! FUNKY! |