Skip to content

Instantly share code, notes, and snippets.

View MapleCCC's full-sized avatar
🔨
Building

MapleCCC

🔨
Building
View GitHub Profile
@MapleCCC
MapleCCC / sVimrc-gist
Last active March 22, 2018 09:03
A reconfigure file for sVim.
map "h" previousTab
map "l" nextTab
map "," goBack
map "." goForward
map "c" lastClosedTabBackground
map "f" createTabbedHint
map "i" goToInput
@MapleCCC
MapleCCC / gist:3d04a6ba90d419f600dd1a692a570fb1
Created October 15, 2018 05:40
Vimium custom key mappings
map h previousTab
map l nextTab
map f LinkHints.activateModeToOpenInNewTab
map F LinkHints.activateMode
map , goBack
map . goForward
map c restoreTab
map i focusInput
map e visitPreviousTab
map v lastTab
@MapleCCC
MapleCCC / OpenWithSublimeText3.bat
Created November 22, 2018 14:50 — forked from cstewart90/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@MapleCCC
MapleCCC / genRandomWords.js
Created April 11, 2019 15:37
Generate intelligent random words
var genRandomWords = require("rword").rword.generate;
var mostMistypedLetter = "";
var mostMistypedCount = 0;
for (var [key, value] of result.miss) {
if (mostMistypedCount < value) {
mostMistypedCount = value;
mostMistypedLetter = key;
}
}
@MapleCCC
MapleCCC / .vscode\settings.json
Last active January 13, 2020 12:57
Visual Studio Code Settings Sync Gist
{
"workbench.colorCustomizations": {
"activityBar.background": "#cc92c4",
"activityBar.activeBorder": "#e7ebd4",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#e7ebd4",
"activityBarBadge.foreground": "#15202b",
"titleBar.activeBackground": "#bc6fb1",
"titleBar.inactiveBackground": "#bc6fb199",
In [1]: tree = BinarySearchTree()
In [2]: tree.insert(2).insert(1).insert(4).insert(3).insert(6).delete(6)
In [3]: tree
Out[3]: Tree(Node(2, left=Node(1), right=Node(4, left=Node(3))))
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@MapleCCC
MapleCCC / 男人类.py
Last active January 6, 2022 09:24
男人类
class 男人(人):
def __init__(self, name: str, beard_density: float) -> None:
super().__init__(name)
self.beard_density = beard_density
@property
def 胡须密度(self) -> float:
return self.beard_density
@MapleCCC
MapleCCC / 默僧类.py
Last active January 6, 2022 14:34
默僧类
class 修会(Enum):
本笃会 = "Benedictines"
熙笃会 = "Cistercians"
严规熙笃隐修会 = "Trappists"
class 默僧(人):
def __init__(self, name: str, order: 修会) -> None:
super().__init__(name)
self.order = order
@MapleCCC
MapleCCC / 人类.py
Created January 6, 2022 10:28
人类
class 人:
def __init__(self, name: str) -> None:
self.name = name
@property
def 名字(self) -> str:
return self.name
def 说话(self) -> None:
print("你好!")