Skip to content

Instantly share code, notes, and snippets.

@licaomeng
licaomeng / ngrok-installation.md
Created March 5, 2019 16:02 — forked from wosephjeber/ngrok-installation.md
Installing ngrok on Mac

#Installing ngrok on OSX

  1. Download ngrok
  2. Unzip it to your Applications directory
  3. Create a symlink (instructions below)

Creating a symlink to ngrok

Run the following two commands in Terminal to create the symlink.

# cd into your local bin directory
@licaomeng
licaomeng / JavaScript-Promise-Lite.js
Created May 16, 2018 13:53
JavaScript-Promise-Lite
function MyPromise(fn) {
this.resolve;
this.reject;
_this = this;
setTimeout(function () {
fn(_this.resolveFunc.bind(_this), _this.rejectFunc.bind(_this));
}, 0)
}
MyPromise.prototype = {
@licaomeng
licaomeng / JavaScript-Map.js
Created September 14, 2017 15:24
Map Utility for JavaScript
/**
* Created by lica on 6/12/2016.
*/
function Map() {
this.container = new Object();
}
Map.prototype.put = function (key, value) {
this.container[key] = value;
}