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
/* | |
# mathjs es6 style tag template string | |
this is a extension for mathjs, | |
which allow you directly embed | |
mathjs type variable in es6 tag template string, | |
instead of pass variable by a dictionary object. | |
## usage | |
this script is useing commonjs style, use exports. |
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 double click not click | |
// @namespace http://gholk.github.io/ | |
// @description prevent double click being click | |
// @version 6 | |
// @grant none | |
// ==/UserScript== | |
/* | |
when firefox on android use click then scroll to zoom, |
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 hackmd scroll flip | |
// @namespace http://gholk.github.io/ | |
// @version 6 | |
// @description make mouse scroll flip page in hackmd slide mode. | |
// @match https://hackmd.io/*/* | |
// @grant none | |
// ==/UserScript== | |
if (document.querySelector('.reveal .slides')) { |
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 python3 | |
""" | |
write by gholk <gholk@ccns.ncku.edu.tw> | |
license under gpl3 | |
""" | |
import glob | |
import os | |
import sys | |
import datetime |
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 element show mxc reaction | |
// @namespace http://gholk.github.io/ | |
// @version 2 | |
// @match https://app.element.io/* | |
// @grant none | |
// ==/UserScript== | |
// license under gplv3 by gholk |
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 google search unredirect | |
// @namespace http://gholk.github.io/ | |
// @version 6 | |
// @match https://www.google.com/search?* | |
// @grant none | |
// ==/UserScript== | |
function unlistenClick() { | |
for (const a of document.querySelectorAll('a[onmousedown]')) { |
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
FUCK THE CCP 🇨🇳🇨🇳 💩💩💩 | |
TAIWAN 🇹🇼 IS A COUNTRY 中華民國 | |
Taiwan No.1 🇹🇼🇹🇼🇹🇼 | |
🇭🇰 Liberate Hong Kong, 🇭🇰 | |
🇭🇰 revolution of our times! 🇭🇰 | |
FREE TIBET Dalai Lama 🏴🏴🏴 | |
UYGHUR GENOCIDE | |
8964 TIANANMEN SQUARE MASSACRE | |
Tank man 占占点从从 天安門大屠殺 | |
Commie Away 🖕☭🖕 |
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
/* License under GPLv3 by gholk | |
* | |
* share for reference if anyone need to deal with excel object model in jscript/vbscript and other stuff. | |
*/ | |
// import JSON | |
// # lookup code | |
var debugFlag = '' |
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
/** | |
* copyright: gholk 2022 (http://gholk.github.io/contact.html) | |
* license: gplv3 | |
* install: copy this file to explorer.exe shell:sendto | |
* require: Excel.Application and wscript or cscript | |
* description: merge all excel worksheets in workbook files into a new workbook with a single worksheet. | |
* usage: | |
* - right click on xls(x) file(s) and select this script in send-to sub-menu | |
* - or run this script with cscript and pass xls files as arguments | |
* - or drag and drop files onto this script |
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
var dlj=tri.downloadJob={browser:browser,os:"windows",downloadPath:"kwk",stop:false,ex:tri.excmds,idList:[],dlhandlerwrap(...args){return tri.downloadJob.dlhandler(...args)},dlhandler(){},async init(){const tab=await this.browser.tabs.query({active:true,currentWindow:true});this.tabId=tab[0].id;this.windowId=tab.windowId;return;this.dlhandle=function(e){const i=this.idList.findIndex(x=>x.id==e.id);if(i==-1)return;const job=this.idList[i];let state;if(typeof e.state=="object")state=e.state.current;else state=e.state;debugger;switch(e.state.current){case"complete":job.resolve();case"interrupted":let error=new Error("download fail");error.codeName="download-error";job.reject(error);this.idList.splice(i,1);default:true}};this.browser.downloads.onChanged.addListener(this.dlhandlerwrap);this.browser.downloads.onCreated.addListener(this.dlhandlerwrap)},destroy(){this.browser.downloads.onChanged.removeListener(this.dlhandlerwrap);this.browser.downloads.onCreated.removeListener(this.dlhandlerwrap)},async download(url, |