Skip to content

Instantly share code, notes, and snippets.

View tuxido-feynman's full-sized avatar

tuxido-feynman tuxido-feynman

  • San Francisco, CA
View GitHub Profile
@Sara3
Sara3 / interviewQuestion
Last active July 24, 2021 19:14
question
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));
@bhurlow
bhurlow / gist:3043629
Created July 3, 2012 21:57
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
@bcarpio
bcarpio / fabfile.py
Created May 14, 2012 18:46
Fab Task For Creating an EC2 Instance
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
@gpiancastelli
gpiancastelli / goodreads-oauth-example.py
Created August 19, 2010 13:50
A Python example of how to use OAuth on GoodReads
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')