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
Fetcher interface: | |
fetchAnimals(prefix: string, callback: function): void | |
fetchArticles(prefix: string, callback: function): void | |
fetchFruits(prefix: string, callback: function): void | |
Note: there are many more fetchers | |
Callback interface: | |
callback(results: string[]): void | |
*/ | |
fetchAnimals('g', (results) => console.log(results)); |
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
–ctrl a c -> create new window | |
–ctrl a A -> set window name | |
–ctrl a w -> show all window | |
–ctrl a 1|2|3|… -> switch to window n | |
–ctrl a ” -> choose window | |
–ctrl a ctrl a -> switch between window | |
–ctrl a d -> detach window | |
–ctrl a ? -> help | |
–ctrl a [ -> start copy, move cursor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer | |
–ctrl a ] -> paste from buffer |
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
from fabric.api import * | |
from fabric.operations import local,put | |
import subprocess | |
import os | |
@task | |
def deploy_small_ec2_instance(): | |
local('/usr/bin/ec2-run-instances ami-6dacf728 --instance-type m1.small --region us-west-1 --key ${EC2_KEYPAIR} --user-data-file user-data.sh --group ${SGROUP}') | |
@task |
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
import oauth2 as oauth | |
import urlparse | |
url = 'http://www.goodreads.com' | |
request_token_url = '%s/oauth/request_token/' % url | |
authorize_url = '%s/oauth/authorize/' % url | |
access_token_url = '%s/oauth/access_token/' % url | |
consumer = oauth.Consumer(key='Your-GoodReads-Key', | |
secret='Your-GoodReads-Secret') |