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> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
<h3 class="title">Picklive buzz</h3> | |
<script type="text/javascript"> | |
var rotater = function(selector) { |
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
#!/usr/bin/ruby | |
STDIN.read.split("\n").each do |file| | |
file.gsub!("\n","") | |
cmd = <<-CMD | |
git mv #{file} #{file}~ | |
git mv #{file}~ #{file.downcase} | |
CMD | |
unless file == file.downcase | |
`#{cmd}` | |
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
nice = {'^':"it looks like a lambda! Also, if you pick a random point in time, I'm probably typing 'functio...' (-> now", "foo, 'bar', baz":"it's nicer than #{} even, especially with implicit spaces (tho how do you disable that? eg with 'foo, 'string'')", "semantic whitespace":"newbies don't like typing line noise like. semantic whitespace is visually intuative"} | |
suggestions_for_improvements = {"not being able to escape quotes":"it's awkward", "cmr-r being broken":"If I type r's in the repl, with a syntax error, the cmd-r shortcut often fires and I can't type", "== and === ":"is and isnt are more comprehensible to non-nerds", "the lack of for comprehensions":"functional iterators are less friendly to non-nerds"} | |
explain = ^(explainer, list) { Object.keys(list).forEach ^(reason) { print explainer, reason, "because", list[reason] } } | |
explain "I like", nice | |
explain "I don't like", suggestions_for_improvements | |
bank_account = ^(balance) { | |
^(cmd,amount) { | |
amount || (amount = 0) | |
if(cmd == "withdraw") bank |
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
function NoMethodError(method) { | |
this.name = "NoMethodError"; | |
this.message = method + " is not defined"; | |
} | |
NoMethodError.prototype = Error.prototype; | |
Object.prototype.methodMissing = function(method,args) { | |
throw new NoMethodError(method) | |
} |
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
define [], -> | |
periods = | |
second: second = 1000 | |
minute: min = 60 * second | |
hour: hour = min * 60 | |
day: day = hour * 24 | |
week: week = day * 7 | |
month: month = day * 29.6 | |
year: day * 356 |
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
puts "Watching #{ARGV[0]}" | |
changed = false | |
last = false | |
until changed | |
page = `curl #{ARGV[0]}` | |
unless last == false | |
changed = page != last | |
end | |
last = page | |
sleep 60 |
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 "net/http" | |
require "csv" | |
require "addressable/uri" | |
require "pp" | |
unstable_urls = ARGV[0] | |
stable_urls = ARGV[1] | |
urls = {} | |
[[unstable_urls,:grep],[stable_urls,:change]].each do |urls_file,technique| | |
CSV.read(urls_file).map { |url| |
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
<style> | |
.wrap { | |
-webkit-transition: all 1s; | |
position:absolute; | |
bottom: 0; | |
height: 0; | |
width: 0; | |
overflow: hidden; | |
-webkit-transition-delay: 1s; | |
} |
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
rgs =rgs.select {|rg| rg.scheduled_at > Date.parse("2011/08/15") } | |
ratios = rgs.map {|rg| | |
first_half, second_half = rg.entries.select {|e|e.big_game.game_type == "short"} | |
.partition{|e| /^(\d)/=~e.big_game.start_point; $1.to_i == 1 } | |
second_half.length / first_half.length.to_f | |
} |
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
$(".stream-item").map(function() { | |
t = $(this); | |
return { | |
profile: t.find("img.user-content-image").attr("src"), | |
twitter: t.find("a.user-profile-link strong").html(), | |
fullName: t.find(".full-name").html(), | |
description: t.find(".user-description").html() | |
} | |
}); |