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 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
// ==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
/* | |
# 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#define putsNoLn(string) fputs(string, stdout) |
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 monkey hackmd toc | |
// @namespace http://gholk.github.io | |
// @version 9 | |
// @grant none | |
// @match https://hackmd.io/* | |
// @match https://hackmd.ccns.ncku.edu.tw/* | |
// ==/UserScript== | |
/* this script monkey patch the hackmd easy content table, |
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
-- 作者 gholk | |
-- 日期 2018-05-31 | |
{- 2018 年報名 flolac 所要求的課前測驗, | |
昨天看完前三章,現在邊看第四章邊把測驗寫完了。 -} | |
-- 1 | |
myFst :: (a,b) -> a | |
myFst (a,b) = a |
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
function patchGeneratorFunction() { | |
const GeneratorFunction = function *(){}.constructor | |
GeneratorFunction.prototype.asyncCallback = function () { | |
return CallbackAsync.fromGeneratorToCallback(this, ...arguments) | |
} | |
GeneratorFunction.prototype.asyncPromise = function () { | |
return PromiseAsync.fromGeneratorToPromise(this, ...arguments) | |
} | |
GeneratorFunction.prototype.async = GeneratorFunction.prototype.asyncPromise |
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 greasy monkey repl | |
// @description read evaluate print loop of grease monkey environment | |
// @namespace http://gholk.github.io/ | |
// @version 4 | |
// @match * | |
// @grant GM.info | |
// @grant GM.deleteValue | |
// @grant GM.getValue | |
// @grant GM.listValues |
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 chrome bbs javascript executor | |
// @namespace http://gholk.github.io/ | |
// @description press J in term.ptt.cc can run JavaScript | |
// @match https://term.ptt.cc/* | |
// @match https://www.clam.ml/* | |
// @match https://www.ptt.cc/bbs/* | |
// @version 15 | |
// @grant none | |
// ==/UserScript== |