Skip to content

Instantly share code, notes, and snippets.

View lixuanxian's full-sized avatar

Sean Li lixuanxian

View GitHub Profile
@lixuanxian
lixuanxian / tcpproxy.js
Created August 2, 2020 07:31 — forked from kfox/tcpproxy.js
A basic TCP proxy written in node.js
var net = require("net");
process.on("uncaughtException", function(error) {
console.error(error);
});
if (process.argv.length != 5) {
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]);
process.exit();
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="http://acko.net/files/mathbox2/mathbox-bundle.min.js">
</script>
</head>
<body>
@lixuanxian
lixuanxian / gist:5925dda187325e31ba3dea311157ef24
Created December 2, 2016 06:48 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@lixuanxian
lixuanxian / ss-install.md
Last active October 11, 2015 13:39 — forked from aa65535/ss-install.md
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 下载源码
git clone https://github.com/madeye/shadowsocks-libev.git
# 开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install