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 'youtube_it' | |
PLAYLIST_TITLE = "Turntable to Plug" | |
auth = { | |
dev_key: <your key>, | |
username: <your Youtube username>, | |
password: <your Youtube password> | |
} |
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
# usage: | |
# when_constant "Foo::BAR", 'baz' do | |
# # do something | |
# end | |
def when_constant(constant_string, new_value) | |
class_or_module = nil | |
constant_name = nil | |
if constant_string =~ /::/ |
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
body{ | |
margin: 0 auto; | |
font-family: Georgia, Palatino, serif; | |
color: #444444; | |
line-height: 1; | |
max-width: 960px; | |
padding: 30px; | |
} | |
h1, h2, h3, h4 { | |
color: #111111; |
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
# Playing around with a Toy Stubbing "framework" | |
class Statistics | |
def initialize(nums) | |
@nums = nums | |
end | |
def compute_average | |
sum = 0; | |
@nums.each do |num| | |
sum += num |
NewerOlder