Skip to content

Instantly share code, notes, and snippets.

View maxmcd's full-sized avatar
🕳️
∖𝟶𝚊𝚜𝚖

Max McDonnell maxmcd

🕳️
∖𝟶𝚊𝚜𝚖
View GitHub Profile
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
http://www.meetup.com/Docker-NewYorkCity/events/221586351/
Presentations / video not yet available online
## Project Calico:
Small startup group inside larger co: Metaswitch
Pure Layer 3 cloud networking solution - Containers, VM’s, bare metal
Docker networking solutions:
- Port Forwarding / NAT (out of the box) :
- Simple, out of the box, easily understood, but not real IP networking. Wont work with IPsec. Can’t have multiple apps working on same port
- Overlay networks
- Give each container its own private ip address (or subnet)
@dplepage
dplepage / gist:2024199
Created March 12, 2012 19:33
Routing decorator for flask subclassing
import flask
class RoutingData(object):
def __init__(self, args, kwargs):
super(RoutingData, self).__init__()
self.args = args
self.kwargs = kwargs
def route(*args, **kwargs):
def wrap(fn):
@TooTallNate
TooTallNate / mouse.js
Created January 30, 2012 05:55
Enable "mouse reporting" with Node.js
// Based on:
// http://groups.google.com/group/nodejs-dev/browse_thread/thread/a0c23008029e5fa7
process.stdin.resume();
process.stdin.on('data', function (b) {
var s = b.toString('utf8');
if (s === '\u0003') {
console.error('Ctrl+C');
process.stdin.pause();
@agl
agl / gist:876829
Created March 18, 2011 21:00
Proxy server for testing revocation
package main
import (
"bufio"
"fmt"
"io"
"net"
"strings"
)