rules: {
"规则名": [规则值, 规则配置]
}
参考文档:https://nodejs.org/zh-cn/
使用nvm作为node.js版本管理工具
function parseURI(url) {
var m = String(url).replace(/^\s+|\s+$/g, ‘’).match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
// authority = ‘//‘ + user + ‘:’ + pass ‘@‘ + hostname + ‘:’ port
return (m ? {
href: m[0] || ‘’,
protocol: m[1] || ‘’,
authority: m[2] || ‘’,
host: m[3] || ‘’,
hostname: m[4] || ‘’,
#!/bin/bash | |
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
# This script will work on Debian, Ubuntu, CentOS and probably other distros | |
# of the same families, although no support is offered for them. It isn't | |
# bulletproof but it will probably work if you simply want to setup a VPN on | |
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and | |
# universal as possible. | |
#!/usr/bin/env bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#=================================================================# | |
# System Required: CentOS, Debian, Ubuntu # | |
# Description: One click Install Shadowsocks-go server # | |
# Author: Teddysun <i@teddysun.com> # | |
# Thanks: @cyfdecyf <https://twitter.com/cyfdecyf> # | |
# Intro: https://teddysun.com/392.html # | |
#================================================================== |
/** | |
* @copyright ydhao 2018 Clustertech Limited. All rights reserved. | |
* @author YanDong Hao (377868419@qq.com) | |
* | |
* @file Type definitions for AMap | |
*/ | |
declare module AMap { | |
/** | |
* 此对象用于表示地图、覆盖物、叠加层上的各种鼠标事件返回,包含以下字段: |
#!/bin/sh | |
# create self-signed server certificate: | |
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create server key..." | |
openssl genrsa -des3 -out $DOMAIN.key 1024 |
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="旧的Email地址" | |
CORRECT_NAME="正确的用户名" | |
CORRECT_EMAIL="正确的邮件地址" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi |
{ | |
"extends": ["tslint-react"], | |
"rules": { | |
"ban": false, | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" | |
], | |
"curly": true, |
/** | |
* @export generateUUID | |
* @returns {String} | |
* @description RFC4122 version 4 compliant solution | |
* @link | |
* https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript | |
*/ | |
export function generateUUID () { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( | |
/[xy]/g, function(c: string) { |