Skip to content

Instantly share code, notes, and snippets.

View dylannnn's full-sized avatar
🌊

Yunfei Li dylannnn

🌊
View GitHub Profile
@dylannnn
dylannnn / ultimate-ut-cheat-sheet.md
Created September 18, 2020 10:13 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@dylannnn
dylannnn / .zshrc
Created October 10, 2019 10:26
My Oh my zsh configuration
# 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
@dylannnn
dylannnn / regex.sh
Created July 18, 2019 08:17
Useful one-line scripts for sed
# | 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:
const admin = require('firebase-admin');
var serviceAccount = require("./your-firestore-key.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
const dumped = {};
const schema = {
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)
@dylannnn
dylannnn / cloudSettings
Created March 4, 2018 12:38
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-04T12:38:47.024Z","extensionVersion":"v2.8.7"}
@dylannnn
dylannnn / cloudSettings
Last active November 3, 2019 16:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-03T16:57:49.099Z","extensionVersion":"v3.4.3"}
@dylannnn
dylannnn / cloudSettings
Created March 4, 2018 11:36
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-04T11:35:52.944Z","extensionVersion":"v2.8.7"}
@dylannnn
dylannnn / JavaScript.md
Created November 26, 2015 09:01 — forked from aaronshaf/JavaScript.md
All Things JavaScript