Skip to content

Instantly share code, notes, and snippets.

Jason Nall jsonnull

Block or report user

Report or block jsonnull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View init.vim
" pathogen plugin management
" execute pathogen#infect('~/.config/nvim/bundle/{}')
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin()
@jsonnull
jsonnull / nightowl.itermcolors
Created May 28, 2018
Want to preview? Go to https://terminal.sexy, then use Import -> iTerm2 and copy/paste this gist contents into the text area
View nightowl.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Blue Component</key>
<real>0.15294117647058825</real>
@jsonnull
jsonnull / .vimrc
Created Nov 18, 2016
My vim configuration
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()
@jsonnull
jsonnull / xterm-256color-italic.terminfo
Created Nov 4, 2016 — forked from sos4nt/xterm-256color-italic.terminfo
A xterm-256color based TERMINFO that adds the escape sequences for italic
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
#
@jsonnull
jsonnull / traversalOrder.js
Created Sep 22, 2016
Determining octree traversal order for raycasting
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
@jsonnull
jsonnull / render-logic.js
Created Aug 30, 2016 — forked from markerikson/render-logic.js
React render function organization
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}
@jsonnull
jsonnull / jsx-h.js
Created Dec 24, 2015 — forked from jollytoad/jsx-h.js
Wrapper for virtual-dom/h to support compiled JSX (ES6)
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"
}
@jsonnull
jsonnull / chain.js
Last active Dec 26, 2015
Just a simple hack I came up with to facilitate really short pattern-matching. It is effectively a chain of if-elseif statements. The first time a condition is true, the associated expression or code block is evaluated, and nothing further.
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")
You can’t perform that action at this time.