Skip to content

Instantly share code, notes, and snippets.

View rschiang's full-sized avatar
🐳
Sailing

Poren Chiang rschiang

🐳
Sailing
View GitHub Profile
@rschiang
rschiang / Toolkit.md
Created June 10, 2021 17:26
Translators’ Resources for Mandarin (Taiwan)

Rewritten draft.

Very much appreciated for your interest of the project! As the source code updates frequently, it’s great to see new collaborators coming up with timely contributions to keep the project moving. Thank you for being here.

On the other hand, please try to follow the established principles when you translate: many of the new strings are similar to the existing ones, while the translation of specific terms has already been agreed upon. Here are some authoritative sources you may utilize during your contribution:

  • Suggested matches previously translated.
  • Coherence check (full text search of the translation memory of this project) on the top right.
  • The source code on GitHub, to make sure what functionality it refers to.
  • Dictionary of Academic Terms, National Academy for Educational Research .
@rschiang
rschiang / userChrome.css
Last active May 4, 2020 23:50
Fullscreen + overlay title bar for Firefox 71+
/* Fullscreen + overlay title bar for Firefox 71+ */
/* Adapted from https://bugzilla.mozilla.org/show_bug.cgi?id=740148 */
/* Fullscreen support */
/* Shift the browser towards the top */
:root[inFullscreen] {
--user-fullscreen-delta: calc(-40px - var(--tab-min-height));
}
:root[inFullscreen]:not([inDOMFullscreen]) #browser {
@rschiang
rschiang / Crimson.css
Last active June 21, 2020 08:26
Crimson, a Markdown theme for legal reports
/*
Crimson – a theme for legal reports
© RSChiang 2019, CC BY-SA 4.0
*/
/* Metrics */
html, body {
margin: 0;
padding: 0;
@rschiang
rschiang / bingo-pos.js
Last active March 13, 2019 11:35
SITCON 2019 Bingo Card proof-of-concept
crypto = require('crypto')
const sponsors = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', '+']
const communities = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
// 5x5 grid; 0: sponsor; 1: community
const patterns = [0b0010001010100010101000100, 0b1010001010000010101010000,
0b1000100100010100010010001, 0b0010010001010101000100100]
@rschiang
rschiang / Starlight+.style
Created October 13, 2018 09:56
A MacDown highlighting scheme inspired by the Atom theme “City Lights”
editor
foreground: b7c5d3
background: 181d23
caret: 666d81
editor-selection
foreground: ffffff
background: 41505e
H1
@rschiang
rschiang / soundcloud.sh
Created September 7, 2018 07:23
Fetch and join file from soundcloud
#!/usr/bin/env bash
# Copy M3U response from Firefox and do this
pbpaste | base64 --decode | python -c 'import sys;_=list(sys.stdout.write('"'"'url="{}"\noutput="{:02}.mp3"\n'"'"'.format(line.strip(), i)) for i, line in enumerate(filter(lambda x: x[0] != "#", sys.stdin), start=1))' | curl -K -
ffmpeg -i concat:"01.mp3|02.mp3|03.mp3|04.mp3|05.mp3|06.mp3|07.mp3|08.mp3|09.mp3|10.mp3|11.mp3|12.mp3|13.mp3|14.mp3" -c copy output.mp3
@rschiang
rschiang / slice.sh
Created May 28, 2018 09:23
Turns image strip into GIF
#!/bin/bash
convert bounce.png -background white -alpha remove -crop 150x150 +repage frame%02d.png
gifski frame*.png --fps 18 --output bounce.gif
@rschiang
rschiang / Monokai.xml
Created March 28, 2018 21:23
Qt Creator Style Scheme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Monokai">
<style name="Text" foreground="#f8f8f2" background="#282828"/>
<style name="Link" foreground="#66d9ef"/>
<style name="Selection" background="#49483e"/>
<style name="LineNumber" foreground="#a6a6a3" background="#303030"/>
<style name="SearchResult" background="#888888"/>
<style name="SearchScope" background="#282828"/>
<style name="Parentheses" underlineColor="#a6e22e" underlineStyle="DotLine"/>
<style name="ParenthesesMismatch" background="#f92672"/>
@rschiang
rschiang / 65-noto.conf
Created February 4, 2018 20:29
reMarkable Noto Sans CJK support script
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans UI</family>
<family>Noto Sans</family>
<family>Noto Sans CJK TC</family>
</prefer>
@rschiang
rschiang / ruby-text-in-markdown.md
Last active October 28, 2016 19:45
Ruby text syntax support proposal in CommonMark

Proper ruby text (<rb>) syntax support in Markdown

Originally posted on CommonMark discussion board, 2016/10/29.

It is fairly common for East Asian languages (mostly CJK characters) to have ruby texts annotations; not only do they provide phonetic guides, the actual meaning of text might even differ without labeling.

This technique is currently implemented in HTML as a set of <ruby> tags, as demonstrated.

躊(ㄔㄡˊ)