Skip to content

Instantly share code, notes, and snippets.

View mvilrokx's full-sized avatar

Mark Vilrokx mvilrokx

View GitHub Profile
@mvilrokx
mvilrokx / test.rb
Created July 26, 2011 22:05
test tumblr integration
puts "hello world"
if ($("#call").is(':checked')) {
$.ajax({
type: "POST",
username: twilio.username,
password: twilio.pwd,
url: twilio.server_url + twilio.username + '/Calls.json',
data: { Url: <xml-containing-twilio-message>, From: twilio.phone, To: user.phone }
})
.done(function( msg ) {
console.log("Phone call made.");
@mvilrokx
mvilrokx / twillioSMS.js
Created January 21, 2015 22:07
Calling the Twilio SMS API
var twilio = {
username: <your-twilio-username>,
pwd: <your-twilio-pwd>,
phone: <your-twilio-phone-number>,
server_url: 'https://api.twilio.com/2010-04-01/Accounts/'
};
var user = {
phone: <user-phone-number>
};
@mvilrokx
mvilrokx / speechSynthesis.js
Created January 21, 2015 21:58
Calling the HTML5 Speech Synthesis API
if ($("#speech").is(':checked')) {
window.speechSynthesis.cancel(); // Cancel if already talking
var msg = new SpeechSynthesisUtterance(event.target.innerText); // Grab the text from the element that was clicked ...
window.speechSynthesis.speak(msg); // ... and speak it.
}