Clone repo:
git clone git://github.com/maccman/juggernaut.git
cd juggernaut
Create Heroku app:
heroku create myapp --stack cedar
heroku addons:add redistogo:nano
git push heroku master
/* | |
* Widget that tracks the state of a togglable item. To toggle, click on the | |
* item. No visible action is taken directly, but events and callbacks are | |
* fired (via _trigger()) so that callbacks may change state | |
*/ | |
$.widget("ui.toggle", { | |
/* | |
* Constructor -- attach a click handler which calls the toggle() function. | |
*/ | |
_init: function(){ |
function! s:ToDoList () | |
cclose | |
let task_list = [] | |
for row in split(system('ack --column "(TODO|CHANGED|FIXME)"'), '\n') | |
let t = split(row, ':') | |
let task_dict = {'filename': t[0], 'lnum': t[1], 'col': t[2]} | |
let task_dict.text = substitute(join(t[3:-1]), '\s\+', ' ', '') | |
let task_list += [task_dict] | |
endfor | |
call setqflist(task_list, 'r') |
import logging | |
l = logging.getLogger('django.db.backends') | |
l.setLevel(logging.DEBUG) | |
l.addHandler(logging.StreamHandler()) |
import sys, os, re | |
from django import template | |
from django.template import loader | |
TURING_MACHINE = """ | |
{% if not current_state %} | |
{% with INITIAL_STATE as current_state %} | |
{% with INITIAL_HEAD|default:0|add:1 as pos %} | |
{% with "@"|add:TAPE as tape %} | |
{% with "TURING_MACHINE" as tm_tpl %} |
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'rubygems' | |
gem_dirs = [] | |
basedir = 'deps' | |
FileUtils.mkdir_p(basedir) | |
ARGV.each do |gemset| |
Clone repo:
git clone git://github.com/maccman/juggernaut.git
cd juggernaut
Create Heroku app:
heroku create myapp --stack cedar
heroku addons:add redistogo:nano
git push heroku master
class MyRender << Fiasco::Render | |
def render(name, locals = {}) | |
if ENV['RACK_ENV'] == 'development' && @templates[name] | |
@compiled.delete(name) | |
declare(name, @templates[name].filename) | |
end | |
super(name, locals) | |
end | |
end |
#!/bin/env ruby | |
# lazy hack from Robert Klemme | |
module Memory | |
# sizes are guessed, I was too lazy to look | |
# them up and then they are also platform | |
# dependent | |
REF_SIZE = 4 # ? | |
OBJ_OVERHEAD = 4 # ? |
--- | |
title: "Basketball Size" | |
output: html_notebook | |
gif is up at http://imgur.com/dobmMWM | |
--- | |
This is a copy of this NFL visualisation.<http://noahveltman.com/nflplayers/> | |
I couldnt find the R code to recreate it. I could find data for basketball at <https://github.com/simonwarchol/NBA-Height-Weight>. | |
First get Simon Warchols data and stitch his csvs together |