Skip to content

Instantly share code, notes, and snippets.

Henry Chan hfhchan

Block or report user

Report or block hfhchan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hfhchan
hfhchan / index.js
Last active Sep 29, 2018
Flashing Countdown Timer
View index.js
target = new Date(2018, 8, 29, 17, 30, 0);
document.body.style.textAlign='center';document.body.style.color = 'green';document.body.style.font='bold 280px/1.1 Roboto,sans-serif';show=true;
window.setInterval(() => {
minsLeft = (target-(new Date())) / 60000;
document.body.innerHTML = `${Math.floor(minsLeft)} minutes left`;
if (minsLeft < 10) {
document.body.style.color = 'red';
show=!show;
}
document.body.style.display = show? 'block' : 'none'
@hfhchan
hfhchan / strokes.txt
Created Aug 21, 2018
Error Total Stroke Counts in Unihan
View strokes.txt
𨙾 11
𨚆 11
𨚇 11
𨚈 11
𨚉 11
𨚊 11
𨚋 11
𨚒 11
𨚚 12
𨚠 12
@hfhchan
hfhchan / userscript.js
Created Mar 29, 2018
Glyphwiki Editor Improvements
View userscript.js
// ==UserScript==
// @name Glyphwiki use svg
// @namespace https://github.com/hfhchan
// @include http://glyphwiki.org/*
// @include https://glyphwiki.org/*
// @include http://en.glyphwiki.org/*
// @include http://zht.glyphwiki.org/*
// @include http://zhs.glyphwiki.org/*
// @version 1
// @grant GM.getValue
View browsing-trim.txt
FRO11987 ELE17451 ELE89019 SNA90258 GRO99222
GRO99222 GRO12298 FRO12685 ELE91550 SNA11465 ELE26917 ELE52966 FRO90334 SNA30755 ELE17451 FRO84225 SNA80192
ELE17451 GRO73461 DAI22896 SNA99873 FRO86643
ELE17451 ELE37798 FRO86643 GRO56989 ELE23393 SNA11465
ELE17451 SNA69641 FRO86643 FRO78087 SNA11465 GRO39357 ELE28573 ELE11375 DAI54444
ELE17451 GRO73461 DAI22896 SNA99873 FRO18919 DAI50921 SNA80192 GRO75578
ELE17451 ELE59935 FRO18919 ELE23393 SNA80192 SNA85662 SNA91554 DAI22177
ELE17451 SNA69641 FRO18919 SNA90258 ELE28573 ELE11375 DAI14125 FRO78087
ELE17451 GRO73461 DAI22896 SNA80192 SNA85662 SNA90258 DAI46755 FRO81176 ELE66810 DAI49199 DAI91535 GRO94758 ELE94711 DAI22177
ELE17451 SNA69641 DAI91535 GRO94758 GRO99222 FRO76833 FRO81176 SNA80192 DAI54690 ELE37798 GRO56989
@hfhchan
hfhchan / index.js
Last active Dec 19, 2017
ISOM3370 code
View index.js
(async function() {
let use_trim = true;
let apriori = 0;
// Filename
let filename = [];
if (apriori) {
filename.push('apriori-' + apriori);
}
@hfhchan
hfhchan / browsing.txt
Created Dec 1, 2017
ISOM3370 MapReduce
View browsing.txt
This file has been truncated, but you can view the full file.
FRO11987 ELE17451 ELE89019 SNA90258 GRO99222
GRO99222 GRO12298 FRO12685 ELE91550 SNA11465 ELE26917 ELE52966 FRO90334 SNA30755 ELE17451 FRO84225 SNA80192
ELE17451 GRO73461 DAI22896 SNA99873 FRO86643
ELE17451 ELE37798 FRO86643 GRO56989 ELE23393 SNA11465
ELE17451 SNA69641 FRO86643 FRO78087 SNA11465 GRO39357 ELE28573 ELE11375 DAI54444
ELE17451 GRO73461 DAI22896 SNA99873 FRO18919 DAI50921 SNA80192 GRO75578
ELE17451 ELE59935 FRO18919 ELE23393 SNA80192 SNA85662 SNA91554 DAI22177
ELE17451 SNA69641 FRO18919 SNA90258 ELE28573 ELE11375 DAI14125 FRO78087
ELE17451 GRO73461 DAI22896 SNA80192 SNA85662 SNA90258 DAI46755 FRO81176 ELE66810 DAI49199 DAI91535 GRO94758 ELE94711 DAI22177
@hfhchan
hfhchan / README
Last active Nov 15, 2017
COMP4331 Assignment 2
View README
1. Use Google Chrome 61.0 or above.
2. Navigate to this page.
3. Press F12.
4. Choose the "Console" tab.
5. Paste in the script and press enter.
@hfhchan
hfhchan / README
Last active Oct 12, 2017
COMP4331 Assignment 1 Question 2
View README
1. Use Google Chrome 61.0 or above.
2. Navigate to this page.
3. Press F12.
4. Choose the "Console" tab.
5. Paste in the script and press enter.
@hfhchan
hfhchan / userscript.js
Last active Mar 29, 2018
Glyphwiki Modern Style
View userscript.js
// ==UserScript==
// @name GlyphWiki Style
// @namespace https://github.com/hfhchan/
// @include http://en.glyphwiki.org/*
// @include http://glyphwiki.org/*
// @version 1
// @grant none
// ==/UserScript==
var style = document.createElement("style");
@hfhchan
hfhchan / glyphwiki.simsun.user.js
Last active Sep 29, 2016
Use Simsun for Glyphwiki
View glyphwiki.simsun.user.js
// ==UserScript==
// @name Glyphwiki use SimSun Font
// @namespace https://github.com/hfhchan
// @include http://glyphwiki.org/*
// @include http://en.glyphwiki.org/*
// @include http://zht.glyphwiki.org/*
// @include http://zhs.glyphwiki.org/*
// @version 1
// @grant none
// ==/UserScript==
You can’t perform that action at this time.