Skip to content

Instantly share code, notes, and snippets.

View Cmaury's full-sized avatar

Chris Maury Cmaury

View GitHub Profile
@Cmaury
Cmaury / gist:3abb0470491ef1af63d0
Last active August 29, 2015 14:00
AudioBlur: Text To Speech headline reader for NewsBlue
textToBeSpoken = new SpeechSynthesisUtterance();
textToBeSpoken.volume = 1; // 0 to 1
textToBeSpoken.rate = 10; // 0.1 to 10
textToBeSpoken.pitch = 2; //0 to 2
textToBeSpoken.lang = 'en-US';
function checkForChanges() {
currentlySelectedItem = document.getElementsByClassName('NB-feed-story NB-river-story read NB-selected');
if (currentlySelectedItem.length == 0) {
setTimeout(checkForChanges, 500);
@Cmaury
Cmaury / gist:10023782
Last active August 29, 2015 13:58
keybase.md
### Keybase proof
I hereby claim:
* I am cmaury on github.
* I am cmaury (https://keybase.io/cmaury) on keybase.
* I have a public key whose fingerprint is E45F 8434 03D8 28CA 3136 C840 9322 A66A F43D 8E1C
To claim this, I am signing this object:
@Cmaury
Cmaury / Error Output
Last active December 12, 2015 01:48
It looks like the node-module speak.js breaks when you submit any options along with the string to be read. See below for an illustration using the included example. Any ideas as to what's going on?
ReferenceError: document is not defined
at callback (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/node-speak/node-speak.js:100454:9)
at speak (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/node-speak/node-speak.js:100504:5)
at /Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/app.js:49:2
at callbacks (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/express/lib/router/index.js:161:37)
at param (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/express/lib/router/index.js:135:11)
at pass (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/express/lib/router/index.js:170:5)
at Object.router (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouWish/node_modules/express/lib/router/index.js:33:10)
at next (/Users/cmaury/Dropbox/dev/Accessibilityfirst/AsYouW
@Cmaury
Cmaury / LivingSocial Part II
Created January 5, 2012 23:56
An Explanation of a Signalling Game in Game Theory
A signaling game in game theory is one where one player has to make a decision based on an
incomplete understanding of the other player. The idea behind this game is most often
applied to an employer hiring an employee, and the signal most often used is a college degree.
Let's start at the beginning. Game theory is a way to determine the outcome of an event
involving more than one rational actor based on each actor’s preferences. These preferences
are often represented as a number. For example, I prefer chicken to fish, so chicken is
represented by 2 and fish gets a 1. The number doesn't matter, only that chicken is higher
than fish.