Skip to content

Instantly share code, notes, and snippets.

View jjt's full-sized avatar
⚔️
J̷̷͓̱͙͕̗A̖̟̰̭͎̹̱̮ͅV̷͔̩̜̭̝̫̯͝ͅA̛̘͟S̯̭̱̹͎̩̭̯C̮̪͙͈͘R̴̯̬̣̟̯̻͞I̡̖̣̬̤̰̬̦͟Ṕ̨̹̫̩̞͍Ţ̝̦

Jason Trill jjt

⚔️
J̷̷͓̱͙͕̗A̖̟̰̭͎̹̱̮ͅV̷͔̩̜̭̝̫̯͝ͅA̛̘͟S̯̭̱̹͎̩̭̯C̮̪͙͈͘R̴̯̬̣̟̯̻͞I̡̖̣̬̤̰̬̦͟Ṕ̨̹̫̩̞͍Ţ̝̦
View GitHub Profile
### Keybase proof
I hereby claim:
* I am jjt on github.
* I am jjt (https://keybase.io/jjt) on keybase.
* I have a public key ASC7tyxfJkEt9vwUgdJMibC20QE09FG5u1xn-4-gnjqqaAo
To claim this, I am signing this object:
@jjt
jjt / hs-vs-jsx.js
Created March 22, 2016 16:56
React Hyperscript vs JSX
h('div.example', [
h('h1#heading', 'This is hyperscript'),
h('h2', 'creating React.js markup'),
h(AnotherComponent, {foo: 'bar'}, [
h('li', [
h('a', {href: 'http://whatever.com'}, 'One list item')
]),
h('li', 'Another list item')
])

3. Component state

01-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
03-set-state
  • 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
@jjt
jjt / spectacle-feedback.md
Created October 4, 2015 18:06
Spectacle feedback

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.

{
"parser": "babel-eslint", // https://github.com/babel/babel-eslint
"plugins": [
"react" // https://github.com/yannickcr/eslint-plugin-react
],
"env": { // http://eslint.org/docs/user-guide/configuring.html#specifying-environments
"browser": true, // browser global variables
"node": true // Node.js global variables and Node.js-specific rules
},
"globals": {
@jjt
jjt / .vimrc
Created October 29, 2014 22:30
Freshy-fresh .vimrc
" 1. Save this file as ~/.vimrc
" 2. In terminal: $ git clone https://github.com/gmarik/Vundle.vim.git ~/.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
jjt / .slate
Created October 27, 2014 22:30
Slate config
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
jjt / index.html
Created August 22, 2014 05:21
gulp-useref pointing to a different domain?
<!-- I'd like to take this input -->
<!-- build:js http://static.mysite.com/bundle.js -->
<script src="some.lib.js"></script>
<script src="site.js"></script>
<!-- endbuild -->
<!-- And generate this output -->
<script src="http://static.mysite.com/bundle.js"></script>
###
Port of MicroEvent in Coffeescript with some naming modifications
and a new 'once' method.
Original project:
https://github.com/jeromeetienne/microevent.js
###
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:
https://github.com/jeromeetienne/microevent.js
###
class MicroEventClass
_init:-> @_listn or @_listn = {}
_create:(e)-> @_init()[e] or @_init()[e] = []