Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View trantorLiu's full-sized avatar

Chun-Yi Liu trantorLiu

View GitHub Profile

Getting Started

Installation

  • Install RVM
  • Install Ruby
  • Install Rails

Generate the Blog Application

  • rails new blog
  • Browse the generated code
@trantorLiu
trantorLiu / web_development_ebooks.md
Last active August 29, 2015 14:20
Collect good ebooks / curriculum for learning web development
@trantorLiu
trantorLiu / codementor_react_tutorial_series.md
Last active June 6, 2018 05:08
Codementor React Tutorial Series

Codementor React Tutorial Series -- From Dummy to Ninja

In this sesction, you'll learn JSX, the concept of React components, and play around with React.

Practice what you learnt by building a board game. You will learn the conecpt of states, and how to compose components.

Now you are familiar with React, you are ready to get started with Flux -- the client-side application architecture from Facebook.

@trantorLiu
trantorLiu / handlebars-pagination-helper.js
Last active August 10, 2023 14:01
Handlebars pagination helper.
Handlebars.registerHelper('pagination', function(currentPage, totalPage, size, options) {
var startPage, endPage, context;
if (arguments.length === 3) {
options = size;
size = 5;
}
startPage = currentPage - Math.floor(size / 2);
endPage = currentPage + Math.floor(size / 2);