Skip to content

Instantly share code, notes, and snippets.

View kevinshu1995's full-sized avatar
🙃
When I wrote code, only God and I understood what I did. Now only God knows.

Kevin Hsu kevinshu1995

🙃
When I wrote code, only God and I understood what I did. Now only God knows.
View GitHub Profile
@kevinshu1995
kevinshu1995 / README.md
Last active August 30, 2021 06:57
使用 fontforge 來篩選不要的字

如何壓縮(篩選要用的)字體

需要使用到 fontforge & node & 原本的字型

  1. 新增文字到 ./fontforge.js 裡面的 character
  2. 產生 subset-font.pe (用 Node.js 跑,.pe 檔必須要存在,用空白的 .txt 來修改附檔名即可)
  3. 下載 fontforge
  4. 打開 fontforge 並打開字型 (File > Open 路徑必須是英文,因此不可以有中文資料夾或中文檔名)
  5. 用剛剛 產生/修改 的 .pe 檔篩選 (File > Execute Script > 若上面的文字輸入框有內容,先刪除 > 選擇 FF > 點選 call > 找到 subset-font.pe > OK > OK )
  6. 等待
@kevinshu1995
kevinshu1995 / bs4_extra_utility.scss
Last active August 4, 2021 02:52
Bootstrap 4 - SCSS - extra tailwind like utilities
/*
- output =>
- normal class like: `font-sm`, `font-base`, `font-md`...etc
- responsive class like: `font-sm-sm`, `font-md-sm`, `font-lg-sm`...etc
*/
// * `$font-size-base` is from bs4 variable.
$custom-font-size-base: $font-size-base;
// * font-size map. It's OK to revise here directly.
$custom-font-sizes: (
@kevinshu1995
kevinshu1995 / SideBarToggleButtonOnTeachable.user.js
Last active June 8, 2021 04:57
為 Teachable 增加收合 sidebar 的按鈕
// ==UserScript==
// @name SideBar Toggle Button on Teachable
// @description 為 Teachable 增加收合 sidebar 的按鈕,可點畫面右上角的按鈕觸發,同時按下 `ctrl + shift + Z` 鍵也可以
// @namespace https://kevinshu1995.github.io/blog/
// @author Kevin Hsu
// @license MIT
// @version 0.3
// @include *://courses.hexschool.com/*
// @grant none
// @homepage https://kevinshu1995.github.io/blog/