Skip to content

Instantly share code, notes, and snippets.

@lselden
lselden / out-ssml.ps1
Created February 6, 2020 21:53
TTS using powershell
<#
.SYNOPSIS
Speak text using SSML
.DESCRIPTION
Speak text using SSML, using built in MS speech synthesis. Will output metadata about result, including any embedded <mark>s. This uses the .NET System.Speech library, which uses the older SAPI5 synthesis system.
Based on code from https://github.com/marak/say.js/
@igrigorik
igrigorik / domtokenlist_feature_detection.js
Last active June 21, 2023 16:57 — forked from yoavweiss/domtokenlist_feature_detection.js
DOMTokenList supports() example for Preload
var DOMTokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
return;
}
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
@lukin0110
lukin0110 / GulpReactBrowserifyBabelify.md
Last active October 26, 2020 00:36
Gulp + browserify + babelify + react

Use React with Gulp, Browserify and Babelify. This allows you to use React in jsx & node.js style. It let's you use require('module') in your JavaScript. Babelify will transform the jsx code to JavaScript code.

Development

gulp build-react

This will generate a main.min.js file in the build directory with sourcemaps.

Production