Skip to content

Instantly share code, notes, and snippets.


I-Ta Tsai tsaiid

View GitHub Profile
tsaiid / ShuttleProV2.ahk
Last active Jul 19, 2019
Intercept input from ShuttlePro V2 using AHKHID library, modified from dorfl68 at AHK forum (
View ShuttleProV2.ahk
; Intercept input from ShuttlePro V2 using AHKHID library
; Author: dorfl68 at AHK forum
; Modified by tsaiid
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
tsaiid / vscode-win-keybindings.json
Created Feb 1, 2018
my vscode-win-keybindings.json
View vscode-win-keybindings.json
"key": "ctrl+a",
"command": "cursorHome",
"when": "editorTextFocus"
"key": "ctrl+e",
"command": "cursorEnd",
"when": "editorTextFocus"
View copy-helios-report-into-notepad.ahk
; Copy Current Helios Report Into Notepad
CopyHeliosReportIntoNotepad() {
WinGet, hWnd, ID, Helios
If (hWnd) {
; parse exam info
infoText := Acc_Get("Name", "", 0, "ahk_id " hWnd)
RegExMatch(infoText, "^\[.+\]\s+(\w+)/([^\s]+)\s+\[(.+?)\]\s+\[.+?\]\s+\[(.+?)/.+?\]\s+\[([\d-]+).+?\]", examInfo)
ptID := examInfo1
tsaiid / reorder-selected-text.ahk
Last active Jan 19, 2018
Reorder selected text from the clipboard
View reorder-selected-text.ahk
; Reordering the selected text
ReorderSeletedText(deOrder = False, keepEmptyLine = False, itemChar = ""){
Clipboard := ""
SendEvent ^c
Sleep, 300
StringReplace, selectedText, Clipboard, `r`n, `n, All
StringRight, strRight, selectedText, 1
View black-background.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
body {background: black;}
#closeBtn {
tsaiid / fix-chrome-new-tab-in-helios.ahk
Created Jan 4, 2018
Handle the global hotkey ^t from Helios
View fix-chrome-new-tab-in-helios.ahk
; Need to handle the global hotkey ^t from Helios
If WinActive("ahk_class Chrome_WidgetWin_1") {
ControlSend, ,^t, ahk_class Chrome_WidgetWin_1
} else {
SendInput ^t
View emmet.sublime-keymap
"keys": ["ctrl+e"],
"command": "move_to",
"to": "eol",
"extend": false
tsaiid /
Last active Oct 9, 2017 — forked from larrybolt/
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/
tsaiid / OpenInOsiriX.ahk
Last active Oct 7, 2017
Send retrieve-then-open request to OsiriX with a given accession number
View OpenInOsiriX.ahk
OpenInOsiriX(AccNo) {
osirixUrl = http://__OSIRIX_IP__:__OSIRIX_PORT__
requestXml =
<?xml version="1.0"?>