Instantly share code, notes, and snippets.

View tslint.json
{
"extends": ["tslint-react"],
"rules": {
"ban": false,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
View Rewrite_GitConfig.sh
#!/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
View gencert.sh
#!/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
View AMap.d.ts
/**
* @copyright ydhao 2018 Clustertech Limited. All rights reserved.
* @author YanDong Hao (377868419@qq.com)
*
* @file Type definitions for AMap
*/
declare module AMap {
/**
* 此对象用于表示地图、覆盖物、叠加层上的各种鼠标事件返回,包含以下字段:
View go-shadowsocks-install.sh
#!/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 #
#==================================================================
View install-openvpn.sh
#!/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.
View parseURI.md
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] || ‘’,
View Vue_learn.md

Vue-demo Learn

配置基本环境

1、安装node.js

参考文档:https://nodejs.org/zh-cn/

使用nvm作为node.js版本管理工具

View Eslint_rule.md

配置参数

rules: {
    "规则名": [规则值, 规则配置]
}

规则值: