This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
# place this after nvm initialization! | |
autoload -U add-zsh-hook | |
load-nvmrc() { | |
local node_version="$(nvm version)" | |
local nvmrc_path="$(nvm_find_nvmrc)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sampleTree = { | |
a: 1, | |
b: 1, | |
c: { | |
d: 1, | |
e: 1 | |
}, | |
f: 1, | |
g: { | |
h: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Complete the urlencode() function, which should take a javascript object and return a PHP-style query string [1]. | |
The object should be translated into a sequence of <key>=<value> pairs, separated by &. | |
Reserved characters in keys and values should be percent encoded [2]. | |
If a nested object is encountered it should be added to the output as <top level key>[<sub key]=<value> | |
There are a number of test-cases defined below, correctness of the function can be tested by running this file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select all of the same word - ctrl+cmd+g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"bold_folder_labels": true, | |
"caret_style": "wide", | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"fade_fold_buttons": false, | |
"font_face": "Inconsolata", |