Skip to content

Instantly share code, notes, and snippets.

View tan9's full-sized avatar

Pei-Tang Huang tan9

  • Chunghwa Telecom Co., Ltd.
  • Taichung, Taiwan
View GitHub Profile
@tan9
tan9 / thymeleaf-legacyhtml5-parser-threading-issue-testcase_.idea_.name
Created April 16, 2015 03:24
Thymeleaf LegacyHtml5TemplateParser threading issue
thymeleaf-legacyhtml5-parser-threading-issue-testcase
@tan9
tan9 / thymeleaf-legacyhtml5-parser-threading-issue-testcase_.gitattributes
Created April 16, 2015 03:26
Thymeleaf LegacyHtml5TemplateParser threading test
# Auto detect text files and perform LF normalization
* text=auto
*.java text diff=java
*.properties text
*.js text
*.css text
*.less text
*.html text diff=html
*.jsp text diff=html
// ==UserScript==
// @name medulla
// @namespace http://tampermonkey.net/
// @version 0.1
// @match http://localhost:16501/*
// @match http://localhost:16502/*
// @match http://localhost:16503/*
// @match http://localhost:16504/*
// @match http://localhost:16505/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
@tan9
tan9 / WebLogicFilterOrderingWorkaroundServletInitializer.java
Last active May 1, 2021 06:37
Spring Boot app on WebLogic workaround.
package com.cht.compost.context.web;
import java.util.EnumSet;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.FilterRegistration;
import javax.servlet.Registration;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
// ==UserScript==
// @name 臺中市校園閱讀認證小幫手
// @description 在「臺中市國民小學推動校園閱讀線上認證系統」將認證題目改用注音字型顯示、增加快捷鍵等,方便認證。
// @version 0.2.1
// @author Pei-Tang Huang
// @downloadURL https://gist.githubusercontent.com/tan9/df262289574f8c1db32e5705b8cddabc/raw/
// @updateURL https://gist.githubusercontent.com/tan9/df262289574f8c1db32e5705b8cddabc/raw/
// @match *://read.tc.edu.tw/*
// @require https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.3/mousetrap.min.js
// @require https://code.jquery.com/jquery-3.4.1.min.js
@tan9
tan9 / azure-devops-toolbox.user.js
Last active July 8, 2022 01:47
Azure DevOps Toolbox
// ==UserScript==
// @name Azure DevOps Toolbox
// @source https://gist.github.com/tan9/78bb3fc107c3d1e7ef8d404e3e0a99ec
// @namespace https://gist.github.com/tan9/
// @version 0.1.1
// @description Change the new Pull Request target to repository itself, a workaround for https://developercommunity.visualstudio.com/t/ability-to-change-the-default-target-repo-when-cre/791273
// @author Pei-Tang Huang
// @downloadURL https://gist.githubusercontent.com/tan9/78bb3fc107c3d1e7ef8d404e3e0a99ec/raw/
// @updateURL https://gist.githubusercontent.com/tan9/78bb3fc107c3d1e7ef8d404e3e0a99ec/raw/
// @match https://dev.azure.com/*
@tan9
tan9 / clone-all-azure-devops-repos.sh
Last active August 6, 2022 16:13
Clone all Azure DevOps repos within a organzation.
#!/bin/bash
set -e
export AZURE_PAT=<YOUR_AZURE_PRIVATE_ACCESS_TOKEN>
export organization=<YOUR_ORGANIZATION>
# limit the number of spawned processes: https://stackoverflow.com/a/14387296/3440376
function max5 {
while [ `jobs -p | wc -l` -ge 5 ]
do
@tan9
tan9 / lia-insurtech-toolbox.user.js
Last active August 6, 2022 16:14
壽險公會保險存摺小工具
// ==UserScript==
// @name 保險存摺小工具
// @source https://gist.github.com/tan9/3a3e5359a09bd196d32e55c5f492b090
// @namespace https://gist.github.com/tan9/
// @version 0.1
// @description 將壽險公會「保險存摺」網頁上失效的保單以半透明方式顯示。
// @author Pei-Tang Huang
// @downloadURL https://gist.githubusercontent.com/tan9/3a3e5359a09bd196d32e55c5f492b090/raw/
// @updateURL https://gist.githubusercontent.com/tan9/3a3e5359a09bd196d32e55c5f492b090/raw/
// @match https://insurtech.lia-roc.org.tw/my_list.html
@tan9
tan9 / ezlearning.user.js
Last active January 17, 2024 01:27
CHT e-Learning Assistant
// ==UserScript==
// @name CHT e-Learning Assistant
// @source https://gist.github.com/tan9/41686eab8e704bb18885a24339010d65
// @version 0.7.2
// @description Learn with no pain (and hopefully not no gain...)
// @author tan9, danny
// @downloadURL https://gist.githubusercontent.com/tan9/41686eab8e704bb18885a24339010d65/raw/
// @updateURL https://gist.githubusercontent.com/tan9/41686eab8e704bb18885a24339010d65/raw/
// @require https://www.gstatic.com/firebasejs/4.9.0/firebase.js
// @require https://code.jquery.com/jquery-1.12.4.min.js