Will's Blog

「离开世界之前 一切都是过程」

Kitty

Migrating to a new terminal emulator

The fast, feature-rich, GPU based terminal emulator Binary install 1 2 3 4 5 6 curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin ln -s ~/.local/kitty.app/bin/kitty ~/.local/bin/ cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/ cp ~/.lo...

Lua Notes

Fundamentals Print and Comments 1 2 3 4 5 6 print("Hello World!") -- this is a one-line comment --[[ this is a multi-line comment it can go here ]] Math 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 print(math.floor(2.345)) -- 2 print(math.ceil(2.345)) -- 3 print(math.max(2,3)) -- 3 print(math.mi...

(Neo)Vim Trick | Using Macros

Vim 编辑器中「宏」的使用

Macro is probably one of those hidden gems of (Neo)Vim, but most beginners don’t know the use cases although they know it’s powerful. Recording a macro is a great way to perform a one-time task, or to get things done quickly when you don’t want to mess with Vim script or mappings, or if you d...

有趣的英语习语 / 俚语

Interesting slangs and idioms

维基百科写道: Slang is vocabulary (words, phrases, and linguistic usages) of an informal register, common in spoken conversation but avoided in formal writing. It also sometimes refers to the languag...

MySQL Notes

Basics Database 1 2 3 4 5 6 7 8 9 10 11 12 13 14 --0 list databases SHOW DATABASES; --1 create database CREATE DATABASE database_name; --2 delete database DROP DATABASE database_name; --3 use database USE database_name; --4 show current database SELECT database(); Table 1 2 3 4 5 6 7 8 9...

Git Tricks Worth Knowing

使用 Git 的「奇技淫巧」

Restore / Reset 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #1 - restore a file change git restore <filename> #2 - reset all file changes git reset --hard HEAD #3 - unstage a file git restore --cached <filename> #4 - restore a deleted file (but didn't commit) git checkout HEAD <filename&g...