As configured in my dotfiles.
start new:
tmux
start new with session name:
| from fabric.api import * | |
| from fabric.colors import green as _green, yellow as _yellow | |
| import boto | |
| import boto.ec2 | |
| from config import * | |
| import time | |
| def create_server(): | |
| """ | |
| Creates EC2 Instance |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| // snippet taken from http://catapulty.tumblr.com/post/8303749793/heroku-and-node-js-how-to-get-the-client-ip-address | |
| function getClientIp(req) { | |
| var ipAddress; | |
| // The request may be forwarded from local web server. | |
| var forwardedIpsStr = req.header('x-forwarded-for'); | |
| if (forwardedIpsStr) { | |
| // 'x-forwarded-for' header may return multiple IP addresses in | |
| // the format: "client IP, proxy 1 IP, proxy 2 IP" so take the | |
| // the first one | |
| var forwardedIps = forwardedIpsStr.split(','); |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """Simple gevent POC to check how to get ZMQ sockets working with | |
| subprocesses spawned by a simple process.""" | |
| # this code doesn't seem to work properly; it has a | |
| # tendency to hang at various parts of the req/rep process | |
| # all of this stuff works flawlessly if you change: |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
| <title>Testing Pie Chart</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
| <style type="text/css"> |