(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// If the ES6 Promise is available, it uses that, else: | |
Rx.config.Promise = RSVP.Promise; | |
// To promise with success | |
Rx.Observable | |
.just(42) | |
.toPromise(/* Optional Promise ctor like RSVP.Promise */) | |
.then( | |
result => console.log('Result', result), | |
reason => console.log('Reason', reason)); |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
(require '[clojure.core.async :as a]) | |
(def xform (comp (map inc) | |
(filter even?) | |
(dedupe) | |
(flatmap range) | |
(partition-all 3) | |
(partition-by #(< (apply + %) 7)) | |
(flatmap flatten) | |
(random-sample 1.0) |
(ns reagent-test.core | |
(:require [reagent.core :as reagent :refer [atom]] | |
[datascript :as d] | |
[cljs-uuid-utils :as uuid])) | |
(enable-console-print!) | |
(defn bind | |
([conn q] | |
(bind conn q (atom nil))) |
#!/bin/bash | |
set -eu | |
umask 0022 | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: $0 role_name [AWS ACCOUNT NUMBER]" >&2 | |
exit 1 | |
fi |
This just got linked to by the Y combinator news account, without proper context, | |
so a brief introduction: A month ago (end of May / early June 2014) I had a | |
Twitter conversation with a bunch of acquaintances. One tweet in the middle | |
of that thread, with obligatory hyperbole, was me saying that I think VR is | |
bad news. | |
Well, that part of the thread (but not the rest that provides context) recently | |
got retweeted, and then someone asked me if I could explain what I mean by that, | |
and because Twitter is a great platform for delivering 140 character slogans and | |
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer: |
// Utility function for detecting generators. | |
let isGenerator = x => { | |
return Function.isGenerator && | |
Function.isGenerator.call(x) | |
} | |
// Data type represents channel into which values | |
// can be `put`, or `received` from. Channel is | |
// very much like queue where reads and writes are | |
// synchronized via continuation passing. |
(ns om-data.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[datascript :as d])) | |
(enable-console-print!) | |
(def schema {}) | |
(def conn (d/create-conn schema)) | |