Skip to content

Instantly share code, notes, and snippets.

View neocsr's full-sized avatar

Christian Sousa neocsr

  • Cupertino, CA
  • 06:10 (UTC -12:00)
View GitHub Profile
@neocsr
neocsr / graphite.md
Created September 28, 2012 04:37 — forked from caged/graphite.md
Installing Graphite on OS X Lion

This is a general overview (from memory) of the steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion. I think the steps are in order but YMMV. Please fork and fix if you find an error.

Install Python 2.7.2

brew install python

Check your env

$ python --version
@neocsr
neocsr / graphite.md
Created September 28, 2012 04:01 — forked from surjikal/graphite.md
Installing Graphite on OS X Lion

Follow these steps to install graphite on OS X Lion.

Prerequisites

  • Python 2.7
  • Brew
  • Git

Install dependencies

Install Cairo

@neocsr
neocsr / result.txt
Created September 27, 2012 20:38 — forked from kyanny/result.txt
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" # => "​"
@neocsr
neocsr / vcr_steps.rb
Created September 12, 2012 03:50 — forked from myronmarston/vcr_steps.rb
Example of using VCR in a cucumber step definition
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
@neocsr
neocsr / custom_step.rb
Created September 12, 2012 03:48 — forked from jonhoman/custom_step.rb
Cucumber VCR examples
Given /^I have a feed I want to edit$/ do
VCR.use_cassette("feed") do
@feed = Factory :feed
end
end
@neocsr
neocsr / culerity.js
Created August 13, 2012 05:41 — forked from jlindsey/culerity.js
Using Cucumber/Capybara/Culerity, a step to wait until all AJAX calls are complete.
// 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) {
module A
def a
end
end
class B
include A
end
class C
@neocsr
neocsr / .ackrc
Created February 10, 2012 06:46
oh-my-zsh-custom
--sort-files
--color
--context=1
--follow
--group
--ignore-dir=vendor
--ignore-dir=db/server
--ignore-dir=log
--ignore-dir=tmp
@neocsr
neocsr / about.md
Created August 13, 2011 00:00 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@neocsr
neocsr / rails_path_patch.rb
Created February 1, 2011 02:20
Add haml support to Textmate bundle in Rails 3
# =================================================
# = Texmate support for Rails 3 bundle navigation =
# =================================================
# ~/Library/Application Support/TextMate/Pristine Copy/Bundles/Ruby on Rails.tmbundle/Support/lib/rails/rails_path.rb
# or
# ~/Library/Application\ Support/TextMate/Bundles/Ruby\ on\ Rails.tmbundle/Support/lib/rails/rails_path.rb
# line 293
def wants_haml
@wants_html ||= File.file?(File.join(rails_root, "vendor/plugins/haml/", "init.rb")) ||