One possibility: you must set the "gist" scope parameter when authenticating the user.
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
if (!Object.__proto__) { | |
var sandbox = function () { | |
// create an <iframe> | |
var iframe = document.createElement("iframe"); | |
iframe.style.display = "none"; | |
document.documentElement.appendChild(iframe); | |
return frames[frames.length - 1]; | |
} | |
var iframe = sandbox(); |
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
var fs = require('fs'); | |
var jsdom = require('jsdom'); | |
function svgToPng (xml, out) { | |
var convert = require('child_process').spawn("convert", ["svg:", "png:-"]); | |
convert.stdout.pipe(out); | |
convert.stdin.write(xml); | |
convert.stdin.end(); | |
} | |
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 successful OAuth 2 test! |
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
read -p "Domain name: " site | |
mkdir ~/$site/tmp | |
touch ~/$site/tmp/restart.txt | |
cat <<_DOC_ | |
import sys, os | |
INTERP = "/home/`whoami`/Python27/bin/python" | |
if sys.executable != INTERP: | |
os.execl(INTERP, INTERP, *sys.argv) | |
sys.path.append('/home/`whoami`/$site/app') | |
from app import app as application |
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
# Mongo URL. | |
MONGO_URL = os.getenv('MONGOLAB_URI', 'mongodb://localhost:27017/mytable') | |
# MongoDB setup. | |
from urlparse import urlsplit | |
parsed_mongo = urlsplit(MONGO_URL) | |
db_name = parsed_mongo.path[1:] | |
# Get db connection. | |
print('Connecting to %s [db %s]' % (MONGO_URL, db_name)) | |
db = Connection(MONGO_URL)[db_name] |
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
var rem = require('rem'); | |
var twitter = rem.load('twitter', '1.1', { | |
key: '...', | |
secret: '...' | |
}); | |
rem.oauth(twitter, 'http://localhost/').loadState({ | |
oauthAccessToken: '...', | |
oauthAccessSecret: '...' |
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
read -p "Domain name: " site | |
cd ~ | |
mkdir ~/tmp | |
cd ~/tmp | |
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | |
tar zxvf Python-2.7.3.tgz | |
cd Python-2.7.3 | |
./configure --prefix=$HOME/Python27 | |
make | |
make install |
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
sudo /usr/share/checkbox/scripts/create_connection -S wpa -K THE_PASSWORD NETWORK_NAME |
Use /etc/resolver
. For instance, to change the DNS servers for irc.freenode.net
, create the file
/etc/resolver/irc.freenode.net
And set its contents to
nameserver 8.8.8.8
nameserver 8.8.4.4