Skip to content

Instantly share code, notes, and snippets.

Avatar
〽️

Yu-Cheng Chuang yorkxin

〽️
View GitHub Profile
@yorkxin
yorkxin / KKBOX KBL.md
Last active Aug 29, 2015
KKBOX 歌單 (KBL 檔)
View KKBOX KBL.md
@yorkxin
yorkxin / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yorkxin
yorkxin / css_resources.md
Last active Aug 29, 2015 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

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

View colors.txt
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 / 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);
@yorkxin
yorkxin / gist:805284
Created Feb 1, 2011
sample code of supporting to S3's GET link with response-* params
View gist:805284
# 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
View yaci.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 / DeafultKeyBinding.dict
Created Dec 23, 2011
Mac OS X Function-Key Hack
View DeafultKeyBinding.dict
{
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* page up/down */
@yorkxin
yorkxin / Readme.markdown
Created Mar 9, 2012
Test failed for Ruby 1.9.2-p320 (compiled with Clang 3.1)
View Readme.markdown
@yorkxin
yorkxin / readme.md
Created Apr 4, 2012
Build GitX (R)
View readme.md

GitX (R)

brew install cmake
brew link cmake
brew install libgit2

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

git submodule init