Remesh snippets for VS Code.
- cd into you the
.vscode
directory in your project,mkdir .vscode
if 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
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 = |
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 }) => { |
'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' |
'use strict'; | |
var http = require('http'); | |
var apiproxy = require('express-apiproxy'); | |
var reqProto = require('express/lib/request'); | |
var resProto = require('express/lib/response'); | |
reqProto.__defineGetter__('uest', function(){ | |
return this._uest ? this._uest : this._uest = apiproxy(this, { |
'use strict'; | |
exports.prependHost = prependHost; | |
function prependHost(url, host) { | |
host = host || 'backend'; | |
if ('/' != url[0]) url = '/' + url; | |
return config.url[host] + url; | |
} | |
exports.getSession = getSession; |