Skip to content

Instantly share code, notes, and snippets.

View chentsulin's full-sized avatar
🕶️
Keep learning

C. T. Lin chentsulin

🕶️
Keep learning
View GitHub Profile
@chentsulin
chentsulin / week-4.md
Last active October 15, 2015 11:16
Week 4 課堂練習
@chentsulin
chentsulin / week-4.md
Last active October 15, 2015 13:13
Week 4 - After class
@chentsulin
chentsulin / week-3.md
Last active October 20, 2015 11:57
Week 3 - After class

Week 3

Homework Assignment

Chat Room Application

繳交方式

  • Deadline: 10/22 中午 12:00
  • 把檔案寄至 chentsulin@gmail.com,標題寫 [作業三/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)
@chentsulin
chentsulin / week-2.md
Last active October 5, 2016 11:30
Week 2 - After class

Week 2

Homework Assignment

繳交方式

  • Deadline: 3/17 中午 12:00
  • 把檔案寄至 chentsulin@gmail.com,標題寫 [作業二/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)

1. 寫一個判斷並回傳型別的 function getType

@chentsulin
chentsulin / week-1.md
Last active September 21, 2016 12:47
Week 1 - After class

Week 1

Homework Assignment

Todo List Application

繳交方式

  • Deadline: 3/10 中午 12:00
  • 把檔案寄至 chentsulin@gmail.com,標題寫 [作業一/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)
@chentsulin
chentsulin / slim-redux.js
Last active September 23, 2015 00:25 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-) . Simplify for beginner
import { mapValues, pick, compose } from 'lodash';
function bindActionCreator(actionCreator, dispatch) {
return (...args) => dispatch(actionCreator(...args));
}
export function bindActionCreators(actionCreators, dispatch) {
return typeof actionCreators === 'function' ?
bindActionCreator(actionCreators, dispatch) :
mapValues(actionCreators, actionCreator =>
@chentsulin
chentsulin / redux-devtools-separate-window.js
Last active September 13, 2015 13:04 — forked from tlrobinson/redux-devtools-separate-window.js
Put the awesome redux-devtools in it's own window so it doesn't obscure or be obscured by your application
import React from 'react';
import ReactDom from 'react-dom';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
export default function createDevToolsWindow(store) {
// give it a name so it reuses the same window
const win = window.open(null, 'redux-devtools', 'menubar=no,location=no,resizable=yes,scrollbars=no,status=no');
// reload in case it's reusing the same window with the old content
@chentsulin
chentsulin / log-timer.js
Last active August 29, 2015 14:21
Add Timer Spy on setTimeout and setInterval
var _setT = setTimeout;
setTimeout = function() {
console.log('setTimeout');
console.log(arguments);
_setT.apply(this, arguments);
};
var _setI = setInterval;
setInterval = function() {
console.log('setInterval');
@chentsulin
chentsulin / index.js
Created March 27, 2015 07:01
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var qs = require('qs');
var obj = qs.stringify({ a: [ 'a', 'b', 'c' ] });
console.log(obj);