Skip to content

Instantly share code, notes, and snippets.

View StoneCypher's full-sized avatar

John Haugeland StoneCypher

View GitHub Profile
<!doctype html>
<html>
<head>
<script type="text/javascript">
var tgts = ["http://example1.com", "http://example2.com", "http://foxnews.com"];
window.location.replace(tgts[Math.floor(Math.random()*tgts.length)]);
@StoneCypher
StoneCypher / How to hear all of Chrome's voices.md
Last active February 18, 2016 04:31
How to hear all of Chrome's voices

How to hear all of Chrome's voices

In case you'd like to know what they all sound like (there's a bunch of funny ones)

var pack_msg = (v, i) => { return { voice: v, text: `hi there from the voice named ${v.name}` }; },
    msgs     = speechSynthesis.getVoices().map(pack_msg),
    speaker  = new SpeechSynthesisUtterance(),
    halt     = false;
// this is the react app. it knows nothing of the vanilla app, other than that the information
// will come in in props, and that it should call this hook when this button is pressed, or etc
var Spinner = (props) =>
<div>
{this.props.data}
<button value="↑" onclick={this.props.hooks.inc}/>
<button value="↓" onclick={this.props.hooks.dec}/>
</div>;
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}
function byId(id) {
return document.getElementById(id);
}
function byTag(tag) {
return document.getElementsByTagName(tag);
}