Skip to content

Instantly share code, notes, and snippets.


Yu-Cheng Chuang yorkxin

View GitHub Profile
yorkxin / KeyBindings.json
Last active Nov 29, 2018
My Sublime Text 2 Config
View KeyBindings.json
/* Default (OS X).sublime-keymap */
/* Key Bindings - User */
{ "keys": ["ctrl+shift+."], "command": "erb", "context":
"key": "selector",
"operator": "equal",
"operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js,"
yorkxin / .zshrc
Last active Jun 4, 2018
My ZSH Settings
View .zshrc
# Path to your oh-my-zsh configuration.
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
yorkxin /
Last active Aug 18, 2017 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
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
yorkxin /
Created Feb 14, 2016
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 Aug 10, 2016
Safari 6 Default Font Fallback Fix (for CJK users)

Safari 6 的預設字體也崩潰了

跟 Chrome 一樣, Safari 6 也使用 html tag 的 lang attribute 來判斷要用哪一套字體來 fallback (參考這裡)。以繁體中文的 zh-TW 為例,它會 fallback 到 Heiti TC (黑體-繁),不只漢字,連英文、數字都套用。我不喜歡這樣,理由:

  1. Heiti TC / Heiti SC 的英文與數字很醜。
  • Heiti TC / Heiti SC 的日文假名也很醜,注音符號更醜,後者尤其是讓我身為台灣人卻沒感到尊重。
  • zh 視為 zh-cn ,所以如果到了 維基百科 ,你就會看到簡體版的 Heiti SC (黑体-简),也就是中國國家標準的漢字及標點符號;不是看到簡體字,而是某些字筆畫有些不同,以及標點符號從正中間挪到左下方(參考漢字標準格式・標點樣式)。
  • 出於個人偏好,我對整個 OS X 設定了繁體中文(Hant)、簡體中文(Hans)都使用 Hiragino Sans GB (冬青黑體)而非預設的 Heiti TC / Heiti SC,雖然標點符號不符合台灣的規範,而且一樣有漢字寫法的問題,但字比較美。 Safari 的行為把這一原則給推翻了,我又看到了 Heiti TC / Heiti SC (怒)。


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 / .vimrc
Last active Dec 22, 2015
my .vimrc
View .vimrc
set cindent
set hls " highlight search rersult
set nocompatible
set sw=2
set ts=8
set cursorline
syntax on
if has('gui_running')
yorkxin / wordpressdotcom.rb
Created Nov 25, 2011 (XML export) to Octopress importer. See for change notes.
View wordpressdotcom.rb
# coding: utf-8
# Original File:
# Modified by Yu-Cheng Chuang <>
# Licensed under MIT License (same as the original file)
# This version of wordpressdotcom.rb is compatible
# with the real-world export file, which:
# - Makes paragraphs (<p>) and line breaks (<br>)