Follow these steps to install graphite on OS X Lion.
- Python 2.7
- Brew
- Git
module A | |
def a | |
end | |
end | |
class B | |
include A | |
end | |
class C |
// this allows culerity to wait until all ajax requests have finished | |
jQuery(function($) { | |
var original_ajax = $.ajax; | |
var count_down = function(callback) { | |
return function() { | |
try { | |
if(callback) { | |
callback.apply(this, arguments); | |
}; | |
} catch(e) { |
Given /^I have a feed I want to edit$/ do | |
VCR.use_cassette("feed") do | |
@feed = Factory :feed | |
end | |
end |
When /^I search for "([^"]+)" near "([^"]+)"/ do |name, location| | |
fill_in "Name", :with => name | |
fill_in "Location", :with => location | |
cassette_name = "searches/#{location}/#{name}" | |
VCR.use_cassette(cassette_name) do | |
click_button "Search" | |
end | |
end |
RUBY_VERSION # => "1.8.7" | |
zero_width_space = "\xE2\x80\x8B" # => "\342\200\213" | |
zero_width_space # => "\342\200\213" | |
zero_width_space.length # => 3 | |
white_space = "" # => "" | |
white_space # => "" | |
white_space.length # => 0 | |
RUBY_VERSION # => "1.9.2" | |
zero_width_space = "\xE2\x80\x8B" # => "" |
brew install python
$ python --version
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
namespace :heroku do | |
def app_name | |
@app_name ||= Heroku::Command::BaseWithApp.new([]).app | |
end | |
def latest_bundle(timeout = 30) | |
puts "Attempting to get latest bundle..." | |
get_bundle = lambda do | |
bundles = Heroku::Command.run('bundles', {}) | |
bundles.sort { |b1, b2| b1[:created_at] <=> b2[:created_at] } |
function xkcdify(axHandle) | |
%XKCDIFY redraw an existing axes in an XKCD style | |
% | |
% XKCDIFY( AXES ) re-renders all childen of AXES to have a hand drawn | |
% XKCD style, http://xkcd.com, AXES can be a single axes or a vector of axes | |
% | |
% NOTE: Only plots of type LINE and PATCH are re-rendered. This should | |
% be sufficient for the majority of 2d plots such as: | |
% - plot | |
% - bar |