Remesh snippets for VS Code.
- cd into you the
.vscodedirectory in your project,mkdir .vscodeif this folder does not exists. wget https://gist.githubusercontent.com/undoZen/d104b2c88086f90165c438b61ef7c99b/raw/typescript.code-snippets
Remesh snippets for VS Code.
.vscode directory in your project, mkdir .vscode if this folder does not exists.wget https://gist.githubusercontent.com/undoZen/d104b2c88086f90165c438b61ef7c99b/raw/typescript.code-snippets| import React, { memo, Suspense } from 'react'; | |
| import { of, from, pipe } from 'rxjs'; | |
| import { map, switchMap, pluck } from 'rxjs/operators'; | |
| import { createRxContainer, LOADING } from '@/utils/unstated-rxjs'; | |
| import { tapLog } from '@/utils/operators'; | |
| const delay = (value: any, waitMs: number) => | |
| new Promise(resolve => { | |
| setTimeout(() => resolve(value), waitMs); | |
| }); |
| import React, { memo, Suspense, useMemo } from 'react'; | |
| import { useRxInit, suspensify } from '@/utils'; | |
| import { of, from, Observable } from 'rxjs'; | |
| let r = (n, ms) => | |
| new Promise(resolve => { | |
| setTimeout(() => resolve(n), ms); | |
| }); | |
| let Loading = () => <span>loading...</span>; | |
| let SayHello = memo(({ ctx }) => { |
| module.exports = { | |
| h5: { | |
| miniCssExtractPluginOption: { | |
| filename: 'css/[name].[hash].css', | |
| chunkFilename: 'css/[id].[chunkhash].css' | |
| }, | |
| enableDll: false, | |
| webpackChain(chain, webpack) { | |
| const hashRule = (type) => { | |
| chain.module.rules.get(type).uses.get("urlLoader").get("options").name = |
| 'use strict' | |
| import Freezer from 'freezer-js' | |
| import {assign, isArray, each, toPath} from 'lodash' | |
| import h from 'react-hyperscript' | |
| import {Component, PureComponent} from 'react' | |
| var store = new Freezer({}) | |
| export default store | |
| console.log(store); |
| g_LastCtrlKeyDownTime := 0 | |
| g_AbortSendEsc := false | |
| g_ControlRepeatDetected := false | |
| *Esc:: | |
| if (g_ControlRepeatDetected) | |
| { | |
| return | |
| } |
| [ | |
| { | |
| "metadata": { | |
| "id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd", | |
| "publisherId": "ac3a3342-db76-40ef-9277-4657632d3bfe", | |
| "publisherDisplayName": "Shan Khan" | |
| }, | |
| "name": "code-settings-sync", | |
| "publisher": "Shan", | |
| "version": "1.6.3" |
| #!/usr/bin/env bash | |
| git clone https://github.com/guybedford/jspm-react-component-demo.git | |
| cd jspm-react-component-demo | |
| npm i --save-dev jspm@beta chokidar-socket-emitter ecstatic | |
| ./node_modules/.bin/jspm i | |
| ./node_modules/.bin/jspm i --dev systemjs-hot-reloader #update to fix a bug | |
| echo 'installation done, have fun!' | |
| echo 'first `cd jspm-react-component-demo` into demo directory, then' |
| #!/usr/bin/env bash | |
| curl https://raw.githubusercontent.com/creationix/nvm/v0.22.2/install.sh | bash | |
| cd .nvm | |
| git remote add ljharb https://github.com/ljharb/nvm.git | |
| git fetch ljharb | |
| git checkout ljharb/iojs |
| #!/usr/bin/env bash | |
| export N_PREFIX=$HOME/.ivm | |
| export N_BIN=$N_PREFIX/bin | |
| test -d $N_BIN || mkdir -p $N_BIN | |
| pushd $N_BIN | |
| wget https://raw.githubusercontent.com/demohi/ivm/ce260674aeb8a446a3790784461156085f634c5b/bin/ivm | |
| chmod a+x ivm | |
| popd | |
| echo 'export N_PREFIX=$HOME/.ivm' >> .bashrc |