Skip to content

Instantly share code, notes, and snippets.

View TangMonk's full-sized avatar
🏠
Working from home

David Wu TangMonk

🏠
Working from home
  • Tuols
  • China Chengdu
  • 18:50 (UTC -12:00)
View GitHub Profile
@TangMonk
TangMonk / ngrok-selfhosting-setup.md
Created June 12, 2017 07:51 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@TangMonk
TangMonk / gist:492402102edecea2baa5
Last active August 29, 2015 14:28 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>网站维护中</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@TangMonk
TangMonk / client.js
Last active August 29, 2015 14:13 — forked from redism/client.js
/**
* A simple socket.io client for performance benchmark
*
* Created by redism on 2014. 4. 22..
*/
var SocketIO = require('socket.io-client'),
argv = require('optimist').argv;
var n = argv.n || 10;

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: