A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode different packages of the Flare visualization toolkit. Treemap design invented by Ben Shneiderman. Squarified algorithm by Bruls, Huizing and van Wijk. Data courtesy Jeff Heer.
This file contains 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
/* | |
vox2mtif | |
Copyright 2009 Randy Reddig - http://ydnar.com | |
CSS suitable for basic styling of Vox enclosures in a TypePad or Movable Type blog. | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
'Software'), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, |
This file contains 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
/* | |
vox2mtif | |
Copyright 2009 Randy Reddig - http://ydnar.com | |
CSS suitable for basic styling of Vox enclosures in a TypePad or Movable Type blog. | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
'Software'), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, |
This file contains 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
# Minimal Safe ERb for Rails 2.3 | |
# Automatically HTML-escapes: <%= expr %> | |
# To pass raw text through: <%== expr %> | |
# | |
# Based on Erubis 2.6.5 and a bit of Rails 3: | |
# http://github.com/rails/rails/commit/9415935902f120a9bac0bfce7129725a0db38ed3 | |
# | |
# To use, add this file to config/initializers and this line to environment.rb: | |
# config.gem "erubis", :version => "2.6.5" |
This file contains 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 'robots' | |
# Cucumber steps for robots.txt | |
# Requires the robots gem: http://github.com/fizx/robots | |
# Note: url_for() returns a fully-qualified URL, similar to path_to() | |
When /^I am a robot named (.+)$/ do |user_agent| | |
@robots = Robots.new user_agent | |
end |
This file contains 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
# Allow any Cucumber scenario to be called as a step in other scenarios | |
module Cucumber | |
module Ast | |
class Scenario | |
def initialize_with_awesome(*args) | |
initialize_without_awesome(*args) | |
src = @steps.map { |step| "When %Q{#{step.name}}" }.join("\n") | |
proc = Proc.new { eval src } | |
regexp = Regexp.new("^#{Regexp.escape(@name)}$") | |
Cucumber::RbSupport::RbDsl.register_rb_step_definition(regexp, proc) |
This file contains 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
# Implementation of the wrapper pattern, borrowed from Template Toolkit: | |
# http://template-toolkit.org/docs/manual/Directives.html#section_WRAPPER | |
# | |
# The method captures a block and passes its content to a partial template. | |
# The partial template calls <%= yield %> to render the block content, e.g.: | |
# | |
# <% wrapper "shared/widget", { :title => "Hello" } do %> | |
# ...some ERb... | |
# <% end %> | |
# |
This file contains 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
/* CSSpec: Theoretical BDD for CSS based on jQuery. Doesn’t exist yet. */ | |
with(CSSpec) { | |
describe("all layouts", function() { | |
describe("body", function() { | |
it("has a white background", function() { | |
value(this.css("background-color")).should.be.color("#fff") | |
}) | |
it("has black text", function() { |
This file contains 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
# Workaround in case Logging symbol is partially loaded/defined | |
Object.send(:remove_const, :Logging) if defined?(Logging) | |
# http://gemcutter.org/gems/logging | |
require 'logging' | |
# Use Syslog | |
class Capistrano::Logger | |
LOGGER_NAME = "capistrano" | |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/nbio/hitch" | |
"github.com/nbio/httpcontext" | |
"github.com/nbio/httpgzip" | |
) |
OlderNewer