Skip to content

Instantly share code, notes, and snippets.

View cftang0827's full-sized avatar
🏠
Playing~

Paul Tang cftang0827

🏠
Playing~
View GitHub Profile
@cftang0827
cftang0827 / promises
Created February 28, 2020 02:36 — forked from kuanhsuh/promises
callback vs promises
function logWord(word){
setTimeout(function() {
console.log(word)
}, Math.floor(Math.random() * 100) + 1
// return value between 1 ~ 100
)
}
function logAll(){
logWord("A")
@cftang0827
cftang0827 / .vimrc
Created November 18, 2018 16:06 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@cftang0827
cftang0827 / gist:35b12be7133a36a3cc7d5dabbdc52762
Created July 9, 2018 07:00 — forked from thinkphp/gist:1450738
Binary Search Tree implementation in Python
'''
by Adrian Statescu <[email protected]>
Twitter: @thinkphp
G+ : http://gplus.to/thinkphp
MIT Style License
'''
'''
Binary Search Tree
------------------