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
$(function() { | |
$("a#portfolio_link_1").click(function() { | |
$("div#portfolio_float_1").fadeIn(); | |
return false; | |
}) | |
$("a#portfolio_link_2").click(function() { | |
$("div#portfolio_float_2").fadeIn(); | |
return false; | |
}) | |
$("a#portfolio_link_3").click(function() { |
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
def setup_sightings_for_rollup | |
timespans = [ # [start_time, end_time, quantity, values] | |
[1.minute.ago, Time.now, 250, [1]], | |
[1.hour.ago, 1.minute.ago, 5000, [1]], | |
[1.day.ago, 1.hour.ago, 1500, [1, 2]], | |
[1.week.ago, 1.day.ago, 1000, [1, 2]], | |
[3.weeks.ago, 1.week.ago, 500, [1, 2]] | |
] | |
cities = { # city => divisor (for quantity) | |
'Atlanta' => 1, |
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
package com.twitter.node_registry | |
import scala.collection._ | |
import com.twitter.json.Json | |
import com.twitter.zookeeper.ZooKeeperClient | |
import net.lag.logging.Logger | |
import org.apache.zookeeper.Watcher.Event.KeeperState | |
import org.apache.zookeeper.{CreateMode, KeeperException, WatchedEvent} | |
trait Serializer { |
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
package com.twitter.scrooge | |
import org.apache.thrift.protocol._ | |
/** | |
* Autogenerated by Thrift | |
* | |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | |
*/ |
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
def apply(iprot: TProtocol) = { | |
var field: TField = null | |
var message: String = null | |
var another: Int = 0 | |
while(true) { | |
field = iprot.readFieldBegin | |
if(field.`type` == TType.STOP) { | |
break | |
} | |
field.id match { |
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
ruby -e "require 'rubygems'; require 'open-uri'; require 'rss'; require 'cgi'; puts CGI.unescapeHTML(RSS::Parser.parse(open('http://www.rapquote.com/rss')).items.last.description).gsub('<br/>', \"\\n\").gsub(/<(\\/?)\\w+>/i, '').gsub('“', '\"').gsub('”', '\"').gsub('’', '\'').gsub(' ', ' ')" | cowsay -g | lolcat | |
_________________________________________ | |
/ "Used to have a crush on Dawn from En \ | |
| Vogue. | | |
| | | |
| It's not like honey dip would wanna get | | |
| with me, | | |
| | | |
| But just in case I own more condoms | | |
| than TLC." | |
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
var a = null; | |
var promise = somethingLongTahtReturnsAPromise(); | |
function chainToAndSet(promise) { | |
promise.then(function(values) { a = values }) | |
return promise; | |
} | |
function sort() { | |
new Promise(function(values) { _.sort(values) } |
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
puts "whatsup" |
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
buttonObject = this | |
buttonObjectClass = $(this).attr("class") |