My favorite sorting algorithm.
A Pen by Gerald Fullam on CodePen.
| # lazyload nvm | |
| # all props goes to http://broken-by.me/lazy-load-nvm/ | |
| # grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/ | |
| lazynvm() { | |
| unset -f nvm node npm npx | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
| if [ -f "$NVM_DIR/bash_completion" ]; then | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
My favorite sorting algorithm.
A Pen by Gerald Fullam on CodePen.
| /* | |
| * Flatten Object @gdibble: Inspired by https://gist.github.com/penguinboy/762197 | |
| * input: { 'a':{ 'b':{ 'b2':2 }, 'c':{ 'c2':2, 'c3':3 } } } | |
| * output: { 'a.b.b2':2, 'a.c.c2':2, 'a.c.c3':3 } | |
| */ | |
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| var flatObject; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) { |