Skip to content

Instantly share code, notes, and snippets.

View Yukaii's full-sized avatar
👾
nyan, nyan, nyan

Yukai Huang Yukaii

👾
nyan, nyan, nyan
View GitHub Profile
@Yukaii
Yukaii / README.md
Last active April 26, 2020 04:41
JustFont frontend script study

JustFont frontend code analysis

這份 gist 是 JustFont 前端程式碼的分析,包含後端和一些資料的草稿可以看:https://hackmd.io/@yukai/webfont-study 就其實一直對這種 web font hosting 的技術有些興趣,就心血來潮開坑啦,其實也是想做一個最簡單的 Open source POC 這樣。不考慮效能的後端 XD

進行流程

基本上就是用人腦 De-Uglify (or prettify) 經過混淆的 JavaScript 程式碼 XD,過程如下

  1. Prettier JavaScript
  2. 過 standard lint
@Yukaii
Yukaii / README.md
Last active November 7, 2021 09:48
Editor font & codeblock font cutomization for HackMD
JavaScript 6 hours 23 minutes ████████████░░░░░░░░░░░░░ 49.09%
JSX 2 hours 46 minutes █████░░░░░░░░░░░░░░░░░░░░ 21.33%
JSON 1 hour 43 minutes ███░░░░░░░░░░░░░░░░░░░░░░ 13.16%
TypeScript 1 hour 2 minutes ██░░░░░░░░░░░░░░░░░░░░░░░ 7.99%
SCSS 17 minutes █░░░░░░░░░░░░░░░░░░░░░░░░ 2.15%
@Yukaii
Yukaii / index.html
Last active January 11, 2020 03:25
Taiwan voting stamp
<div class="stamp"></div>
@Yukaii
Yukaii / index.html
Last active January 4, 2020 02:01
GistPad playground test
<div class="circle red w-50 h-50"></div>
<div class="circle red w-50 h-50"></div><div class="circle red w-50 h-50"></div><div class="circle red w-50 h-50"></div><div class="circle red w-50 h-50"></div><div class="circle red w-50 h-50"></div>
@Yukaii
Yukaii / README.md
Last active April 12, 2019 10:03
HackMD Bookmarklet: Create note from selection

Demo

Imgur

Usage

Create a bookmark with the following link:

javascript: (function () { var title = window.prompt('Make new note on HackMD', document.title); if (!title) return; var lines = [document.title, '', '[' + document.title + '](' + window.location.href + ')']; var quote = window.getSelection().toString(); if (quote.trim()) lines = lines.concat(quote.split(/\n/g).map(function (line) { return ' &gt; ' + line })); lines.push(''); var body = encodeURIComponent(lines.join('\n')); window.open('https://hackmd.io/new?title=' + body) })();
@Yukaii
Yukaii / dashboard.json
Last active September 19, 2021 00:07
extension count history raw data
{
"component": "root",
"args": {
"title": "Extension history stats"
},
"data": [
{
"component": "text",
"args": {
"tagName": "h1"
@Yukaii
Yukaii / extensions.json
Last active January 20, 2020 02:10
Yukai's VSCode Settings
[
{
"id": "4tron.stack-overflow-view",
"name": "stack-overflow-view",
"publisher": "4tron",
"version": "0.1.1"
},
{
"id": "aaron-bond.better-comments",
"name": "better-comments",
@Yukaii
Yukaii / dashboard.yml
Last active September 19, 2021 00:06
Package stats dashboard, visit result at http://bottoml.in/e/Yukaii/a06877acd1b4399213e0dc08c7560378
dashboard "Package stats":
- h1 text: Package stats
- h3 text: Show VSCode, SublimeText, Atom editors extension stats
- p text: Last updated at 2021-09-19 00:06:59 +0000
- bar chart:
columns: [
["VSCode", 30029], ["Sublime Text", 5186], ["Atom", 9134]
]
@Yukaii
Yukaii / deasync-example.js
Last active February 12, 2018 13:45
deasync example
var v
let asyncFunction = () => {
return new Promise((resolve, reject) => {
setTimeout(function () {
resolve(5)
}, 2000)
})
}