This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/bin/bash | |
fetchall=true | |
fetchlast=false | |
download=false | |
configfile=~/.tv.cfg | |
trim() { | |
local var="$*" | |
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters | |
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters |
var second_scenario = [ | |
scene2_start_final, | |
scene2_end, | |
scene3_start, | |
scene3_heartbeat, | |
scene3_end | |
]; |
var main_scenario = [ | |
scene1_start, | |
scene1_heartbeat, | |
scene1_end, | |
scene2_start, | |
scene2_end, | |
scene3_start, | |
scene3_heartbeat, | |
scene3_end | |
]; |
var rect = chart.selectAll("rect") | |
.data(data, function(d) { return d.time; }); | |
rect.enter().insert("rect") | |
.attr("x", function(d, i) { return x(i + 1) - 0.5; }) | |
.attr("y", function(d) { return h - y(d.value) - 0.5; }) | |
.attr("width", w) | |
.attr("height", function(d) { return y(d.value); }) | |
.transition() | |
.duration(1000) |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer