Skip to content

Instantly share code, notes, and snippets.


Jason Trill jjt

Block or report user

Report or block jjt

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 gist:b6f3d029d481e73591e7d8972957c3f8
### Keybase proof
I hereby claim:
* I am jjt on github.
* I am jjt ( on keybase.
* I have a public key ASC7tyxfJkEt9vwUgdJMibC20QE09FG5u1xn-4-gnjqqaAo
To claim this, I am signing this object:
jjt / hs-vs-jsx.js
Created Mar 22, 2016
React Hyperscript vs JSX
View hs-vs-jsx.js
h('div.example', [
h('h1#heading', 'This is hyperscript'),
h('h2', 'creating React.js markup'),
h(AnotherComponent, {foo: 'bar'}, [
h('li', [
h('a', {href: ''}, 'One list item')
h('li', 'Another list item')

3. Component state

  • Slide, then...
  • Difference between props and state is change over time. If I were a React component, my name is a good property because that isn't likely to change. My level of thirst is good state, because that changes
  • Slide, then...
  • setState is passed an object with keys that you want to change. In this example, it would be incrementing this.state.counter by one. This component might have other pieces of state, but this call to setState doesn't affect them

The good feels

I enjoyed using Spectacle, and it'll be my go-to for building a deck.

Love the ability to drop in interactive React components. We didn't end up doing that for this deck, but I can see myself using that in the future.

Having everything Just Work™ is fantastic. The Surge CLI is easy to use, but I appreciate having npm run deploy. Maximizes my laziness efficiency.

View .eslintrc
"parser": "babel-eslint", //
"plugins": [
"react" //
"env": { //
"browser": true, // browser global variables
"node": true // Node.js global variables and Node.js-specific rules
"globals": {
jjt / .vimrc
Created Oct 29, 2014
Freshy-fresh .vimrc
View .vimrc
" 1. Save this file as ~/.vimrc
" 2. In terminal: $ git clone ~/.vim/bundle/Vundle.vim
" 3. Start vim/macvim and run :BundleInstall
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()
jjt / .slate
Created Oct 27, 2014
Slate config
View .slate
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias leftthird move screenOriginX;screenOriginY screenSizeX/3;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias rightthird move screenOriginX+screenSizeX/3+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
alias middlethird move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
jjt / index.html
Created Aug 22, 2014
gulp-useref pointing to a different domain?
View index.html
<!-- I'd like to take this input -->
<!-- build:js -->
<script src="some.lib.js"></script>
<script src="site.js"></script>
<!-- endbuild -->
<!-- And generate this output -->
<script src=""></script>
Port of MicroEvent in Coffeescript with some naming modifications
and a new 'once' method.
Original project:
class MicroEvent
_init:-> @_listn or @_listn = {}
_create:(e)-> @_init()[e] or @_init()[e] = []
Port of MicroEvent in Coffeescript with some naming modifications
and a new 'once' method.
Original project:
class MicroEventClass
_init:-> @_listn or @_listn = {}
_create:(e)-> @_init()[e] or @_init()[e] = []
You can’t perform that action at this time.