Skip to content

Instantly share code, notes, and snippets.


Yu-Cheng Chuang yorkxin

View GitHub Profile
yorkxin / A Note to My Fifty-Year-Old
Last active Dec 2, 2020
流氓阿德 Ardor Huang【給五十歲自己的備忘錄 A Note to My Fifty-Year-Old Self】
View A Note to My Fifty-Year-Old
View Podcasts.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<title>iTunes Subscribed Feeds</title>
<dateCreated>Fri, 03 Mar 2017 08:41:34 GMT</dateCreated>
<dateModified>Fri, 03 Mar 2017 08:41:34 GMT</dateModified>
<outline text="硬影像" type="rss" xmlUrl="" htmlUrl="" />
<outline text="一天世界" type="rss" xmlUrl="" htmlUrl="" />
yorkxin /
Last active Jun 9, 2020
Raspberry Pi with HDMI Switch

For some HDMI switches (e.g. ATEN), to make HDMI hot plugging work well with Raspberry Pi, set the following in /boot/config.txt:

hdmi_force_hotplug=1 # always output HDMI even if not plugged in
hdmi_drive=2         # always output audio to HDMI
hdmi_group=1         # use CET mode (compatible with TV)
hdmi_mode=16         # use 1080p; otherwise it may switch to SD resolution


yorkxin /
Last active Mar 1, 2016
CJSX (CoffeeScript + JSX) to ES6

(Not) CJSX to ES6 converter

It does noly convert a small set of codes into ES6. You sill need to edit the file.


find ./components -name "*.cjsx" -exec ./ {} \;
yorkxin /
Created Feb 14, 2016
yorkxin / Pie.jsx
Last active Sep 3, 2015
Pie progress component for React
View Pie.jsx
var Pie = React.createClass({
defaultProps: {
percentage: 0
calculateAngle: function(percentage) {
return (percentage) * (360 / 100);
render: function() {
var angle = this.calculateAngle(this.props.percentage);
View colors.txt
(present = Full Colors)
Lightest Lighter Base Darker Darkest Hue ~=
#FF6363 #FF3939 #FF0000 #C50000 #9B0000 R 0
#FFA863 #FF9139 #FF7100 #C55700 #9B4500 RO 30
#FFCB63 #FFBD39 #FFAA00 #C58300 #9B6700 O 60
#FFE463 #FFDD39 #FFD300 #C5A300 #9B8000 OY 90
yorkxin /
Last active Aug 21, 2019
Proxy to remote server with CORS support
View for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.


Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.


yorkxin /
Last active Aug 29, 2015 — forked from jookyboi/
CSS libraries and guides to bring some order to the chaos.


  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.


yorkxin /
Last active Aug 18, 2017 — forked from jookyboi/
Rails-related Gems and guides to accelerate your web project.


  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h