Skip to content

Instantly share code, notes, and snippets.

@teckliew
teckliew / protips.js
Created October 19, 2015 04:36 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@teckliew
teckliew / ExportSVGLayers.jsx
Created August 14, 2019 05:46
Adobe Illustrator script that exports SVG for every layer in the document.
/**********************************************************
ExportSVGLayers.jsx
DESCRIPTION
For Adobe Illustrator.
This script takes your active document and export one
SVG per layer.
Best used for exporting many layers with the same artboard