Skip to content

Instantly share code, notes, and snippets.

View josecoelho's full-sized avatar

José Coelho josecoelho

View GitHub Profile
@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

@ideadapt
ideadapt / capistrano deploy:update_code git error
Last active December 18, 2015 14:18
capistrano deploy:update_code git error
# sometims capistranos fails executing update_code goal:
* 2013-06-17 08:08:34 executing `deploy:update_code'
executing locally: "git ls-remote . HEAD"
command finished in 9ms
* refreshing local cache to revision f4db at /var/folders/nc/pl0c_dnd43bb6xl5ljdfh5zh0012gn/T/proj
executing locally: cd /var/folders/nc/pl0c_dnd43bb6xl5ljdfh5zh0012gn/T/proj && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard f4db8ab10f23ddd2864ebfeee7486bdf3bd8e423 && git clean -q -d -x -f
fatal: Not a git repository (or any of the parent directories): .git
# to reset your local cache folder execute following commands:
rm -rf /var/folders/*
@rjz
rjz / cs-jq-plugin-template.coffee
Created September 3, 2012 17:01
Coffeescript jQuery Plugin Class Template
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')