Skip to content

Instantly share code, notes, and snippets.

View chemok78's full-sized avatar

Jay Mok chemok78

  • Hong Kong & The Netherlands
View GitHub Profile
@chemok78
chemok78 / Unbeatable Tic Tac Toe.markdown
Created July 22, 2016 06:23
Unbeatable Tic Tac Toe
@chemok78
chemok78 / app.js
Created December 28, 2016 04:23
React JS Conway Game of Life
var Button = ReactBootstrap.Button;
var ButtonToolbar = ReactBootstrap.ButtonToolbar;
var App = React.createClass({
//function to generate board and set initial state
createBoard: function(width,height){
//function to create an array with board configuration
var array = [];
@chemok78
chemok78 / app.js
Created December 28, 2016 04:25
React JS Online Recipe Box
Storage.prototype.setObj = function(key,obj){
//Extend local storage prototype so we can store objects
return this.setItem(key, JSON.stringify(obj));
};
Storage.prototype.getObj = function(key){
return JSON.parse(this.getItem(key));