Skip to content

Instantly share code, notes, and snippets.

'use strict';
const NODE_ENV = process.env.NODE_ENV || 'development';
const React = require('react');
import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom';
const App = require('./App');
const Index = require('./Index');
const About = require('./About');
'use strict';
const NODE_ENV = process.env.NODE_ENV || 'development';
const React = require('react');
import { StaticRouter, BrowserRouter, Route, Link } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
/**
'use strict';
const NODE_ENV = process.env.NODE_ENV || 'development';
/* React and Redux stuff */
const React = require('react');
const ReactDOM = require('react-dom');
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
'use strict';
/**
* I make reducersFactory a function in order to pass it an initial state as a parameter.
* Switch-case are just for example. You may have your own
*/
function reducersFactory(initialState) {
return function reducers(state = initialState, action) {
switch (action.type) {
@wzup
wzup / class.js
Created January 19, 2017 18:18 — forked from Maksims/class.js
Small implementation of classes with: extend, implement, and check methods
// base class
function Class() { }
// base class name
Class.prototype.className = 'Class';
// lists all parent classes and outputs JSON with it
Class.prototype.toString = function() {
var str = '';
var next = this.__proto__;
@wzup
wzup / html5_page_template
Created April 12, 2015 11:14
HTML5 Page Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 Page Template</title>
<!-- <link rel="stylesheet" href="css/main.css" type="text/css" /> -->
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
@wzup
wzup / .jshintrc
Created September 9, 2015 11:48
.jshintrc file example, minimal settings, copy/paste to root folder
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",
@wzup
wzup / .jshintrc
Created September 9, 2015 11:46
.jshintrc FULL file example, for reference
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope