Skip to content

Instantly share code, notes, and snippets.

View redguardtoo's full-sized avatar
⛸️
Focusing

Chen Bin redguardtoo

⛸️
Focusing
View GitHub Profile
[声母]
zh=V
ch=I
sh=U
[韵母]
iu=Q
ua=X
ia=X
uan=R
# open terminal
cmd - return : ~/Applications/iTerm.app/Contents/MacOS/iTerm2 --single-instance -d ~
# focus window
cmd - h : yabai -m window --focus west
cmd - j : yabai -m window --focus south
cmd - k : yabai -m window --focus north
cmd - l : yabai -m window --focus east
# balance size of windows
@redguardtoo
redguardtoo / git-log-L-20,20:README.txt
Created November 27, 2019 13:29
git log -L20,20:README.md` at Git repo (HEAD is d9f6f3b619)
commit 6164972018ba3adbae2db1e7b286e2b811b3e7c2
Author: Matthieu Moy <git@matthieu-moy.fr>
Date: Thu Feb 25 09:37:27 2016 +0100
README.md: add hyperlinks on filenames
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/README.md b/README.md
@redguardtoo
redguardtoo / .bashrc
Last active May 8, 2021 00:50
My bash configuration
##
# Bash 4+ required
# FROM,
# 1. http://tldp.org/LDP/abs/html/sample-bashrc.html
# 2. git://github.com/chenkaie/DotFiles.git
##
# If not running interactively, don't do anything
case $- in
*i*) ;;
@redguardtoo
redguardtoo / ediff.sh
Created April 10, 2020 09:51
Use Emacs in ediff to resolve vcs conflicts
#!/bin/sh
[ -z "$MYEMACSCLIENT" ] && MYEMACSCLIENT="emacs"
# $1=$BASE, $2=$LOCAL, $3=$REMOTE, $4=$MERGED
if [ "$MYEMACSCLIENT" = "emacs" ]; then
$MYEMACSCLIENT -nw -Q --eval "(setq startup-now t)" -l "$HOME/.emacs.d/init.el" --eval "(progn (setq ediff-quit-hook 'kill-emacs) (if (file-readable-p \"$3\") (ediff-merge-files-with-ancestor \"$1\" \"$2\" \"$3\" nil \"$4\") (ediff-merge-files \"$2\" \"$3\" nil \"$4\")))"
else
$MYEMACSCLIENT -nw --eval "(progn (setq ediff-quit-hook 'kill-emacs) (if (file-readable-p \"$3\") (ediff-merge-files-with-ancestor \"$1\" \"$2\" \"$3\" nil \"$4\") (ediff-merge-files \"$2\" \"$3\" nil \"$4\")))"
fi
@redguardtoo
redguardtoo / sort-chinese-word-list.el
Created May 24, 2020 13:16
Sort Chinese word list by pinyin
(defconst my-chinese-pinyin-order-hash
#s(hash-table size 30 test equal data (
"一" 375
"乙" 381
"二" 81
"十" 293
"丁" 72
"厂" 35
"七" 264
"卜" 20
For all major modes:
26854 13.38% winum-select-window-2 , 2, M-2
23086 11.50% winum-select-window-1 , 1, M-1
13787 6.87% evilmi-jump-items %, <visual-state> %, <normal-state> %
9807 4.89% my-switch-to-shell , x z, , x c
8410 4.19% evil-visualstar/begin-search-forward <visual-state> *
7888 3.93% my-counsel-recentf , r r
7442 3.71% my-multi-purpose-grep , q q
7429 3.70% winum-select-window-3 , 3, M-3