This file contains hidden or 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
Set-PSReadLineOption -EditMode Emacs | |
#f45873b3-b655-43a6-b217-97c00aa0db58 PowerToys CommandNotFound module | |
Import-Module -Name Microsoft.WinGet.CommandNotFound | |
#f45873b3-b655-43a6-b217-97c00aa0db58 | |
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression |
This file contains hidden or 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
# 提供的简易的,有色彩的git lg 选项 | |
git config --global alias.lg "log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" | |
# 支持git status显示中文 | |
git config --global core.quotepath false |
This file contains hidden or 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
; 参考 https://github.com/Vonng/Capslock/blob/master/win/CapsLock.ahk | |
; 转化为使用autohotkey V2 | |
SetCapsLockState("AlwaysOff") | |
#HotIf GetKeyState("CapsLock", "P") | |
h::Left | |
j::Down | |
k::Up | |
l::Right |
This file contains hidden or 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
import markdownify | |
import re | |
import datetime | |
from bs4 import BeautifulSoup | |
with open("index.html") as f: | |
html = f.read() | |
soup = BeautifulSoup(html, 'html.parser') | |
memos = soup.find_all('div', class_='memo') |
This file contains hidden or 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
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
class TestVector | |
{ | |
public: | |
~TestVector() |
This file contains hidden or 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
std::ostringstream fileContentsStream; | |
fileContentsStream << std::ifstream("MyFile.txt").rdbuf(); | |
std::string fileContents = fileContentsStream.str(); |
This file contains hidden or 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
auto isPinned = __IsPinned(); | |
auto pinStr = ANY_TO_STRING(isPinned); | |
G::UserTraceService()->LogTraceWithoutEmail("IsPinned", pinStr); |
This file contains hidden or 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
void CChromeViewSupport::__LoadLib() | |
{ | |
typedef bool (*createChromeSupport_t)(IChromeSupportLib** ppChrome); | |
static createChromeSupport_t pFunc = NULL; | |
if (m_hLib == NULL) | |
{ | |
HMODULE h = ::LoadLibrary(L"BrowserLib.dll"); | |
if (h) | |
{ | |
pFunc = (createChromeSupport_t)::GetProcAddress(h, "CreateChromeSupport"); |
This file contains hidden or 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
auto iter = std::find(m_mainFormList.begin(), m_mainFormList.end(), form); | |
if (iter != m_mainFormList.end()) | |
{ | |
m_mainFormList.erase(iter); | |
} |
This file contains hidden or 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
auto iter = std::find(m_mainFormList.begin(), m_mainFormList.end(), form); | |
if (iter != m_mainFormList.end()) | |
{ | |
m_mainFormList.erase(iter); | |
} |
NewerOlder