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
| require 'fsr' | |
| require 'fsr/listener/inbound' | |
| class MyInbound < FSR::Listener::Inbound | |
| # `on_event` is called every time an event is received. | |
| def on_event | |
| # Be sure to check out the content of `event`. It has all the good stuff. | |
| FSR::Log.info "Got event: #{event.content[:event_name]}" | |
| end |
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
| require 'rubygems' | |
| require 'eventmachine' | |
| module Echo | |
| def initialize | |
| puts caller(0) | |
| end | |
| def receive_data(data) | |
| send_data data | |
| end |
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
| module EventMachine | |
| def self.threadqueue | |
| @threadqueue | |
| end | |
| def self.resultqueue | |
| @resultqueue | |
| end | |
| end |
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 ruby | |
| require 'monitor' | |
| require 'pp' | |
| require 'timeout' | |
| require 'time' | |
| require 'pp' | |
| require 'rubygems' | |
| require 'AGIServer' |
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
| #!/bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: ahn | |
| # Required-Start: ahn daemon | |
| # Required-Stop: ahn daemon | |
| # chkconfig: 2345 91 60 | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Adhearsion daemon |
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
| #!/bin/bash | |
| mkdir /tmp/bison | |
| cd /tmp/bison | |
| apt-get update | |
| apt-get install -y build-essential m4 | |
| wget http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz | |
| tar -xvf bison-2.7.tar.gz |
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 python2.7 | |
| # Requirements: pip install ari gevent | |
| import argparse | |
| import ari | |
| import gevent | |
| from gevent.monkey import patch_all; patch_all() | |
| from gevent.event import Event | |
| import logging | |
| from requests.exceptions import HTTPError, ConnectionError | |
| import socket |