ssh -NR 7070:localhost:7070 hlifeg
参考链接:https://www.ibm.com/developerworks/cn/linux/l-cn-sshforward/index.html
rsync -v -r ../webapp/* ./webapp --exclude-from ../webapp/.gitignore --exclude=".git/*" |
// 临时修复mpvue-loader 1.0.15复制node_modules目录的bug | |
module.constructor.prototype.require = function (modulePath) { | |
if ( | |
modulePath === './modules/transform-require' && | |
this.id.indexOf('mpvue-loader/lib/template-compiler/index.js') > -1 | |
) { | |
modulePath = path.resolve(__dirname, 'utils', 'fixRequire.js') | |
} | |
return this.constructor._load(modulePath, this) | |
} |
const cache = { | |
resolve: null | |
} | |
let timerId | |
function finish(b) { | |
console.warn('---------finish-------') | |
if (cache.resolve) { | |
console.warn('---------cache.resolve-------', b) |
ssh -NR 7070:localhost:7070 hlifeg
参考链接:https://www.ibm.com/developerworks/cn/linux/l-cn-sshforward/index.html
import WebSocket from './websocket' | |
export default factory() | |
// below copy from https://github.com/hapijs/nes/blob/master/lib/client.js | |
function factory() { | |
// Utilities | |
const version = '2' | |
const ignore = function() {} |
'use strict'; | |
Object.defineProperty(exports, '__esModule', { value: true }); | |
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | |
var deindent = _interopDefault(require('de-indent')); | |
var he = _interopDefault(require('he')); | |
var babel = _interopDefault(require('babel-core')); | |
var prettier = _interopDefault(require('prettier')); |
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
#------------------------------------------------------------------------------------------------------------- | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | |
#------------------------------------------------------------------------------------------------------------- | |
FROM node:lts | |
# Configure apt | |
ENV DEBIAN_FRONTEND=noninteractive |
'use strict'; | |
var __importDefault = | |
(this && this.__importDefault) || | |
function(mod) { | |
return mod && mod.__esModule ? mod : { default: mod }; | |
}; | |
var __importStar = | |
(this && this.__importStar) || | |
function(mod) { | |
if (mod && mod.__esModule) return mod; |
/** | |
* interface OOO { o: string } | |
* key in keyof OOO | |
* 等价于 key in 'o' | 'o' | |
* 等价于 key in 'o' | |
* 一定程度绕过直观上需要传入generic type的场景 function t<T,B>():<T<B>>{return {} as any} | |
*/ | |
function geta<KEY extends string = 'data'>(aa: string) { | |
const b: { [key in KEY]: any } = { |