Skip to content

Instantly share code, notes, and snippets.

Keep calm.

Unbug Lee unbug

Keep calm.
View GitHub Profile
unbug / gist:32a6e6ed4240bff2c9328398b7de4d11
Last active Mar 21, 2021
View gist:32a6e6ed4240bff2c9328398b7de4d11


Hi你来啦 我们是深圳飞书团队的成员,已经帮助50+校招同学内推入职字节啦,期待下一个是你!

View material - Rally
View algo.json
"name": "Algo",
"id": "ed564832",
"parentId": "",
"children": [
"name": "Data Structures",
"id": "7c5581e1",
"parentId": "ed564832",
"children": [
unbug /
Last active Feb 12, 2021 — forked from urbanautomaton/
disable autospell completely
sudo mv /System/Library/Services/AppleSpell.service{,.disabled}

Nvm. For anyone else having this problem you need to reboot your mac and press ⌘+R when booting up. Then go into Utilities > Terminal and type the following commands:

csrutil disable
unbug / Middleware.js
Last active Jun 15, 2021
Powerful Javascript Middleware Pattern Implementation, apply middleweares to any object.
View Middleware.js
'use strict';
/* eslint-disable consistent-this */
let middlewareManagerHash = [];
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
View javascript-the-good-parts
function identity(x){
return x;
function add(a, b){
return a+b;
function mul(a, b){
return a*b;
View bubbleSort
function bubbleSort(arr){
if(arguments.lenght === 0 || !Array.isArray(arr)){
throw new Error();
var hasHadChange;
for(var i=0;i<arr.length-1;i++){
hasHadChange = false;
for(var x=0;x<arr.length-1;x++){
hasHadChange = true;
View quicksort
function quicksort(arr){
//base case
if(arr.length<=1){ return arr;}
//now find swap position and value
var swapPos = Math.floor((arr.length-1)/2),
swapVal = arr[swapPos],
less = [], more = [];
arr = arr.slice(0, swapPos).concat(arr.slice(swapPos+1));
for(var i=0;i<arr.length;i++){
View BST
function Node(data, left, right){ = data;
this.left = left;
this.right = right; = show;
function show(){
unbug / Sync gh-pages + master branches
Created Mar 24, 2016 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
View Sync gh-pages + master branches
// Reference:
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes