This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# A github post-receive hook handler, runs some shell command on each HTTP POST to PORT. | |
# github-listener.py PORT 'SOME SHELL COMMAND' | |
import sys | |
from subprocess import * | |
from flask import Flask | |
def system(cmd): | |
print ''.join(Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, close_fds=True).communicate()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts 'What is your name?' | |
name = gets.chomp | |
puts 'What is your age?' | |
age = gets.chomp | |
puts "Well, #{name}, next year you will be #{age.to_i+1}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
say("<?xml version="1.0" encoding="UTF-8"?><speak>One potato, two potato, three potato, four.<prosody rate="-10%">One potato, two potato, three potato, four.</prosody><prosody rate="-30%">One potato, two potato, three potato, four.</prosody><prosody rate="-50%">One potato, two potato, three potato, four.</prosody></speak>") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
result = ask("What's your destination?", [ | |
choices: "http://gist.github.com/raw/559213/c83cf025a22acab46ec9e5691c69deff76ce3b7b/grammar.grxml"]) | |
say("You chose $result.value") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
say("Welcome to the geek singles hotline!") | |
conference("1337", [terminator: "*"]) | |
say("We hope you had fun, call back soon!") | |
hangup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
ask("What's your four digit pin?", [ | |
choices: "[4 DIGITS]", | |
mode: "voice", | |
recognizer: "en-us", // will recognize 'one two three four' | |
onChoice: {event -> say("You said $event.value")} | |
]) | |
answer() | |
ask("¿Cuál es su número de identificación?", [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version= "1.0"?> | |
<grammar xmlns="http://www.w3.org/2001/06/grammar" | |
xml:lang="en-US" root = "MYRULE"> | |
<rule id="MYRULE" scope="public"> | |
<one-of> | |
<item>james brown </item> </one-of> | |
</rule> | |
</grammar> | |
<?xml version= "1.0"?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
say("Please wait while we transfer your call") | |
transfer("tel:+14075551212", [ | |
playvalue: "http://myServer.com/ElevatorMusic.wav", | |
onTimeout: { event-> | |
say "Sorry, but nobody answered" } | |
]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
startCallRecording("http://myServer.com/recordings/testfile.wave", [ | |
transcriptionOutURI: "mailto:[email protected]"]) | |
//continue with your script here | |
stopCallRecording() | |
hangup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer() | |
record("Please leave your message at the beep.", [ | |
beep: true, | |
timeout: 10, | |
silenceTimeout: 7, | |
maxTime: 60, | |
onRecord: { event-> | |
log("Recording result = " + event.recordURI) | |
say("You said " + event.recordURI)} | |
]) |