Skip to content

Instantly share code, notes, and snippets.

@jsteenkamp
jsteenkamp / app.js
Last active August 29, 2015 14:20
Angular 1.x Component Architecture Application using JSPM for ES6 and importing CSS and HTML
'use strict';
// vendor modules
import angular from 'angular';
import 'angular-touch';
import 'angular-animate';
import 'angular-aria';
import 'angular-ui-router';
// app modules
@fson
fson / rapid-prototyping-with-relay.md
Created October 18, 2015 20:08
Rapid prototyping with Relay (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

Rapid prototyping with Relay

Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.

@pezza3434
pezza3434 / gist:ac5db3fd5a3b6bc985e4
Last active March 21, 2016 14:16
Submission to speak at reactive2015

##Moving from Angular to React

For over a year I had been helping to create a production app with Angular. I was initially hugely impressed by the advantages Angular offered and invested a lot of time learning the intricacies of the framework.

Having being initially cautious about React as one of the many upcoming frameworks that wouldn't stick around I was hesitant to make the switch. However, after making the jump I've been using React for a few months now and been thouroughly impressed.

This will be a short talking explaining:

  • The shift in thinking when moving from Angular to React
  • The difficulties when moving from Angular to React
  • What we can learn from Angular and how having a previous knowledge of other frameworks can help significantly when creating React apps.
@milankinen
milankinen / monkey.js
Created April 8, 2016 07:27
Rx .log monkey
Rx.Observable.prototype.log = function(prefix) {
return process.env.NODE_ENV !== "development" ? this : this
.doOnCompleted(() => console.log(prefix, "<completed>")) // eslint-disable-line
.do(x => console.log(prefix, x)) // eslint-disable-line
}
// const obs = Rx.Observable.fromEvent(text, "input")
// .log("InputEvent:")
// .map(e => e.target.value)
// .filter(t => !!t)
@queertypes
queertypes / EntityJson.hs
Last active August 26, 2016 13:07
Parsing with Aeson.
-- Inspired by this [scala](https://gist.github.com/ccarter/e91110f76c9c9d1e256d) example:
{-# LANGUAGE OverloadedStrings #-}
{-
A demonstration of Aeson for JSON parsing. We want to take something that looks like:
{
"id": 5,
"bar": "bar",
"baz": "baz"
@tfausak
tfausak / styles.less
Last active August 27, 2016 13:19
Make Haskell module specifiers less important in Atom. https://twitter.com/taylorfausak/status/769312949353652228
// the reasonable option
::shadow .haskell .entity .module,
::shadow .haskell .identifier .module {
opacity: 0.5;
}
// the nuclear option
::shadow .line:not(.cursor-line) .haskell .entity .module,
module Particle exposing (..)
import Array
import Task
import Html.App as App
import Window exposing (Size, resizes)
import Color exposing (Color, black, white, rgba)
import Element exposing (Element, toHtml)
import Collage exposing (Form, collage, move, rect, filled, circle)
import AnimationFrame exposing (times)
@ggb
ggb / Types.elm
Last active October 5, 2016 10:00
import Html exposing (text)
type alias T = {name: String}
type alias R b = {b | name: String, age: Float}
type alias S a = {a | name: String}
type alias Q = {age: Float}
@aphillipo
aphillipo / MainApp.js
Created October 5, 2015 19:26
Wrapping React Native Navigator
class MainApp extends Component {
constructor(props) {
super(props);
}
renderScene(route, navigator) {
var Component = route.component;
return (
<Component route={route} navigator={navigator} />
);
module Cycle where
import Almost (Stream, Promise, observe, Subject, holdSubject, next, complete, thenp)
import Data.StrMap (fromFoldable, StrMap, keys)
import Data.StrMap.Unsafe (unsafeIndex)
import Data.Tuple (Tuple(..))
import Prelude (map)
type Drivers a b = StrMap (Subject a -> b)
type Sinks a = StrMap (Stream a)