This file contains 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
#!/bin/bash | |
apex deploy | |
apex invoke coa < test/coa-event.json | |
apex logs |
This file contains 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
@Override | |
public Void handleRequest(S3Event event, Context context) { | |
List<S3EventNotificationRecord> records = event.getRecords(); | |
... | |
String bucket = record.getS3().getBucket().getName(); | |
String key = decodeKey(record.getS3().getObject().getKey()); | |
... | |
// fetch recording off S3 bucket | |
S3Object object = getS3Object(bucket, key); |
This file contains 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
// http://stackoverflow.com/questions/164979/uk-postcode-regex-comprehensive | |
(function(){ | |
var maps = function(converter) { | |
return [ { | |
type: 'lang', | |
filter: function(text) { | |
return text.replace(/\[map (GIR 0AA|[A-PR-UWYZ]([A-HK-Y]([0-9][A-Z]?|[1-9][0-9])|[1-9]([0-9]|[A-HJKPSTUW])?) ?[0-9][ABD-HJLNP-UW-Z]{2})\]/ig, 'map'); | |
} | |
}]; |
This file contains 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
#!/bin/bash | |
# usage: jetty -Dfoo=bar --path services --port 8080 path/to/war/file.war | |
# last 5 args are forwarded to jetty while remainder (if any) is forward to jvm | |
# such as system properties or remote debugging ala | |
# -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n | |
length=$(($#-5)) | |
jvm_args=${@:1:$length} | |
jetty_args=${@:$length+1:$(($#))} |
This file contains 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
#!/bin/bash | |
VIRTUAL_BOX_VERSION=${1:-4.3} | |
VAGRANT_VERSION=${2:-1.4.2} | |
ARCH=`arch` | |
if [! -e /etc/redhat-release ] ; then | |
echo "Only RHEL flavour supported." | |
exit 1; | |
fi |
This file contains 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
if (login() == null) return STATUS_INVALID_USER; | |
Interactions mainMenu = newInteraction("main-menu") | |
.dtmfBargeIn(1) | |
.audio(audioPath("vm-youhave")) | |
.synthesis("1") | |
.audio(audioPath("vm-message")) | |
.noInputTimeout(DEFAULT_TIMEOUT) | |
.toInteractions(); |
This file contains 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
String username; | |
String password; | |
int tries = 0; | |
do { | |
tries++; | |
username = processDtmfTurn(askLogin); | |
password = processDtmfTurn(askPassword); | |
askLogin = incorrect; | |
} while (!validate(username, password) && tries < 3); | |
if (tries == 3) { |
This file contains 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
String menu; | |
do { | |
menu = processDtmfTurn(mainMenu); | |
if ("0".equals(menu)) { | |
mailboxConfigure(); | |
} else if ("1".equals(menu)) { | |
messageMenu(); |
This file contains 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
VoiceXmlInputTurn inputTurn = DialogueUtils.doTurn(context, turn); | |
if (VoiceXmlEvent.hasEvent(VoiceXmlEvent.CONNECTION_DISCONNECT_HANGUP, inputTurn.getEvents())) { | |
throw new HangUp(); | |
} | |
if (VoiceXmlEvent.hasEvent(VoiceXmlEvent.ERROR, inputTurn.getEvents())) { |
This file contains 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
#!/bin/sh | |
# | |
# <%=@service%> This shell script takes care of starting and stopping | |
# the <%=@service%> service. | |
# | |
# chkconfig: 2345 65 35 | |
# description: <%=@description%> | |
# | |
SERVICE=<%=@service%> |
NewerOlder