Skip to content

Instantly share code, notes, and snippets.

View jergason's full-sized avatar
🦢
theft puts a parade in my walk

Jamison Dance jergason

🦢
theft puts a parade in my walk
View GitHub Profile
@jergason
jergason / email.txt
Created April 23, 2017 22:37
React Rally CFP: Delaying Talk Acceptance/Rejection until April 30th
TLDR: We need more time to review your proposals. You'll get a yes or no by Sunday, April 30th.
Dear wonderful CFP submitters:
Thank you so much for your proposals. There are SO MANY, WOW. Unfortunately, we have not been able to give them all the attention they deserve. We said we'd notify submitters by April 23rd, but to make sure we have time to carefully review them all we are changing that date to Sunday, April 30th. Estimates are hard.
We are sorry we are pushing back the notification date. We would rather change a deadline than make rushed decisions, but ideally we would have been done already. We are reviewing and changing our CFP review process to make sure this won't happen again. Sorry for the delay, thank you for your proposals, and we will be in touch.
- Jamison and Matt
update : Action -> Model -> (Model, Effects Action)
update action model =
case action of
Actions.PlaySound soundName ->
( model, sendToJs soundName )
Actions.NoOp ->
( model, Effects.none )
Actions.SetAngel showing ->
let
updatedModel = {model | showingAngels = showing }
// @flow
require('./es6')()
@jergason
jergason / query.js
Last active September 28, 2015 16:50
r.db("rethinkdb").table("jobs").filter(function(job) {
return job('info')('query').match('r\.db\("rethinkdb"\)\n \.table\("jobs"\)').not()
})
@jergason
jergason / yup.elm
Created July 10, 2015 06:11
i am the best at elm
import Html exposing (h1, div, text)
import Mouse
renderMouse : (Int, Int) -> Html.Html
renderMouse pos =
div [] [
h1 [] [text ("x" ++ (toString (fst pos)))],
h1 [] [text ("y" ++ (toString (snd pos)))]
]
var React = require('react/addons')
var Router = require('react-router')
var TestUtils = React.addons.TestUtils
var state = require('../../state')
var routes = require('../../routes')
var getIntlData = require('../../../../client/app/i18n/data')
var GroupsUsers = require('../../authed')
var root = state.cursor()
@jergason
jergason / react-test.js
Created April 23, 2015 16:13
testing react stuff without pulling out my hair
var React = require('react/addons')
var TestUtils = React.addons.TestUtils
var Typeahead = require('../typeahead')
describe('Typeahead', function() {
it('displays a list of items when onChange returns them', function() {
function onChange(text) {
return ['foo','bar','baz']
@jergason
jergason / butts.jsx
Created April 15, 2015 17:52
flow es6
// @flow
import React, {Component} from 'react'
class Durp extends Component {
render(): ReactElement {
return <h1>wassup</h1>
}
}
// this totally won't work b/c I didn't test it, but something like this
function getAllShips(url) {
var ships = [];
function getMoreShips(url) {
return $http.get(url).then(function(response) {
ships = ships.concat(response.ships)
if (response.has_more_url) {
return getMoreShips(response.has_more_url)
}
var Thing = React.createClass({
doStuff(data) {
return (e) => {
this.setState({data: data})
}
},
render() {
return <button onClick={this.doStuff('some data')}
}
})