Skip to content

Instantly share code, notes, and snippets.

@joannecheng
joannecheng / create.mkd
Last active December 18, 2015 16:29
Create a new user on linux

adduser [username]

passwd [username]

require 'json'
require 'httparty'
require 'sqlite3-ruby'
def get_trips(line)
url = "http://developer.mbta.com/lib/rthr/#{line}.json"
JSON.parse(HTTParty.get(url).body)
end
puts "start"
@joannecheng
joannecheng / _.md
Created June 11, 2013 01:33
coloradowildfires
@joannecheng
joannecheng / text_as_blueprint.rb
Created May 19, 2013 16:59
Text as blueprint, ruby-processing style
# Text As Blueprint
# http://www.openprocessing.org/sketch/60986
class TextAsBlueprint < Processing::App
def setup
size 600, 600
@text_typed = "hello world, how are you doing today"
@centerX = width/2
@centerY = height/2
@shapeSpace = loadShape('data/space.svg')
@joannecheng
joannecheng / index.html
Last active December 17, 2015 06:18
Colorado Wildfires
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke: steelblue;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v0.min.js"></script>
@joannecheng
joannecheng / index.html
Created May 12, 2013 15:52
bl.ocks template
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v0.min.js"></script>
<script>
</script>

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@joannecheng
joannecheng / _.md
Created April 11, 2013 20:28
github
let g:ScreenImpl = 'Tmux'
function! CustomScreenSend()
silent! %s/\s\+$//e
silent! g/^$/d
ScreenSend
silent! normal! ggdG
endfunction
@joannecheng
joannecheng / README.md
Created February 20, 2013 05:08
Tributary inlet

This donut chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features: