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
payments = crossfilter([ | |
{ date: "2011-11-14T16:17:54Z", total: 190, tip: 100, type: "tab" }, | |
{ date: "2011-11-14T16:20:19Z", total: 190, tip: 100, type: "tab" }, | |
{ date: "2011-11-14T16:28:54Z", total: 300, tip: 200, type: "visa" }, | |
{ date: "2011-11-14T16:30:43Z", total: 90, tip: 0, type: "tab" }, | |
{ date: "2011-11-14T16:48:46Z", total: 90, tip: 0, type: "tab" }, | |
{ date: "2011-11-14T16:53:41Z", total: 90, tip: 0, type: "tab" }, | |
{ date: "2011-11-14T16:54:06Z", total: 100, tip: 0, type: "cash" }, | |
{ date: "2011-11-14T16:58:03Z", total: 90, tip: 0, type: "tab" }, | |
{ date: "2011-11-14T17:07:21Z", total: 90, tip: 10, type: "tab" }, |
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 'beaneater' | |
require 'json' | |
@beanstalk = Beaneater::Pool.new(['localhost:11300']) | |
total = 0 | |
puts "Listening for jobs..." | |
@beanstalk.jobs.register('test-tube') do |job| | |
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 'benchmark' | |
require 'rubygems' | |
require 'active_support/all' | |
@config = [] | |
10.times do |x| | |
options = {} | |
10.times { |y| options["key#{y}"] = "value#{y}" } | |
@config << ["name#{x}", options] | |
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
var V = { | |
init: function(x, y, z) { | |
return { x: x, y: y, z: z }; | |
}, | |
add: function(v1, v2) { | |
return { | |
x: v1.x + v2.x, | |
y: v1.y + v2.y, | |
z: v1.z + v2.z |
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
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Demo</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script src="http://raphaeljs.com/raphael.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript" charset="utf-8"> |
NewerOlder