Skip to content

Instantly share code, notes, and snippets.

View lyshie's full-sized avatar

HSIEH, Li-Yi (SHIE, Li-Yi) lyshie

View GitHub Profile
@lyshie
lyshie / glyph.sh
Last active June 6, 2021 06:23
Convert TTF (True Type Font) to PNG
#!/bin/sh
chars=$(cat ../10.txt | fold -w1 | sort | uniq)
for c in $chars; do
convert -background none -fill red -font /opt/local/fonts/lyshie/TW-Kai-98_1.ttf -pointsize 64 label:"$c" "$c.png"
done
@lyshie
lyshie / pm25.html
Created September 9, 2017 16:18
EDIMAX Airbox (PM2.5)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>PM2.5</title>
</head>
<body>
@lyshie
lyshie / aqi.html
Created September 9, 2017 16:16
AQI (Air Quality Index) for Tainan
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title></title>
<script src="//code.jquery.com/jquery-latest.min.js"></script>
</head>
@lyshie
lyshie / test_dcs.sh
Last active September 9, 2017 16:13
Connection test for dcs.tn.edu.tw
# IPv4
curl -# -v -4 http://chpsxoops.dcs.tn.edu.tw/1gb 2>&1 > /dev/null
# IPv6
curl -# -v -6 http://chpsxoops.dcs.tn.edu.tw/1gb 2>&1 > /dev/null
@lyshie
lyshie / gist:12c3737ce999b0f4ac435c2e738a7451
Last active August 16, 2017 11:31 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-i686-editrights
#