Skip to content

Instantly share code, notes, and snippets.

View mikedklein's full-sized avatar
💻
Making BA Shit

Mike Klein mikedklein

💻
Making BA Shit
View GitHub Profile
// Action to increment the context amount
const incrementCount = assign({
count: (context, _) => context.count + 1
});
const lightBulbMachine = Machine(
{
id: 'lightBulb',
initial: 'unlit',
context: {
@mikedklein
mikedklein / App.js
Created November 7, 2016 04:12
glamor style specificity
import React, { Component } from 'react';
import Button from 'react-bootstrap/lib/Button';
import { style } from 'glamor';
import logo from './logo.svg';
import './App.css';
const ButtonStyle = style({
borderTopLeftRadius: 0,
borderTopRightRadius: 0
});
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mikedklein
mikedklein / ReactClass.js
Last active August 2, 2016 19:19
Webstorm file templates for react components.
import React, {PropTypes, Component} from 'react';
class ${NAME} extends Component {
constructor(props) {
super(props);
//Set any initial state here
}
render() {
return (
import React from 'react';
import mui from 'material-ui';
import injectTapEventPlugin from 'react-tap-event-plugin';
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import Colors from 'material-ui/lib/styles/colors';
import MyTheme from './theme.js';
import AppBar from 'material-ui/lib/app-bar';
import List from 'material-ui/lib/lists/list';
import ListItem from 'material-ui/lib/lists/list-item';