Skip to content

Instantly share code, notes, and snippets.

View redguardtoo's full-sized avatar
⛸️
Focusing

Chen Bin redguardtoo

⛸️
Focusing
View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwmjzGrIlozQ7Uekc+LyfmlMxNcFyA/qXpygydglcax/klFOwrMPoYbOgaooLCv5qUKl7FjfA5poKYcARPqGzlBPM61TGW8tmWTmBb5WkUNi1FpBCd76OQ1fnKP4a4Fnl27CMYgl3UBa0B2vXlfDTHb+TTI+b3EEwHBeVUjWreeN1YEBmnR/i9FR+OGCpMu87jIrJt8OBddwiEvZEVhtvncqyHZ9AsGw2r9X+EDR88GqpkZwHG18gjax01NDQPJcwIKhLCJ3CcB7IVTdghOvG/jMtizmHyDvDelV9H8Oydn6RJ4Z/DStUQPXqgSlJNv55K4OEFw0MuaZFA9ItoRko8w== chenbin.sh@gmail.com
@redguardtoo
redguardtoo / MyConfig.pm
Last active August 29, 2015 14:06
my cpan setup (use australia NSW http mirror site)
$CPAN::Config = {
'applypatch' => q[],
'auto_commit' => q[0],
'build_cache' => q[100],
'build_dir' => q[/root/.cpan/build],
'build_dir_reuse' => q[0],
'build_requires_install_policy' => q[yes],
'bzip2' => q[/bin/bzip2],
'cache_metadata' => q[1],
! rxvt-unicode-256color recommended
! @see http://websemantics.co.uk/resources/font_size_conversion_chart/
! 16px media; 18px large; 24px x-large ...
URxvt.font:xft:WenQuanYi Zen Hei Mono:pixelsize=20:antialias=True
URxvt.boldFont:xft:WenQuanYi Zen Hei Mono:pixelsize=20:antialias=True
URxvt.inputMethod: fcitx
URxvt.preeditType: OnTheSpot,None
URxvt*termName: rxvt
@redguardtoo
redguardtoo / sort-pyim-hanzi-order.el
Created June 14, 2019 12:18
sort chinese characters
(require 'cl-lib)
(defun my-read-file (file)
(with-temp-buffer
(insert-file-contents (file-truename file))
(buffer-string)))
;; (message "content=%s" (my-read-file))
(defun my-format-dictionary ()
(interactive)
(let* ((h (make-hash-table :size 1000))
[声母]
zh=V
ch=I
sh=U
[韵母]
iu=Q
ua=X
ia=X
uan=R
@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*) ;;
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
@redguardtoo
redguardtoo / proj2ram
Last active May 17, 2022 18:12
script to copy project to tmpfs
#!/bin/sh
if [ -z "$1" ];then
echo "Usage:"
echo " proj2ram proj-name"
echo " proj2ram restore proj-name"
exit 1
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