Skip to content

Instantly share code, notes, and snippets.

@haoliangwu
haoliangwu / gist:9f170d376923834337b90635aa78a1e1
Created October 17, 2019 07:56
vscode jest debug config for source reading
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "jest active file",
"request": "launch",
@haoliangwu
haoliangwu / reactive axios
Last active May 14, 2019 14:52
simple axios client wrapper with rxjs
// ReactiveAxios.js
import axios from "axios";
import { from, Observable } from "rxjs";
const methodsWithBody = ["post", "put", "patch"];
const methodsWithoutBody = ["get", "delete"];
const CancelToken = axios.CancelToken;
export default class ReactiveAxios {
@haoliangwu
haoliangwu / advanced-mvvm-component-patterns.md
Last active October 29, 2018 09:35
advanced-mvvm-component-patterns
React Angular Vue
Build a Toggle Component 01 Build a Toggle Component Build a Toggle Component
Write Compound Components 02 Write Compound Components Write Compound Components
Make Compound React Components Flexible 02 Write Compound Components Write Compound Components
Make Enhanced React Components with Higher Order Components 03a Communicate Between Components Using Dependency Injection Make Enhanced Vue Components with Mixins
03b Enhance Components with Directives
Handling Prop Namespace Clashes with Higher Order Components [04 Avoid Namespace Clashes with D
@haoliangwu
haoliangwu / README.md
Created September 25, 2018 06:52 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
{
"version": "0.2.0",
"configurations": [
{
"name": "Jest", // This is the configuration name you will see in debug sidebar
"type": "node",
"request": "launch",
"port": 9229,
"address": "localhost",
"stopOnEntry": false,