Skip to content

Instantly share code, notes, and snippets.

@hyww
hyww / eng-elf.js
Created November 1, 2024 12:28
把英文轉成可以使用精靈文字體顯示的中文,目前只支援風格 "岩" https://justfont.com/justforfun/elf-bpmf
const ligature = {
ni: "冪", // ㄇㄧˋ
bi: "娣", // ㄉㄧˋ
ai: "趯", // ㄊ一ˋ
}, mapping = {
m: "ㄇㄟ",
n: "ㄇ",
c: "ㄈ",
b: "ㄉ",
a: "ㄊ",
@hyww
hyww / exportGoogleBookmarks.user.js
Created September 30, 2021 05:39
export Google bookmarks in JSON format. 1. Install the user script with Violentmonkey or other monkeys. 2. Go to https://www.google.com/bookmarks/lookup 3. Remove user script after JSON downloaded
// ==UserScript==
// @name Export Google Bookmarks
// @namespace hyww@github
// @match https://www.google.com/bookmarks/lookup*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM.getValue
// @grant GM.setValue
// @version 1.0
// @author hyww
@hyww
hyww / slackslack.user.css
Last active August 25, 2025 11:33
slack user css
/* ==UserStyle==
@name Slack's lack
@namespace gist.github.com/hyww/53de2ca640686bdb5a852b4d4edf24db
@updateURL https://gist.githubusercontent.com/hyww/53de2ca640686bdb5a852b4d4edf24db/raw/slackslack.user.css
@version 0.7.3
@description For users who is using slack in browser and doesn't like theses changes: https://slackhq.com/simpler-more-organized-slack https://slack.com/blog/productivity/a-redesigned-slack-built-for-focus
@author hyww
==/UserStyle== */
@-moz-document domain("app.slack.com") {
@hyww
hyww / getTwitterVideoURL.py
Created May 4, 2017 16:48
get video url from Twitter post, remember to set your own api token. (https://dev.twitter.com/oauth/application-only)
#!/usr/bin/env python3
import requests
import sys
import re
def getVideo(url):
result = re.search(".*https?:\/\/twitter\.com\/.+\/status\/(\d+).*", url)
if result == None:
return "URL should be in format: https://twitter.com/<user>/status/<id>"
id = result.group(1)