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 / .gitconfig
Created September 11, 2015 03:36
Git config witchcrafts
[user]
name = Poren Chiang
email = <EMAIL>
[color]
ui = true
[alias]
tree = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
keepup = !git checkout $2 && git merge $1 && git push && git push origin $2 && git checkout $1 && echo
on = commit -m
themall = commit -a -m
@rschiang
rschiang / get_schools.py
Last active September 15, 2016 02:34
交換資料整理
#!/usr/bin/env python3
import requests
import re
def fetch(url):
if url.startswith('/'):
url = 'http://www.oia.ntu.edu.tw' + url
request = requests.get(url)
request.encoding = 'utf8'
return request.text
@rschiang
rschiang / PebbleLanguagePack.md
Last active March 24, 2018 00:11
Pebble 語言包製作方法懶人包
@rschiang
rschiang / 2017_2th.md
Created October 2, 2016 15:30
SITCON 2017 二籌會議記錄備份

SITCON 2017 二籌

時間:10/02(日)1:30pm 地點:八德94 出席:Denny、雁子、工藤、Deemo、Elantris、慈吟、阿吉、PCC、Jeremy、Pellaeon、全全、育慈、ㄅㄌ、阿貓 線上:阿哲、YOGA、大倫、下午、小學生、YOYO


@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.

躊(ㄔㄡˊ)
@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 / 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 / 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 / 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 / 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