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
# Start Adhearsion in JRuby, while building a pidfile as soon as possible. | |
def ahnctl_start | |
shell_command = "#{exec_ahn_async} && #{wait} && #{save_pid}" | |
%x{shell_command} | |
end | |
private | |
# Run start in the background, since it is not daemonized. |
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
[general] | |
udpbindaddr=0.0.0.0:5060 | |
tcpenable=yes | |
tcpbindaddr=0.0.0.0:5060 | |
tlsenable=yes | |
tlsbinddir=0.0.0.0:5060 | |
;tlsverify=no |
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
apt-get --yes install curl wget rsync subversion git-core \ | |
build-essential automake autoconf libtool bison libssl-dev openssl libncurses-dev libnewt-dev \ | |
libreadline6 libreadline-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev \ | |
libxslt-dev libc6-dev libcurl4-openssl-dev libgdbm-dev libffi-dev sudo \ | |
libsqlite3-dev sqlite3 libtiff-dev ghostscript usbutils libusb-dev unzip autoconf automake \ | |
minicom mc vim screen tmux libncurses5-dev libxml2-dev libssl-dev uuid-dev \ | |
libpcap-dev ngrep libpcre++-dev libpcre3-dev wpasupplicant w3m ssl-cert ca-certificates \ | |
ffmpeg espeak libespeak-dev libsndfile1-dev libsamplerate0-dev libsrtp0-dev libsrtp0 \ | |
uuid-dev uuid |
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
def tts(message, lang = 'en-US') | |
GoogleTTS.download(message, lang) | |
end | |
def read_pin(message, lang = 'en-US') | |
prompt = { audio: ANNOUNCEMENTS[lang][message], | |
max_digits: 10, | |
timeout: 20 } | |
#3.times do |attempt_no| | |
data = begin |
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
module Configuration | |
Error = Class.new StandardError | |
class << self | |
def config(&block) | |
@config ||= initialize_config | |
block_given? and yield @config | |
@config | |
end |
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
class CreateUsers | |
end | |
Sequel.migration do | |
change do | |
create_table :users do | |
primary_key :id | |
String :email | |
String :encrypted_password |
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
ruby -rubygems -e 'require "jekyll-import"; | |
JekyllImport::Importers::Blogger.run({ | |
"source" => "/Users/ak/Desktop/blog-10-02-2014.xml", | |
"no-blogger-info" => false, # not to leave blogger-URL info (id and old URL) in the front matter | |
"replace-internal-link" => false, # replace internal links using the post_url liquid tag. | |
})' |
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 | |
cd ~/Dropbox | |
# Remove conflicted copies | |
find . -iname '*conflicted copy*' | \ | |
awk -F '-8-8-8-8-8-' '{print "\""$1"\""}' | xargs rm -rf | |
find . -type f \ | |
-perm 755 \ |
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/env ruby | |
# This application was made and tested in production with Ruby 1.8x | |
require 'rubygems' | |
require 'mysql' | |
require 'active_record' | |
require 'AGIServer' | |
require 'AGIMenu' | |
require 'AGISelection' |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'rastman' | |
require 'AGIServer' | |
require 'AGISelection' | |
require 'AGIMenu' | |
AMI = Rastman::Manager.new(@@config[:manager][:user], | |
@@config[:manager][:secret], |
OlderNewer