Skip to content

Instantly share code, notes, and snippets.

View caseysoftware's full-sized avatar

Danger Casey caseysoftware

View GitHub Profile
@caseysoftware
caseysoftware / acronyms-said.php
Last active December 19, 2015 13:39
A list of acronyms you say by pronouncing, each run through the Twilio TTS engines.
<?php
include 'Services/Twilio.php';
/**
* POTUS is the oddity
*/
$items = array('NASA', 'NATO', 'AIDS', 'SCUBA', 'laser', 'POTUS');
$response = new Services_Twilio_Twiml();
@caseysoftware
caseysoftware / countries.php
Created July 10, 2013 06:14
A list of countries, each run through the Twilio TTS engines.
<?php
include 'Services/Twilio.php';
/**
* Uruguay is the oddity
*/
$items = array('United States', 'Brazil', 'Ireland', 'Singapore',
'Japan', 'Australia', 'United Arab Emirates', 'Peru',
'Uruguay', 'French Polynesia', 'Egypt', 'Greece', 'Qatar');
$items = array('United States', 'Brazil', 'Ireland', 'Singapore',
'Japan', 'Australia', 'United Arab Emirates', 'Peru',
'Uruguay', 'French Polynesia', 'Egypt', 'Greece', 'Qatar');
@caseysoftware
caseysoftware / heteronyms.php
Last active December 19, 2015 13:39
A list of heteronym phrases, each run through the Twilio TTS engines.
<?php
include 'Services/Twilio.php';
/**
*
*/
$items = array('A bass was painted on the head of the bass drum.',
'The buck does funny things when does are present.',
'They were too close to the door to close it.',
$items = array('A bass was painted on the head of the bass drum.',
'The buck does funny things when does are present.',
'They were too close to the door to close it.',
'Don\'t desert me here in the desert!',
'When shot at, the dove dove into the bushes.',
'The insurance was invalid for the invalid.',
'How can I intimate this to my most intimate friend?',
'With every number I read, my mind gets number and number.',
'He could lead if he would get the lead out.',
'I did not object to the object.');
$items = array(
'A "bas" was painted on the head of the bass drum.',
'The buck does funny things when doze are present.',
'They were too close to the door to close it.',
'Don\'t desert me here in the desert!',
'When shot at, the dove dohv into the bushes.',
'The insurance was invalid for the invalid.',
'How can I intimate this to my most intimate friend?',
'With every number I read, my mind gets nummer and nummer.',
'He could lead if he would get the led out.',
@caseysoftware
caseysoftware / harvard.php
Created August 5, 2013 01:00
The Harvard Sentences serve as a standardized test for speech quality measurements within telecommunication systems. Each combination of ten sentences represents all of the phonetics within the English language and uses them at a similar frequency.
$items = array(
'Oak is strong and also gives shade.',
'Cats and dogs each hate the other.',
'The pipe began to rust while new.',
"Open the crate but don't break the glass.",
'Add the sum to the product of these three.',
'Thieves who rob friends deserve jail.',
'The ripe taste of cheese improves with age.',
'Act on these orders with great speed.',
'The hog crawled under the high fence.',
@caseysoftware
caseysoftware / payload.php
Last active December 24, 2015 12:29
collect the inbound context.io payload
<?php
$json = file_get_contents('php://input');
$data = json_decode($json);
@caseysoftware
caseysoftware / rev1.php
Created October 2, 2013 18:15
Wiring the first version to generate a text message whenever you receive an email
<?php
include 'credentials.php';
require 'vendor/Services/Twilio.php';
$json = file_get_contents('php://input');
$data = json_decode($json);
//use the from/subject from the webhook call to create text message
$sms_body = $data->message_data->addresses->from->name;
@caseysoftware
caseysoftware / rev2.php
Last active December 24, 2015 12:29
This file accepts the incoming webhook request and uses it to retrieve the full content of the message and sends it along via text message.
<?php
include 'credentials.php';
require 'vendor/Services/Twilio.php';
require 'vendor/PHP-ContextIO/class.contextio.php';
$json = file_get_contents('php://input');
$data = json_decode($json);
$message_id = $data->message_data->message_id;