Skip to content

Instantly share code, notes, and snippets.

@mstram
mstram / app.js
Created April 15, 2023 05:26 — forked from prof3ssorSt3v3/app.js
Code from video on Intro to Web Text to Speech
let VOICE = null;
let synth = window.speechSynthesis;
let voices = synth.getVoices();
(function addListeners() {
document.getElementById('voiceSelect').addEventListener('change', changeVoice);
document.getElementById('btnRead').addEventListener('click', readParas);
document.getElementById('btnPause').addEventListener('click', () => {
synth.pause();
});
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="d1">stuff</div>
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)
@mstram
mstram / test1
Created October 4, 2013 08:02
test1
This is my first gist
@mstram
mstram / dabblet.css
Created October 4, 2013 08:00
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;