git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| #!/bin/bash | |
| #Force file syncronization and lock writes | |
| mongo admin --eval "printjson(db.fsyncLock())" | |
| MONGODUMP_PATH="/usr/bin/mongodump" | |
| MONGO_HOST="prod.example.com" | |
| MONGO_PORT="27017" | |
| MONGO_DATABASE="dbname" | |
| # install openjdk | |
| sudo apt-get install openjdk-7-jdk lib32stdc++6 lib32z1 | |
| # download android sdk | |
| wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
| tar -xvf android-sdk_r24.2-linux.tgz | |
| # install all sdk packages | |
| cd android-sdk-linux/tools | |
| ./android update sdk --no-ui |
| #!/bin/bash | |
| cat /path/to/public_key | ssh root@yourdokkuinstance "sudo sshcommand acl-add dokku [description]" |
Reference: RFC 2616 - HTTP Status Code Definitions
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain command installed.
If not, just install Git with brew: brew install git.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
| var translate = (function () { | |
| var symbols = { | |
| a: '([]+![])[+!+[]]', | |
| b: '([]+{})[+!+[]+!+[]]', | |
| c: '([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
| d: '([]+[][+[]])[+!+[]+!+[]]', | |
| e: '([]+[][+[]])[+!+[]+!+[]+!+[]]', | |
| f: '([]+[][+[]])[+!+[]+!+[]+!+[]+!+[]]', | |
| g: '([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+!![])[+!+[]]])[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
| h: '(+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]] |
| //8 Methods to Iterate through Array | |
| //forEach (Do Operation for Each Item in the Array) | |
| [1,2,3].forEach(function(item,index) { | |
| console.log('item:',item,'index:',index); | |
| }); | |
| //map (Translate/Map all Elements in an Array to Another Set of Values.) | |
| const oneArray = [1,2,3]; | |
| const doubledArray = oneArray.map(function(item) { |