Skip to content

Instantly share code, notes, and snippets.

View tsaiid's full-sized avatar

I-Ta Tsai tsaiid

View GitHub Profile
@tsaiid
tsaiid / default.custom.yaml
Created July 4, 2015 12:51
鼠鬚管自訂檔
patch:
schema_list:
- schema: boshiamy_t
- schema: boshiamy_j
@tsaiid
tsaiid / everwatch.rb
Last active August 29, 2015 14:27
Watch Evernote for updates and put the current content of the editor into a preview file for Marked 2.app
#!/usr/bin/env ruby
# Modified from everwatch.rb by Brett Terpstra, 2011
# http://brettterpstra.com/2011/11/14/marked-scripts-nvalt-evernote-marsedit-scrivener/
# http://support.markedapp.com/kb/how-to-tips-and-tricks/marked-bonus-pack-scripts-commands-and-bundles
# Modified from everwatch.rb by regedor, 2014
# https://github.com/regedor/everwatch
#
# Watch Evernote for updates and put the current content of the editor into a preview file for Marked 2.app
account = ARGV[0] || ENV['EVERWATCH_ACCOUNT'] || ENV["USER"]
@tsaiid
tsaiid / squirrel.custom.yaml
Last active September 9, 2015 03:36
鼠鬚管外觀設定
patch:
style/font_face: "Source Han Sans TC Light"
style/font_point: 18
style/color_scheme: starcraft
# 註:預設的配色方案及代碼(指定爲 style/color_scheme )
# 碧水 - aqua
# 青天 - azure
# 明月 - luna
# 墨池 - ink
@tsaiid
tsaiid / PreviewMarkdownService.scpt
Last active October 30, 2015 11:26
AppleScript to preview Markdown with Marked 2 in Evernote
on run
tell application "Evernote"
if selection is not {} then
set nbsp to «data utxt00A0» as Unicode text
set tmp_file to POSIX path of (((path to documents folder) as text) & "EvernoteSelectionTmp.md")
set this_file to POSIX path of (((path to documents folder) as text) & "EvernoteSelection.md")
set the_selection to selection
set the_title to title of item 1 of the_selection
@tsaiid
tsaiid / imagemagick-engine.diff
Created June 20, 2013 13:11
in safe_mode, exec() will force to use escapeshellcmd(), which will cause problem if pre-added quote.
@@ -472,7 +472,7 @@ function ime_im_cli_check_executable($fullpath) {
if (!is_executable($fullpath))
return false;
- @exec('"' . $fullpath . '" --version', $output);
+ @exec($fullpath . ' --version', $output);
return count($output) > 0;
}
@@ -547,7 +547,7 @@ function ime_im_cli_resize( $old_file, $new_file, $width, $height, $crop, $resiz
@tsaiid
tsaiid / sublime-text-preference
Last active January 1, 2016 23:09
Sublime Text Preference
{
// Material Theme
"theme": "Material-Theme.sublime-theme",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"overlay_scroll_bars": "enabled",
"line_padding_top": 3,
"line_padding_bottom": 3,
//"font_options": [ "gray_antialias" ], // On retina Mac
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
@tsaiid
tsaiid / .zshrc
Created January 2, 2014 13:44
My .zshrc
# Customize to your needs...
DEFAULT_USER="tsaiid"
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
PATH=/usr/local/bin:$PATH # Homebrew
# For ssh-agent
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
@tsaiid
tsaiid / get-previous-report.ahk
Last active January 2, 2016 11:09
get-previous-report.ahk for SmartWonder
; HotKey
;; for SmartWonder
#IfWinActive, tedpc-
IEGet(Name="") ;Retrieve pointer to existing IE window/tab
{
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
Name := ( Name="New Tab - Windows Internet Explorer" ) ? "about:Tabs"
: RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
For wb in ComObjCreate( "Shell.Application" ).Windows
@tsaiid
tsaiid / get-previous-report-by-click-all.ahk
Last active January 2, 2016 11:09
Previous AHK script for SmartWonder by clicking inprecisely.
MouseGetPos, xpos,ypos
Click 700, 180 ; 歷史報告
Click 270, 325 ; 開影像
Click 1080, 741 ; 複製報告
Click 1080, 759 ; 複製報告
Click 1080, 777 ; 複製報告
Click 1080, 795 ; 複製報告
Click 1080, 813 ; 複製報告
Click 1080, 831 ; 複製報告
Click 300, 180 ; 回報告區
MouseGetPos, xpos,ypos
Click 700, 180 ; 歷史報告
Click 270, 325 ; 開影像
Click 1080, 759 ; 複製報告
Click 300, 180 ; 回報告區
MouseMove, %xpos%, %ypos%