Skip to content

Instantly share code, notes, and snippets.

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

Max McDonnell maxmcd

🕳️
∖𝟶𝚊𝚜𝚖
View GitHub Profile
@agl
agl / gist:876829
Created March 18, 2011 21:00
Proxy server for testing revocation
package main
import (
"bufio"
"fmt"
"io"
"net"
"strings"
)
@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();
@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):
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)
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;
}
@protrolium
protrolium / ffmpeg.md
Last active May 15, 2024 18:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@ericflo
ericflo / proxy.go
Last active April 17, 2024 21:27
Golang TCP Proxy
package proxy
import (
"io"
"net"
"sync"
log "github.com/Sirupsen/logrus"
)
@bruth
bruth / README.md
Last active November 23, 2022 21:54
Postgres push notification

Postgres push triggers

Watch a table for changes and push a notification with a payload describing the change.

Example

In the Postgres shell:

-- Create the functions
@tjsoftworks
tjsoftworks / brew-java-and-jenv.md
Created November 11, 2016 23:18 — forked from tomysmile/brew-java-and-jenv.md
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again: