This file contains 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
echo " | |
rdr pass inet proto tcp from any to any port {80,8080} -> 127.0.0.1 port 8080 | |
" | sudo pfctl -ef - |
This file contains 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
interface IItem | |
{ | |
id: number, | |
title: string | |
}; | |
function print(item: IItem) | |
{ | |
console.log(item.id + " > " + item.title); | |
} | |
var i : IItem = { |
This file contains 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
{ | |
"flow.useNPMPackagedFlow": true, | |
"javascript.validate.enable": false | |
} |
This file contains 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
module.exports = { | |
parser: "babel-eslint", | |
extends: [ | |
"airbnb-base", | |
"airbnb-base/rules/strict", | |
"airbnb/rules/react", | |
"prettier", | |
"prettier/react" | |
], | |
plugins: ["react", "prettier", "import"], |
This file contains 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
class MyEvents { | |
constructor () { | |
this.events = {} //存储事件监听函数 | |
this.maxListeners = 10 //一种函数类型,最大监听函数数量 | |
} | |
setMaxListeners (maxNum) { | |
this.maxListeners = maxNum | |
} | |
This file contains 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 capitalizeFirstLetter = s => { | |
const type = typeof s; | |
if (type !== 'string') { | |
throw new Error(`Expected string, instead received ${type}`); | |
} | |
const [firstChar, ...remainingChars] = s; | |
return [firstChar.toUpperCase(), ...remainingChars].join(''); | |
}; |
This file contains 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
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Thumbnails | |
._* | |
# Files that might appear in the root of a volume | |
.DocumentRevisions-V100 |
This file contains 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
# Rime default settings | |
# encoding: utf-8 | |
config_version: "0.36" | |
schema_list: | |
- schema: luna_pinyin | |
- schema: cangjie5 | |
- schema: luna_pinyin_fluency | |
- schema: luna_pinyin_simp |
This file contains 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
{ | |
"config": { | |
"commitizen": { | |
"path": "node_modules/cz-emoji" | |
}, | |
"cz-emoji": { | |
"types": [ | |
{ | |
"emoji": "🔩", | |
"code": "chore :nut_and_bolt:", |
This file contains 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
{ | |
"Working Directory" : "\/Users\/leohxj", | |
"Prompt Before Closing 2" : 0, | |
"Selected Text Color" : { | |
"Green Component" : 0, | |
"Blue Component" : 0, | |
"Red Component" : 0 | |
}, | |
"Rows" : 30, | |
"Ansi 11 Color" : { |