Skip to content

Instantly share code, notes, and snippets.

@cathylill
cathylill / Index.hs
Last active November 8, 2017 00:22
Get text input on click
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
import Reflex.Dom
import qualified Data.Text as T
main :: IO ()
main = mainWidget $ do
el "h1" $ text "Reflex FRP Autocomplete Example - Canva Frontend Meetup"
el "h2" $ text "Part 2 - Adding updating a Dynamic on button click"
@cathylill
cathylill / Index.hs
Last active November 8, 2017 06:51
Add items to a list
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
import Control.Lens
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Map (Map)
import qualified Data.Map as Map
@cathylill
cathylill / app-arch-mercury.md
Last active August 29, 2015 14:21
Architecting an application with MercuryJS

Architecting an application with Mercury.js

Mercury.js is not opinionated about your application architecture - it's components can be used independendently, with the mercury library adding a small amount of bootsrapping and event wiring sugar. The notes given here are just one example of how you could architect an application built with Mercury.js, and will hopefully address some of the questions you may have about implementations that are more complex than the documented examples.

This article will cover some of the key components you need to create a fully featured app and gives an example of how to structure those components in such a way as to keep your app clearly understandable and maintainable for humans.

Modularised Data store

Create a core app state object that contains top level paramaters. Child data stores are generated by individual 'store' scripts that create the store and wire up appropriate channels and methods for updating data in that store.

Each child store is initialised using mer

@cathylill
cathylill / codetest
Last active August 29, 2015 14:20
Coviu code test
We are looking for awesome javascript and front end developers to work on the Coviu project at NICTA.
We are building an app that will allow people to chat face to face, share documents, videos and ideas
directly peer to peer using WebRTC technology. We use mercury.js, sass, gulp, npm and browserify on the
front end, node.js and kraken on the backend and maintain our own library of WebRTC specific tools called
rtc.io. We are hiring in Sydney, Australia - if this sounds like your dream job check out the following
code test, post your solutions on github, code pen or anywhere else we can see it and please get in touch
via cathy.lill@nicta.com.au to let us know you are interested. Thanks!
Code Test
=========
@cathylill
cathylill / index.js
Created July 22, 2014 06:43
requirebin sketch
var quickconnect = require('rtc-quickconnect');
var console = require('demo-console');
quickconnect('http://rtc.io/switchboard/', { room: 'qc-simple-demo' })
.on('call:started', function(id, pc, data) {
console.log('we have a new connection to: ' + id);
});