Skip to content

Instantly share code, notes, and snippets.

export PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$(__git_ps1)$ '
@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"},
<a href="liveapp://account">Konto</a>
#!/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
@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/"
@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")

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 / gist:0b7ea8692f1ae94e5722
Created June 23, 2014 07:41
rvm as normal user (non-root) Dockerfile
FROM ubuntu:trusty
MAINTAINER ippa
ENV DEBIAN_FRONTEND noninteractive
RUN unset HISTFILE
# required by RVM
RUN apt-get -y update
RUN apt-get -y install patch gawk g++ gcc make libc6-dev patch libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
RUN apt-get -y install curl
@ippa
ippa / rails.screenrc
Last active August 29, 2015 14:02
start some rails-specific screen tabs
# load base-settings
source .screenrc
# create rails-specific tabs
screen -t guard /bin/bash -i -c "guard && bash"
screen -t logs /bin/bash -i -c "tail -f log/* && bash"
screen -t models /bin/bash -i -c "cd app/models && bash"
screen -t views /bin/bash -i -c "cd app/views && bash"
screen -t controllers /bin/bash -i -c "cd app/controllers && bash"
screen -t css /bin/bash -i -c "cd app/assets/stylesheets && bash"
@ippa
ippa / .vimrc
Last active February 29, 2016 02:07
.vimrc
autocmd FileType html setlocal indentkeys-=*<Return>
let g:html_indent_inctags = "html,body,head,tbody"
set bs=2
set smartindent autoindent smarttab
set shiftwidth=2
set background=dark
set ru
set tabstop=2
set expandtab