This file contains 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
# default.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
schema_list: | |
- schema: luna_pinyin # 朙月拼音 | |
- schema: terra_pinyin # 地球拼音 dì qiú pīn yīn |
This file contains 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
#!/usr/bin/env python | |
# | |
# Converts any integer into a base [BASE] number. I have chosen 62 | |
# as it is meant to represent the integers using all the alphanumeric | |
# characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
# | |
# I plan on using this to shorten the representation of possibly long ids, | |
# a la url shortenters | |
# |
This file contains 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
// via: http://c.learncodethehardway.org/book/ex20.html | |
#ifndef __dbg_h__ | |
#define __dbg_h__ | |
#include <stdio.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <time.h> |
This file contains 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
// ==UserScript== | |
// @name Simplify Dict.cn | |
// @namespace http://mitnk.com | |
// @version 0.1 | |
// @description Simplify dict cn 的生词本 | |
// @match http://scb.dict.cn/card.php* | |
// @copyright 2014+, mitnk | |
// for tampermonkey on Chrome. | |
// ==/UserScript== |
This file contains 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
path=`ps ax | grep -i 'postmaster' | grep -o '\-D\(/Library/Post.*\)' | awk -F D '{print $NF}'` | |
log_dir="${path}/pg_log" | |
log_name=`sudo ls -1t ${log_dir} | head -n1` | |
log_file="${log_dir}/${log_name}" | |
echo "" | |
echo "=========== $log_file ==========" | |
echo "" | |
sudo tail -f "$log_file" |
This file contains 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
mkdir -p tmp_dir_to_install_grep | |
cd tmp_dir_to_install_grep | |
wget https://ftp.gnu.org/gnu/grep/grep-2.18.tar.xz | |
tar xf grep-2.18.tar.xz | |
cd grep-2.18/ | |
./configure && make && sudo make install |
NewerOlder