Skip to content

Instantly share code, notes, and snippets.

遊真·uZen undoZen

Block or report user

Report or block undoZen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
undoZen / production.js
Created Mar 27, 2019
Taro webpack h5 build hash all assets
View production.js
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 =
undoZen / store.js
Created Oct 20, 2016
an failed experiment with freezer-js
View store.js
'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
undoZen / Esc2CtrlEsc.ahk
Created Sep 20, 2016
just map your capslock to esc and apply this script, then you can press capslock to send esc, or hold it to act as ctrl
View Esc2CtrlEsc.ahk
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
if (g_ControlRepeatDetected)
undoZen / extensions.json
Created Aug 24, 2016
Visual Studio code settings
View extensions.json
"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"
undoZen /
Last active Apr 13, 2016
#!/usr/bin/env bash
git clone
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 | bash
cd .nvm
git remote add ljharb
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
chmod a+x ivm
echo 'export N_PREFIX=$HOME/.ivm' >> .bashrc
View gulpfile.js
function isMasterRunning() {
var pidFilePath = path.join(__dirname, '');
var strpid;
var isRunning;
if (fs.existsSync(pidFilePath)) {
strpid = fs.readFileSync(pidFilePath, 'utf-8');
isRunning = require('is-running')(parseInt(strpid, 10));
if (isRunning) {
return strpid;
View rewriteRouteProto.js
var routeProto = require('express/lib/router/route').prototype;
var routerProto = require('express/lib/router');
var methods = require('express/node_modules/methods').concat(['all']);
wrapCallback = function (c) {
return c;
methods.forEach(function (method) {
var orig = routeProto[method];
routeProto[method] = function () {
var callbacks = utils.flatten([];
View index.js
'use strict';
var http = require('http');
var request = require('request');
var nth = require('co-nth-arg');
var _ = require('lodash');
module.exports = function (propName, options) {
propName = propName || 'api';
You can’t perform that action at this time.