using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/yunfeili/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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
# | Source : http://sed.sourceforge.net/sed1line.txt | |
# | ------------------------------------------------------------------------- | |
# | USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
# | Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
# | | |
# | Latest version of this file (in English) is usually at: | |
# | http://sed.sourceforge.net/sed1line.txt | |
# | http://www.pement.org/sed/sed1line.txt | |
# | | |
# | This file will also available in other languages: |
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 admin = require('firebase-admin'); | |
var serviceAccount = require("./your-firestore-key.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount) | |
}); | |
const dumped = {}; | |
const schema = { |
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 axios from 'axios' | |
let myData = [{id: 0}, {id: 1}, {id: 2}, {id: 3}] | |
async function fetchData(dataSet) { | |
const pokemonPromises = dataSet.map(entry => { | |
return axios.get(`https://ironhack-pokeapi.herokuapp.com/pokemon/${entry.id}`) | |
}) | |
const results = await Promise.all(pokemonPromises) |
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
{"lastUpload":"2018-03-04T12:38:47.024Z","extensionVersion":"v2.8.7"} |
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
{"lastUpload":"2019-11-03T16:57:49.099Z","extensionVersion":"v3.4.3"} |
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
{"lastUpload":"2018-03-04T11:35:52.944Z","extensionVersion":"v2.8.7"} |
- this
- bind
- Hoisting
- Operator Precedence
- Lambda
- Object literals
- Prototypical inheritance vs. classical inheritance