⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/* | |
* a smart poller for jquery. | |
* (by github) | |
* | |
* simple example: | |
* | |
* $.smartPoller(function(retry) { | |
* $.getJSON(url, function(data) { | |
* if (data) { | |
* doSomething(data) |
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
""" | |
Delete your old tweets (by old I mean all except latest 100) | |
without removing favorites of your own tweets and DM. | |
1/ Install python-twitter: http://code.google.com/p/python-twitter/ as ptwitter | |
2/ Patch it with http://code.google.com/p/python-twitter/issues/detail?id=60 | |
3/ Populates USERNAME and PASSWORD | |
Note that you're limited to 150 calls to the API per hour and that you can't | |
retrieve more than the 3200 latest tweets, it means that even if you relaunch |
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
=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') |
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
set :test_log, "logs/capistrano.test.log" | |
namespace :deploy do | |
before 'deploy:update_code' do | |
puts "--> Running tests, please wait ..." | |
unless system "bundle exec rake > #{test_log} 2>&1" #' > /dev/null' | |
puts "--> Tests failed. Run `cat #{test_log}` to see what went wrong." | |
exit | |
else | |
puts "--> Tests passed" |
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
# for more info: https://gist.github.com/1120938 |
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
# Simple Coffeescript Templating | |
# Global Object to hold the templates | |
window.simpleCoffeeTemplates = | |
# An example template | |
example: (a) -> | |
""" | |
<div> | |
<h1 class='header'>#{a.header}</h1> |
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 File.join(File.dirname(__FILE__), 'deploy/nginx') | |
require File.join(File.dirname(__FILE__), 'deploy/log') | |
default_run_options[:pty] = true | |
set :ssh_options, { :forward_agent => true } | |
set :application, "appname" | |
set :repository, "git@giturl" | |
set :scm, :git |
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
license: gpl-3.0 |
OlderNewer