Skip to content

Instantly share code, notes, and snippets.

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@ippa
ippa / hackforswedenhelp
Created March 14, 2015 17:38
access platsbanken api from nodejs/iojs
/*
* on cmdline 'npm install superagent'
*/
var superagent = require("superagent");
var url = "http://api.arbetsformedlingen.se/platsannons/soklista/kommuner?lanid=10"
superagent.get(url)
.set("Accept", "application/json")
.set("Accept-Language", "sv-SE,sv")
@ippa
ippa / create_appicons.sh
Last active April 22, 2016 10:22
shell-script to create android icons w/ the right sizes
#!/bin/sh
if [ $# -eq 0 ]; then
echo "./appicon.sh <sourceimage> - Will resize and install appicon into correct directories"
exit 1
fi
CONVERT="/c/Program/ImageMagick/convert.exe"
PATH=."/android/app/src/main/res/"
#!/bin/bash
#
# Bash-script for easy switching between dev and prod settings in your xcode project
# Run in root of your project. Details: https://facebook.github.io/react-native/docs/running-on-device-ios.html
#
# ./xcode dev
# - Detects local IP and tells xcode to access packager live-bundling through that
# - Sets xcode build configuration to Debug
#
# ./xcode prod
<a href="liveapp://account">Konto</a>
@ippa
ippa / todolist-mobx.js
Last active July 4, 2017 15:45
react-native meetup code samples
// -----------------------
// Store.js
import {observable, action, computed} from "mobx";
class Store {
@observable
todos = [
{title: "Skapa gdocs presentation", status: "active"},
{title: "Koda meetup-exempel", status: "active"},
{title: "Koda meetup-exempel #2", status: "active"},
export PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$(__git_ps1)$ '