Skip to content

Instantly share code, notes, and snippets.

View matths's full-sized avatar
💻
In a former live I was a flash developer.

Matthias Dittgen matths

💻
In a former live I was a flash developer.
View GitHub Profile
@matths
matths / http-and-ssh-proxy.js
Last active August 29, 2015 14:01 — forked from bnoordhuis/http-and-https-proxy.js
A node.js proxy listening on port 80 that forwards HTTP or SSH traffic to different ports. Thus SSH might become reachable to a somewhat restrictive hotel or corporate firewall, while HTTP can still be served as well.
var fs = require('fs');
var net = require('net');
var http = require('http');
var sshAddress = '22';
var httpAddress = '8080';
var incoming = '80';
http.createServer(httpConnection).listen(httpAddress);
net.createServer(tcpConnection).listen(incoming);
#!/bin/sh
CURRENT=$(node -v)
#version details
VERSION=$(curl -L -s http://nodejs.org/dist/latest/ \
| egrep -o '[0-9]+\.[0-9]+\.[0-9]+' \
| tail -n1)
PLATFORM=linux
ARCH=x64
@matths
matths / gist:1207164
Created September 9, 2011 19:54 — forked from denis/gist:48774
download & install git code completion from github mirror while git.kernel.org is down
cd /tmp
git clone git://gist.github.com/946648.git
cd git
git checkout git-completion.bash
cp git-completion.bash ~/.git-completion.bash
cd ~
rm -rf /tmp/git
echo -e "source ~/.git-completion.bash" >> .bash_profile