echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`
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
| /* | |
| Credits to sbgoran (https://jsfiddle.net/user/sbgoran/fiddles/) | |
| https://jsfiddle.net/sbgoran/kySNu/ | |
| */ | |
| var deepDiffMapper = function() { | |
| return { | |
| VALUE_CREATED: 'created', | |
| VALUE_UPDATED: 'updated', | |
| VALUE_DELETED: 'deleted', |
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
| # create new branch | |
| git branch <branch name> | |
| # create new branch and checkout to it | |
| git checkout -b <branch name> | |
| # upload new branch to remote | |
| git push origin <branch name> | |
| # delete local branch |
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
| /* | |
| Simple server side in-memory cache for Express.js with Node.js. | |
| As the content is stored in memory the are the following points to consider: | |
| - In-memory cache is the fastest option available;It’s easy to work with, no external dependency needed; | |
| - We’ll lose the cached content if the server or the process goes down; | |
| - Since it stores cached content in it’s own process memory, it will not be shared between multiple node.js process. | |
| Another option to solve most of this issues is using a distributed cache service like Redis. It could be done with a single npm module express-redis-cache that already implements the Express a middleware. | |
| Credits to: https://goenning.net/2016/02/10/simple-server-side-cache-for-expressjs/ |
NewerOlder
