Skip to content

Instantly share code, notes, and snippets.

var gulp = require('gulp');
var ts = require('gulp-typescript');
var typescript = require('typescript');
var merge = require('merge2');
var concat = require('gulp-concat');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
var clean = require('gulp-clean');
var sourcemaps = require('gulp-sourcemaps');
var karmaServer = require('karma').Server;
interface EventBusInterface {
on(call: (...params: any[]) => void, callback: (...params: any[]) => void): number;
unsubscribe(subscription: number): void;
}
class EventBus implements EventBusInterface {
private callbacks: any[][] = [];
private callbackQueue: any[][] = []; // callback, arguments
[{"title": "Effective Java"},
{"title": "Java Concurrency in Practice"},
{"title": "Java Performance the Definitive Guide"},
{"title": "Clean Code"}]
@marpiec
marpiec / json_parser.clj
Last active December 21, 2015 17:39
Simplified JSON parser written in Clojure. Created for blog article. http://mpieciukiewicz.blogspot.com/2013/08/writing-simplified-json-parser-in.html
(ns pl.marpiec.json-parser)
(defn is-string-opening? [json] (= \" (first json)))
(defn is-string-ending? [json] (= \" (first json)))
(defn is-object-opening? [json] (= \{ (first json)))
(defn is-object-ending? [json] (= \} (first json)))