View memoizeNode.js
module.exports = function memoizeNode(node) {
var element
var placeholder
var mounted = false
return function render() {
if(!element) {
element = node
mounted = true
return element
}
View factor.sh
browserify ./screens/*.js -p [ factor-bundle -o 'tee > bundle/`basename $FILE`' ] -o bundle/common.js
View tinytest.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>tiny tests</title>
<style>
body {
font-family: sans-serif;
padding: 3rem;
}
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
set number
set cursorline
hi CursorLine term=bold cterm=bold guibg=Grey40
set tabstop=2
set expandtab
set shiftwidth=2
set autoindent
set smartindent
View .vimrc
" keyboard shortcuts
inoremap jj <ESC>
nnoremap ; :
"NAVIGATION
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
View webpack.config.js
postcss: function() {
return [
postcssImport({
onImport: function (files) {
files.forEach(this.addDependency)
}.bind(this)
}),
customProperties(),
autoprefixer
]
View textinput.jsx
import React, { Component } from 'react'
class TextInput extends Component {
constructor(props) {
super(props)
}
get value() {
return this.refs.textarea.value
View .vimrc.bundles
Bundle 'airblade/vim-gitgutter'
Bundle 'austintaylor/vim-indentobject'
Bundle 'christoomey/vim-tmux-navigator'
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'
Bundle 'majutsushi/tagbar'
Bundle 'rking/ag.vim'
Bundle 'msanders/snipmate.vim'
Bundle 'Shutnik/jshint2.vim'
Bundle 'nathanaelkane/vim-indent-guides'
View .vimrc
:set cursorline
" keyboard shortcuts
inoremap jj <ESC>
nnoremap ; :
"NAVIGATION
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
View defend-default.js
//Defends against es2015 default export
function defendAgainstDefault(component) {
if (component.default) {
component = component.default
}
return component
}