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
| diff --git a/lib/token_generator.rb b/lib/token_generator.rb | |
| index 8481154..4fe7527 100644 | |
| --- a/lib/token_generator.rb | |
| +++ b/lib/token_generator.rb | |
| @@ -2,7 +2,6 @@ | |
| module TokenGenerator | |
| def self.generate | |
| - random_text = ([Time.now.to_f] + (1..10).map{rand}).join('--') | |
| - ActiveSupport::Base64.encode64_url(Digest::SHA1.digest(random_text)) |
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 'rubygems' unless defined?(Gem) | |
| require 'json' | |
| require 'pry' | |
| require 'net/http' | |
| module Couch |
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
| diff --git a/lib/ring_switch/call_flow/ivr_flow.rb b/lib/ring_switch/call_flow/ivr_flow.rb | |
| index 3f0d0dd..71cb9ed 100644 | |
| --- a/lib/ring_switch/call_flow/ivr_flow.rb | |
| +++ b/lib/ring_switch/call_flow/ivr_flow.rb | |
| @@ -89,7 +89,8 @@ def hangup_received? | |
| # Robo caller tone detection | |
| ROBOT_TONES = { | |
| :fax_send_tone => {:hz => 1100, :hits => 3, :timeout => 10.seconds}, | |
| - :wardialer_modem_signal => {:hz => 2100, :hits => 3, :timeout => 10.seconds} | |
| + :wardialer_modem_signal => {:hz => 2100, :hits => 3, :timeout => 10.seconds}, |
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
| # bad | |
| begin | |
| # calls to exit and kill signals will be caught (except kill -9) | |
| exit | |
| rescue Exception | |
| puts "you didn't really want to exit, right?" | |
| # exception handling | |
| end | |
| loop do | |
| #nothing forever |
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
| diff --git a/recipes/_freeswitch.rb b/recipes/_freeswitch.rb | |
| index b5594e6..4e4aa56 100644 | |
| --- a/recipes/_freeswitch.rb | |
| +++ b/recipes/_freeswitch.rb | |
| @@ -59,6 +59,7 @@ file "/etc/apt/preferences.d/freeswitch_pin" do | |
| group "root" | |
| mode 0644 | |
| content pin_string | |
| + notifies :run, resources(:execute => "apt-get update"), :immediately | |
| 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
| lib/rake_helpers.rb |
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
| FROM jpterry/debian-wheezy:wheezy | |
| MAINTAINER "John Terry <[email protected]>" | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update -y | |
| RUN apt-get upgrade -y | |
| RUN apt-get install -y build-essential git curl libssl-dev | |
| RUN git clone https://github.com/sstephenson/rbenv.git /opt/rbenv | |
| RUN mkdir /opt/rbenv/plugins |
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
| def attribute_for_inspect(attribute) | |
| case attribute | |
| when 'public_key_encrypted_password' | |
| hexify_string(public_key_encrypted_password) | |
| when 'salt' | |
| hexify_string(salt) | |
| else | |
| super | |
| 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
| # Install Nginx from source | |
| node.set['nginx']['init_style'] = 'init' | |
| node.set['nginx']['user'] = 'nginx' | |
| node.set['nginx']['version'] = '1.4.0' | |
| node.set['nginx']['source']['url'] = 'http://nginx.org/download/nginx-1.4.0.tar.gz' | |
| node.set['nginx']['source']['checksum'] = '84aeb7a131fccff036dc80283dd98c989d2844eb84359cfe7c4863475de923a9' | |
| node.set['nginx']['source']['prefix'] = '/opt/nginx' | |
| include_recipe 'nginx::source' |
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
| Host * | |
| # Connection sharing across sessions to the same machine | |
| ControlMaster auto | |
| ControlPath /tmp/%r@%h:%p | |
| ForwardAgent true | |
| ServerAliveInterval 30 | |
| ServerAliveCountMax 240 |