Skip to content

Instantly share code, notes, and snippets.

View dustinfarris's full-sized avatar
💭
🇺🇸

Dustin Farris dustinfarris

💭
🇺🇸
View GitHub Profile
import Ember from 'ember';
import hbs from 'htmlbars-inline-precompile';
import { cashay } from 'cashay';
const stateToComputed = (state) => {
const { userId } = state.routes.userDetailRoute.params;
const userQuery = `
{
user(id: ${userId}) {
id
import Ember from 'ember';
import connect from 'ember-redux/routes/connect';
const model = (dispatch, params) => {
return fetch(`/api/posts/${params.post_id}`).then(response => {
dispatch({ type: 'RECEIVE_POST', response });
});
};
const stateToComputed = (state, params) => {
import Ember from 'ember';
import hbs from 'htmlbars-inline-precompile';
import connect from 'ember-redux/components/connect';
import { cashay } from 'cashay';
const capitalsQuery = `
{
missouriCapital: capital(state: MISSOURI) {
name
size(unit: SQ_MI)
@dustinfarris
dustinfarris / vimrc
Last active December 19, 2016 01:02
flexi users: add this to your .vimrc
" Highlight special tags defined by flexi
autocmd BufEnter *.hbs,*.js syn keyword htmlTagName screen page fill centered grid box hbox vbox container
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});

Keybase proof

I hereby claim:

  • I am dustinfarris on github.
  • I am dustinfarris (https://keybase.io/dustinfarris) on keybase.
  • I have a public key whose fingerprint is 420A A8DF 2A3C C6ED 0B37 CD3C A0ED F4AC 179A A10A

To claim this, I am signing this object:

@dustinfarris
dustinfarris / brunch-config.js
Created March 15, 2017 13:53
brunch config for using Elm with Phoenix 1.3-rc.0
exports.config = {
files: {
javascripts: {
joinTo: "js/app.js"
},
stylesheets: {
joinTo: "css/app.css"
},
templates: {
module Person exposing (..)
import Json.Decode exposing (Decoder, int, string)
import Json.Decode.Pipeline exposing (decode, required)
type alias Person =
{ id : Int
, firstName : String
, lastName : String
import Fuzz exposing (Fuzzer)
import Json.Encode as Json
jsonInt : Fuzzer ( Int, Json.Value )
jsonInt =
Fuzz.map
(\i -> ( i, Json.int i ))
Fuzz.int