Skip to content

Instantly share code, notes, and snippets.

View tualatrix's full-sized avatar

Tualatrix Chou tualatrix

View GitHub Profile
@tualatrix
tualatrix / ShareNavigationController.swift
Created April 13, 2018 08:44
Perfect presentation animation of iOS Share Extensions's Navigation Controller
//
// ShareNavigationController.swift
//
// Created by Tualatrix Chou on 2018/04/13.
//
// Use as the root navigation controller
import UIKit
class ShareNavigationController: UINavigationController {
@tualatrix
tualatrix / download_picasa_photos_and_upload_to_flickr.sh
Created January 8, 2014 14:29
Download photos from Google Picasa and upload to Flickr, the album name will be read from album_list.txt
#!/bin/bash
while read album
do
echo -e "Will download album $album"
google picasa get "$album" .
pushd "$album"
echo -e "Start to upload $album to Flickr"
find -type f|sort|xargs -I{} flickr_upload {}
popd
@tualatrix
tualatrix / phrases.ini
Last active February 20, 2022 09:51
搜狗拼音输入法--自定义短语配置文件 for Mac,放在 /Library/Input Methods/SogouInput.app/Contents/Resources/phrases.ini 下即可
; 搜狗拼音输入法--自定义短语配置文件
;
; 说明:
; 1、自定义短语支持多行、空格、指定位置。
; 2、每条自定义短语最多支持30000个汉字,总共支持100000行内容。
; 3、自定义短语的格式如下:
;
; 单行的格式:
; 字符串+英文逗号+数字(指定排序位置)=短语
;
@tualatrix
tualatrix / unicorn_example.sh
Created March 17, 2012 14:44
An example of unicorn init script for Ubuntu
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
@tualatrix
tualatrix / add_google_search_support.patch
Created January 31, 2012 08:16
Add Google Search support for GNOME Terminal
diff --git a/src/terminal-util.c b/src/terminal-util.c
index e36cba9..8e1c64f 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -125,7 +125,7 @@ terminal_util_show_error_dialog (GtkWindow *transient_parent,
g_free (message);
}
-static gboolean
+gboolean
@tualatrix
tualatrix / add_real_traditional_chinese_support.patch
Created January 31, 2012 05:45
Add real traditional Chinese support for ibus-table
diff --git a/engine/stot.py b/engine/stot.py
new file mode 100644
index 0000000..bc6edc2
--- /dev/null
+++ b/engine/stot.py
@@ -0,0 +1,7346 @@
+# coding: utf-8
+
+stot_dict = {
+ u"〇余": u"〇餘",