Skip to content

Instantly share code, notes, and snippets.

/* cssWalker.js
*
* Traverse every stylesheet in the document and filter based on their selectors.
*
* @Requires: Nothing, completely standalone.
*
* @Returns: An array of style objects/rules. The order of the array is determined by the point
* of the stylesheet in the document - e.g, first stylesheet rules are top of the array.
*
* @Author: Ryan McGrath (ryan@webs.com)
/*
Handy url redirection that's as flexilbe as the href attribute of A tags.
There might have been an easier way to do this, if so, let me know how stupid
I am :)
Example:
*** Browser is on http://my.domain.com:3000/hello/world.html
ssh_user = "user@domain.com" # for rsync deployment
remote_root = "~/domain.com/path.to/project" # for rsync deployment
def fs_deploy(relative)
puts ">>> Change Detected to: #{relative} >> Deploying"
system("rake deploy")
end
desc "Watch the site and regenerate when it changes"
task :watch do
(function () {
d3.analog= function() {
var height = 100, gap=10,
xValue = function(d) { return d[0]; },
xScale = null,
color = d3.scale.category10();
function chart(selection) {
selection.each(function(d) {
var g = d3.select(this);