Skip to content

Instantly share code, notes, and snippets.

View fmaylinch's full-sized avatar

Ferran Maylinch fmaylinch

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<style>
#map {
height: 400px;
width: 100%;
}
#searchTextField {
title: "Intro to Jess and JavaScript"
author: "Ferran Maylinch"
lessonVersion: "1.0"
minAppVersion: "1.4"
exercises:
- title: "Intro to Jess"
import java.util.*;
public class Example {
public static void main(String[] args) {
System.out.println("I'm an example");
}
}
title: Sample Lesson
author: Ferran Maylinch
# Minimum app version needed for this lesson
minAppVersion: "1.0"
exercises:
- title: Sample Exercise
import static com.mongodb.QueryOperators.*;
@Override
public List<Coupon> findBuyersByMktc(String mktc, Date start, Date end)
{
final DBCursor cursor = coupons.find(obj()
.append(FIELD_MKTC, mktc)
.append(FIELD_PURCHASED_ON, obj(GTE, start).append(LT, end)));
@fmaylinch
fmaylinch / Code cheat sheet.md
Last active October 28, 2022 22:54
Common lines of code in different languages for quick reference and comparison

From callbacks to promises to observable streams

In this article I’ll explain about the relationship between callbacks, promises and observable streams (AKA reactive programming).

Some of the examples in this document are written in this jsbin for you to try.

This document was written using the wonderful Markdown editor classeur.io.

Callbacks - sync and async