declare function f1(): { a: number; b: string };
type T0 = ReturnType<() => string>;
type T1 = ReturnType<(s: string) => void>;
type T2 = ReturnType<() => T>;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function interceptNetworkRequests(ee) { | |
const open = XMLHttpRequest.prototype.open; | |
const send = XMLHttpRequest.prototype.send; | |
const isRegularXHR = open.toString().indexOf('native code') !== -1; | |
// don't hijack if already hijacked - this will mess up with frameworks like Angular with zones | |
// we work if we load first there which we can. | |
if (isRegularXHR) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exec = require('child_process').exec; | |
var fs = require('fs'); | |
var util = require('util'); | |
var http = require('http'); | |
var url = require('url'); | |
var PDFDocument = require('pdfkit'); // http://pdfkit.org/ | |
http.createServer(function (req, res) { |
The essential concepts in RxJS which solve async event management are:
- Observable: represents the idea of an invokable collection of future values or events.
- Observer: is a collection of callbacks that knows how to listen to values delivered by the Observable.
- Subscription: represents the execution of an Observable, is primarily useful for cancelling the execution.
- Operators: are pure functions that enable a functional programming style of dealing with collections with operations like map, filter, concat, reduce, etc.
I use GM to render thumbnails of png and jpg images.
Sadly the GM installation guide doesn't describe how to get things working on AWS EC2.
These cheatsheet works for JSON-Generator
[
{
data: [
'{{repeat(15, 45)}}',
{