This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Chance = require('chance') | |
interface IChance extends Chance.Chance { | |
password(): string | |
} | |
export const chance = new Chance() as IChance | |
// mixins | |
chance.mixin({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractOriginFromFullUrl = url => url.split('/', 3).join('/') | |
extractOriginFromFullUrl('http://www.example.com:8080/abc') // => http://www.example.com:8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g \ | |
trymodule \ | |
eslint \ | |
standard \ | |
public-ip-cli \ | |
internal-ip-cli \ | |
is-up-cli \ | |
clipboard-cli \ | |
wifi-password-cli \ | |
gh-home \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2008-10-17", | |
"Id": "http better policy", | |
"Statement": [ | |
{ | |
"Sid": "readonly policy", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::your-bucket/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
export const get = async (event: any, context: any, callback: any) => { | |
const parameters = Object.keys(event.queryStringParameters) | |
if (parameters.length !== 1) { | |
callback(null, { | |
statusCode: 400 | |
}) | |
} | |
const url = parameters[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
get: | |
handler: handler.get | |
events: | |
- http: | |
method: get | |
path: / | |
cors: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
for (let i = 2; i < process.argv.length; i++) { | |
const filename = process.argv[i] | |
let content = fs.readFileSync(filename, 'utf-8') | |
if (/static propTypes = {/.test(content)) { | |
content = content.replace(/static propTypes = {[^{}]*({[^{}]*})*[^{}]*}\n/, '') | |
fs.writeFileSync(filename, content) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph G { | |
rankdir=TB; | |
subgraph cluster_0 { | |
label = "backend"; | |
color = black; | |
style= "dotted"; | |
backend_v1_1 [label="v1.1" color="grey"]; | |
backend_v1_2 [label="v1.2" color="grey"]; | |
backend_master [label="master" color="grey" style="filled"]; | |
backend_feature_a [label="A" color="coral2" style="filled"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph G { | |
v1_1 [label="v1.1" color="grey"]; | |
v1_2 [label="v1.2" color="grey"]; | |
master [label="master" color="grey" style="filled"]; | |
feature_a [label="A" color="coral2" style="filled"]; | |
feature_b [label="B" color="deepskyblue2" style="filled"] | |
mono [label="Mono"] | |
mono -> tags; | |
mono -> branches; | |
branches -> master; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
项 | lerna.js import | tomono | |
---|---|---|---|
导入来源 | 本地git仓库 | 远程git仓库 | |
多分支 | 不支持 | 导入所有分支 | |
标签 | 不支持 | 导入所有标签 | |
导入后更新 | 不支持 | 支持 | |
批量导入 | 不支持 | 支持 |