Skip to content

Instantly share code, notes, and snippets.

@jsonnull
jsonnull / xterm-256color-italic.terminfo
Created November 4, 2016 22:08 — forked from sos4nt/xterm-256color-italic.terminfo
A xterm-256color based TERMINFO that adds the escape sequences for italic
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
# tic xterm-256color-italic.terminfo
#
# Usage:
#
# export TERM=xterm-256color-italic
#
@jsonnull
jsonnull / render-logic.js
Created August 30, 2016 23:28 — forked from markerikson/render-logic.js
React render function organization
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}
@jsonnull
jsonnull / jsx-h.js
Created December 24, 2015 04:02 — forked from jollytoad/jsx-h.js
Wrapper for virtual-dom/h to support compiled JSX (ES6)
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"
}