A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| import Reconciler from 'react-reconciler' | |
| import omit from 'lodash/omit' | |
| import capitalize from 'lodash/capitalize' | |
| import { actions as elementActions } from './store/elements' | |
| import * as Elements from './elements' | |
| const roots = new Map() | |
| const emptyObject = {} | |
| const Renderer = Reconciler({ |
| import React from 'react' | |
| var Child = React.createClass({ | |
| getInitialState: function(){ | |
| console.log('Child getInitialState'); | |
| return { value: 'start'} | |
| }, | |
| getDefaultProps: function(){ | |
| console.log('Child getDefaultProps'); |
| export const GoogleApi = function(opts) { | |
| opts = opts || {} | |
| const apiKey = opts.apiKey; | |
| const libraries = opts.libraries || []; | |
| const client = opts.client; | |
| const URL = 'https://maps.googleapis.com/maps/api/js'; | |
| const googleVersion = '3.22'; | |
| let script = null; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var myString = 'EXAMPLEstring'; | |
| var myNewString = myString.replace(/[A-Z]/g, '0'); | |
| console.log(myNewString); | |
| function replaceFunc (a, b, c) { | |
| console.log(a, b, c); | |
| return a.toLowerCase(); | |
| } | |
| var myOtherString = myString.replace(/[A-Z]/g, replaceFunc); |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
| // | |
| // Permission is hereby granted, free of charge, to any person |