Skip to content

Instantly share code, notes, and snippets.

Avatar

Tracer Lee TracerLee

View GitHub Profile
View gist:00c9f467f4c87a473cfd62e6921ff631

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 |

View window.onerror.js
// 从全局捕获错误
window.onerror = function (errMsg, scriptURI, lineNumber, columnNumber, errorObj) {
setTimeout(function () {
var rst = {
"错误信息:": errMsg,
"出错文件:": scriptURI,
"出错行号:": lineNumber,
"出错列号:": columnNumber,
"错误详情:": errorObj
};
View IIFE.js
// 创建一个立即执行的匿名函数
// 该函数返回一个对象,包含你要暴露的属性
var counter = (function(){
var i = 0;
return {
get: function(){
return i;
},
@TracerLee
TracerLee / Sublime Settings
Last active Apr 12, 2017
Cobalt2.sublime-theme Settings
View Sublime Settings
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"font_size": 10,
"ignored_packages":
[
"Markdown",
"Vintage"
],
"material_theme_small_statusbar": true,
"material_theme_small_tab": true,
View Default (Windows).sublime-keymap
[
// 默认配置增强
{ "keys": ["alt+shift+c"], "command": "clone_file" },
{ "keys": ["ctrl+alt+shift+o"], "command": "prompt_open_folder" },
{ "keys": ["ctrl+shift+o"], "command": "prompt_add_folder" },
{ "keys": ["ctrl+alt+e"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} },
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 6.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -6.0 } },
@TracerLee
TracerLee / Default (Windows).sublime-keymap
Created Dec 15, 2015
Open containing folder shortcut
View Default (Windows).sublime-keymap
[
{ "keys": ["ctrl+alt+e"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} }
]
View Hello World.js
console.log('Hello World.');
You can’t perform that action at this time.