Skip to content

Instantly share code, notes, and snippets.

View Multiple Modules Gulp
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;
View Typescript event bus
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
View BestJavaBooks.json
[{"title": "Effective Java"},
{"title": "Java Concurrency in Practice"},
{"title": "Java Performance the Definitive Guide"},
{"title": "Clean Code"}]
marpiec / json_parser.clj
Last active Dec 21, 2015
Simplified JSON parser written in Clojure. Created for blog article.
View json_parser.clj
(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)))