Skip to content

Instantly share code, notes, and snippets.

Avatar

Chun-Yi Liu trantorLiu

View GitHub Profile
@trantorLiu
trantorLiu / handlebars-pagination-helper.js
Last active Aug 27, 2021
Handlebars pagination helper.
View handlebars-pagination-helper.js
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);
@trantorLiu
trantorLiu / codementor_react_tutorial_series.md
Last active Jun 6, 2018
Codementor React Tutorial Series
View codementor_react_tutorial_series.md

Codementor React Tutorial Series -- From Dummy to Ninja

The React Quick Start Guide

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

React Beginner Tutorial: Building a Board Game from Scratch

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

The Flux Quickstart Guide

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

View Ruby on Rails Table of Contents.md

Getting Started

Installation

  • Install RVM
  • Install Ruby
  • Install Rails

Generate the Blog Application

  • rails new blog
  • Browse the generated code