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 tamagotchi = {} | |
var action = {} | |
action.doNothing = function () {} | |
action.standBy = function () { | |
var date = new Date() | |
if (date.getMilliseconds() % 10000 == 0) { | |
this.say('hello master') |
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 open clean window | |
// @namespace http://gholk.github.io/ | |
// @description when click mouse with WinKey, open ancher in new window without toolbar, manubar, location bar. | |
// @match <all_urls> | |
// @version 10 | |
// @grant none | |
// ==/UserScript== | |
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
#!/bin/sh | |
# this script help find possible order of base64 fragment. | |
# | |
# like "hello world" is aGVsbG8gd29ybGQ= , | |
# it would help find "hello world" from "G8g Vsb d2 9yb GQ= aG" | |
# | |
# usage: sh find-base64-fragment-order.sh $known_start $frag1 $frag2 ... | |
# unknown init base: | |
# sh find-base64-fragment-order.sh '' G8g Vsb d2 9yb GQ= aG | |
# know start with h, which is `a` in base64, so first is `aG` |
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
const sentence = [ | |
'為什麼高中生 很愛參加台大杜鵑花節?', | |
'女兒被假爸舔臉頰會有心理陰影嗎', | |
'乙武洋匡屌打板上肥宅幾條街?', | |
'沈志霖 PTT鄉民xmanhman你錯了!', | |
'西半部空品「一片紅」 台中電廠降載1260M', | |
'年營收16億 486先生仍騎車上班', | |
'原來護廷十三番藍染隊長是叛徒?!', | |
'稱台灣旅行法=「台灣毀滅法」 邱毅遭嗆:', |
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== |
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
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
-- 作者 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
// ==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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#define putsNoLn(string) fputs(string, stdout) |
OlderNewer