Skip to content

Instantly share code, notes, and snippets.


Tristan Slominski tristanls

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tristanls on github.
  • I am tristanls ( on keybase.
  • I have a public key ASBa6_-Unbrn-U6KcZ0BDRic8CiEH6rfCm6LyTDKDa9xOAo

To claim this, I am signing this object:

tristanls /
Created March 8, 2018 23:22
non-interactive Java download
$ curl -LO -b "oraclelicense=a"
tristanls /
Created August 29, 2017 15:48
Contexts where Serveless was useful or not.

Contexts where Serverless turned out useful:

  • When setting up a service control plane (for example commands such as CreateTenant, or DeleteTenant) Serverless is useful as the commands aren't executed often, and the latency is not really a constraint.
  • Processing events from an event stream up to a certain throughput when cost starts to dominate and running dedicated servers (which possibly is "roll your own serverless") becomes a more economical choice.

Contexts where Serverless didn't work well:

  • When setting up a service data plane (for example, proxying a request with minimal latency), Serverless doesn't work well
tristanls / Capability URI
Last active June 27, 2017 00:32
Capability URI Scheme
View Capability URI

Capability URI Scheme

The "cpblty" scheme is used to identify capabilities.

There are two types of "cpblty" URIs. They are distinguished by the mechanism used to identify the authority responsible for resolving the capability.

The first type of capability URI uses IP address or DNS resolution to identify authority.

tristanls / secure-local-storage-demo.js
Created June 19, 2016 19:18
Demo of securing local storage with encryption.
View secure-local-storage-demo.js
"use strict";
const crypto = require("crypto");
const http = require("http");
const url = require("url");
const indexHtml =
`<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
tristanls / gist:b47430985858978669b7
Created May 13, 2015 01:12
example json response
View gist:b47430985858978669b7
"message": "hello there",
"status": "200 OK"
View gist:fbb69eb45feb5c84649e
  1. General Background and Overview
tristanls / iso8601durationregex.js
Last active September 6, 2021 14:53
ISO-8601 Duration Regex
View iso8601durationregex.js
var iso8601durationregex = /^P([0-9]+(?:[,\.][0-9]+)?Y)?([0-9]+(?:[,\.][0-9]+)?M)?([0-9]+(?:[,\.][0-9]+)?D)?(?:T([0-9]+(?:[,\.][0-9]+)?H)?([0-9]+(?:[,\.][0-9]+)?M)?([0-9]+(?:[,\.][0-9]+)?S)?)?$/
View gist:d90751faa1142d38df46
dostuffEmitter.on('task1', function (callback) {
dostuffEmitter.emit('task3', x, callback);
dostuffEmitter.on('task2', function (x, callback) {
dostuffEmitter.emit('finish', y, callback);
dostuffEmitter.on('task3', function (y, callback) {
dostuffEmitter.emit('task2', z, callback);
View gist:f86d7c0989230db927a9
dostuffEmitter.on('task2', function (x, callback) {
if (error) {
dostuffEmitter.emit('error', error);
dostuffEmitter.emit('telemetry', someMetricHere);
dostuffEmitter.emit('task3', y, callback);