Skip to content

Instantly share code, notes, and snippets.

View yorkxin's full-sized avatar
〽️

Yu-Cheng Chuang yorkxin

〽️
View GitHub Profile
@yorkxin
yorkxin / readme.md
Created April 4, 2012 07:52
Build GitX (R)

GitX (R)

brew install cmake
brew link cmake
brew install libgit2

git clone git://github.com/rowanj/gitx.git
cd gitx

git submodule init

@yorkxin
yorkxin / Readme.markdown
Created March 9, 2012 16:10
Test failed for Ruby 1.9.2-p320 (compiled with Clang 3.1)
@yorkxin
yorkxin / DeafultKeyBinding.dict
Created December 23, 2011 01:35
Mac OS X Function-Key Hack
{
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* page up/down */
@yorkxin
yorkxin / yaci.zsh-theme
Created December 20, 2011 06:46
My ZSH Theme
# depends on oh-my-zsh
# forked from macovsky-ruby theme
local return_code="%(?..%{$bg[red]%}%{$fg[black]%}=%?%{$reset_color%})"
function rvm_prompt_info {
echo "$ZSH_THEME_RVM_PROMPT_PREFIX$(~/.rvm/bin/rvm-prompt i v g)$ZSH_THEME_RVM_PROMPT_SUFFIX"
}
function git_prompt_status_full {
@yorkxin
yorkxin / gist:805284
Created February 1, 2011 02:08
sample code of supporting to S3's GET link with response-* params
# see https://github.com/rightscale/right_aws/pull/47 for more details
# Traditional way, without headers and response-* params
s3instance.get_link('bucket_name', 'key/song.mp3', 86400)
#=> https://bucket_name.s3.amazonaws.com:443/key%2Fsong.mp3?Signature=vIh5...&Expires=1296611902&AWSAccessKeyId=AK...
# To generate url with response-* params, headers parameter must be specified,
# and response-* params are in hash style
s3instance.get_link('bucket_name', 'key/song.mp3', 86400,
{}, # empty additional headers
@yorkxin
yorkxin / Pie.jsx
Last active September 3, 2015 06:00
Pie progress component for React
var Pie = React.createClass({
defaultProps: {
percentage: 0
},
calculateAngle: function(percentage) {
return (percentage) * (360 / 100);
},
render: function() {
var angle = this.calculateAngle(this.props.percentage);
http://paletton.com/
(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
yorkxin / css_resources.md
Last active August 29, 2015 14:10 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

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

Guides

@yorkxin
yorkxin / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yorkxin
yorkxin / KKBOX KBL.md
Last active August 29, 2015 13:59
KKBOX 歌單 (KBL 檔)