View .vimrc
" pathogen plugin management
execute pathogen#infect()
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
View xterm-256color-italic.terminfo
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
# tic xterm-256color-italic.terminfo
#
# Usage:
#
# export TERM=xterm-256color-italic
#
View traversalOrder.js
/*
* Quick and dirty attempt:
*/
// Once per ray cast, determine the full traversal order
function getTraversalOrder(direction: [number, number, number]): Array<number> {
// Should we test positive side child nodes first?
const posXFirst: boolean = direction[0] < 0
const posYFirst: boolean = direction[1] < 0
const posZFirst: boolean = direction[2] < 0
View render-logic.js
class ParentComponent extends Component {
render() {
const {a, b, someBoolean, someList} = this.props;
const conditionalComponent = someBoolean ? <SomeComponent /> : null;
const listItems = someList.map(item => <ListItem item={item} />);
return (
<div>
<div>A: {a}, B: {b}</div>
{conditionalComponent}
View jsx-h.js
import h from 'virtual-dom/h'
export default function(tag, props, ...children) {
return h(tag, transformProps(props), children)
}
// Add any attribute -> property mapping in here that you may want
const attrMap = {
"class": "className"
}
View chain.js
var x = false,
y = true;
// Call functions in the evaluation
(x && y)? alert("x and y matched")
: x? alert("x matched")
: y? alert("y matched")
: alert("default")