Logging into firebase you sould use firebase login --no-localhost
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
| // Creating promises | |
| var promise = new Promise(function (resolve, reject) { | |
| resolve('all good') | |
| }) | |
| promise.then(function (result) { | |
| console.log('was it good?', result) | |
| }).catch(function (err) { | |
| console.error('ERR', err) | |
| }) |
The apt-get version of node is incredibly old, and installing a new copy is a bit of a runaround.
So here's how you can use NVM to quickly get a fresh copy of Node on your new Bash on Windows install
$ touch ~/.bashrc
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
// restart bash
$ nvm install --lts
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
| import os | |
| import re | |
| import sys | |
| import requests | |
| filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp') | |
| def main(): | |
| categories = sys.argv[1:] | |
| urls = map(lambda x: 'http://www.oreilly.com/{}/free/'.format(x), categories) |
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
| [ | |
| { | |
| "quoteID": 1, | |
| "quote": "Efforts and courage are not enough without purpose and direction.", | |
| "author": "John F Kennedy", | |
| "description": "35th President of the USA", | |
| "profile": "http://markmcmillion.com/wp-content/uploads/2014/03/JFK-150x150.jpg", | |
| "portrait": "http://bit.ly/1Q6aObg", | |
| "bio": "John F Kennedy was a president of the United States of America" | |
| }, |
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
| npm install -g rimraf | |
| find . -name "node_modules" -exec rimraf {} \; |
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
| # Logs | |
| logs | |
| *.log | |
| npm-debug.log* | |
| # Runtime data | |
| pids | |
| *.pid | |
| *.seed |