Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This file contains hidden or 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
Lift and Shift | |
Rip and Run | |
Lie and Die (sunset the app) | |
Choke and Croak | |
Sneak and Tweak | |
Snatch and Patch | |
Send and Mend | |
Flip and Ship | |
Lug and Debug |
This file contains hidden or 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
express = require('express') | |
app = express() | |
server = require('http').createServer(app) | |
io = require('socket.io')(server) | |
app.use express.static(__dirname + '/public') | |
server.listen 3000 | |
io.on 'connection', (socket)-> |
This file contains hidden or 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
express = require('express') | |
request = require('request') | |
cors = require('cors') | |
apiServerHost = 'https://TARGET_SERVER' | |
app = express() | |
app.use(cors()) | |
app.use('/', (req, res)-> | |
url = apiServerHost + req.url |
This file contains hidden or 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
Here is how you can test | |
Create bucket, add this policy. | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": { |
This file contains hidden or 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
### | |
this is a function that makes it easy to map one object to another | |
using underscore/lodash. | |
### | |
_ = require('lodash') #3.10.1 | |
mapper = (obj,mapping,initial)-> | |
newObj = if initial then initial else {} | |
_.each(mapping, (from, to)-> |
This file contains hidden or 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
function smoosher(object) { | |
var nodesToVisit = [ { path:[], d: object }]; | |
var result = []; | |
var visitedObjects = []; | |
while ( nodesToVisit.length > 0 ) { | |
var currentNode = nodesToVisit.shift(); | |
var nodeType = typeof currentNode.d === 'undefined' ? 'undefined' : | |
(typeof currentNode.d === 'object' && ! currentNode.d) ? 'null' : | |
({}).toString.call(currentNode.d).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bootstrap 3 Template</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap core CSS --> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> |