Skip to content

Instantly share code, notes, and snippets.

View davidDuymelinck's full-sized avatar

davidDuymelinck

View GitHub Profile
@davidDuymelinck
davidDuymelinck / package.json
Last active August 29, 2015 14:11
ES6 head first
{
"name": "livevalidation-es6",
"version": "0.0.0",
"description": "es6 version of livevalidation",
"main": "index.js",
"scripts": {
"test": "node_modules/.bin/6to5 src -d test/out && node_modules/.bin/6to5 test-es6 -d test && mocha"
},
"author": "",
"license": "ISC",

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.

@davidDuymelinck
davidDuymelinck / 404.html
Last active August 29, 2015 14:09
Step by step creation of a node site
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Error 404</title>
</head>
<body>
<h1>Page not found</h1>
<p><a href="/">Home</a></p>
</body>
Newsletter.prototype.send = function send(){
var self = this,
mailCount = 0,
mailMax = this.people.length;
// people, from, subject, text and html are set before sending the mails
_.forEach(this.people, function(to){
var mail = {
from: this.from,
to: to,
<?php
class MixedGallery extends WireData implements Module {
/**
* getModuleInfo is a module required by all modules to tell ProcessWire about them
*
* @return array
*
*/
@small: ~"(max-width: 300px)";
@medium: ~"(max-width: 500px)";
// from responsive.less
@font-size-base: 16px;
.font-size(@size) {
@remValue: (unit(@size) / unit(@font-size-base));
@pxValue: unit(@size);
font-size: ~"@{pxValue}px";
font-size: ~"@{remValue}rem";