Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View JustinAiken's full-sized avatar
💎
Rubyin'

Justin Aiken JustinAiken

💎
Rubyin'
View GitHub Profile
[228470f4-464e-4f6d-9411-e0e0efaecbda] ActionController::RoutingError (No route matches [GET] "/"):
[8dea6489-61d0-4b71-a379-f66511c79a30] ActionController::RoutingError (No route matches [GET] "/showLogin.cc"):
[736de989-da56-4de2-9133-8f24d0c95933] ActionController::RoutingError (No route matches [GET] "/"):
[bc145798-4030-45da-b973-5eecbc9ed18a] ActionController::RoutingError (No route matches [GET] "/.env"):
[2fbbc967-ca84-43e0-a9e0-7166e641e5f8] ActionController::RoutingError (No route matches [GET] "/"):
[7f36a1d3-3a50-4a9c-a4eb-2f0cdce211f6] ActionController::RoutingError (No route matches [GET] "/"):
[98badd41-8586-461a-a0bb-3e9f9c51ba46] ActionController::RoutingError (No route matches [GET] "/autodiscover/autodiscover.json"):
[561fe96d-1969-435f-b1e5-9fbd4a6de3bc] ActionController::RoutingError (No route matches [GET] "/"):
[8914d830-15f2-4a89-aa68-21297605720d] ActionController::RoutingError (No route matches [GET] "/ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application"):
[9f
#!/usr/bin/env ruby
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "net-sftp"
end
require "net/sftp"
@JustinAiken
JustinAiken / keybase.md
Created August 18, 2014 21:12
Keybase Proof

Keybase proof

I hereby claim:

  • I am justinaiken on github.
  • I am justinaiken (https://keybase.io/justinaiken) on keybase.
  • I have a public key whose fingerprint is D5DA 713A C9A7 5CB4 46AB B4AF 08D2 F343 6C6C BB16

To claim this, I am signing this object:

@JustinAiken
JustinAiken / lumenvox.pp
Created April 9, 2014 23:25
puppet error
define lumenvox::language_pack (
$language = undef,
$version = latest,
) {
package { "LumenVox-${language}SREModel":
ensure => $version,
provider => 'yum',
}
}
@JustinAiken
JustinAiken / adhearsion.log
Created February 18, 2014 19:12
Bits o' a log
[2014-02-16 12:04:21] DEBUG Roster: Selecting 363@10.1.2.87/browser for inside_sales_prospect
[2014-02-16 12:04:21] INFO Roster: Updating 363@10.1.2.87/browser to composing
[2014-02-16 12:04:21] DEBUG Adhearsion::OutboundCall: 6d0cd0bd-83bb-4a84-9eab-82f43aef9e7d@: Finished executing controller #<OutboundConnectingController call=6d0cd0bd-83bb-4a84-9eab-82f43aef9e7d, metadata={}>
[2014-02-16 12:04:21] INFO Adhearsion::OutboundCall: 6d0cd0bd-83bb-4a84-9eab-82f43aef9e7d@: Connecting customer inside_sales 25376541 to extension 363
[2014-02-16 12:04:21] INFO OutboundCustomersController: Call was hung up while executing a controller
[2014-02-16 12:04:21] DEBUG OutboundCustomersController: Finished executing controller #<OutboundCustomersController call=, metadata={}>
[2014-02-16 12:04:21] INFO Adhearsion::OutboundCall: 6d0cd0bd-83bb-4a84-9eab-82f43aef9e7d@: connecting inside_sales 25376541 to extension 363
[2014-02-16 12:04:21] DEBUG Adhearsion::OutboundCall: 232d2f70-566d-47ae-82d9-eb2a4d532e0a@: Executing co
diff --git a/app/classes/talkbox/phone_config_creator.rb b/app/classes/talkbox/phone_config_creator.rb
index 104f263..0a22236 100644
--- a/app/classes/talkbox/phone_config_creator.rb
+++ b/app/classes/talkbox/phone_config_creator.rb
@@ -29,18 +29,22 @@ class PhoneConfigCreator
end
def generate
- if user.office_ext.present? && APP_CONFIG['provision']['pbx_host']
- config_file << pbx_account
cookbook 'build-essential'
cookbook 'apt'
cookbook 'ruby_build'
cookbook 'rbenv', :git => 'https://github.com/fnichol/chef-rbenv'
cookbook 'unicorn'
cookbook 'nginx'
cookbook 'runit'
cookbook 'rails-lastmile', :git => 'git://github.com/DanThiffault/rails-lastmile.git'
@JustinAiken
JustinAiken / order.rb
Created February 21, 2013 19:06
refactoring
def order(n)
i=1, a=1, list=[]
until (i==61 or a==n) do
if (a^i).modulo(n)==1
[a,i]>>list
a+=1
i=1
else
i+=1
This file has been truncated, but you can view the full file.
[2013-01-22 11:14:46] DEBUG Adhearsion::Call: bc22d026-9854-4c87-a6e8-b894fb44e596: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event name="VarSet", attributes_hash={:privilege=>"dialplan,all", :channel=>"SIP/4.55.12.163-00007e7d", :variable=>"PLAYBACKSTATUS", :value=>"SUCCESS", :uniqueid=>"1358871283.32381"}, target_call_id="bc22d026-9854-4c87-a6e8-b894fb44e596", component_id=nil, target_mixer_name=nil>
[2013-01-22 11:14:46] DEBUG Adhearsion::Call: bc22d026-9854-4c87-a6e8-b894fb44e596: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event name="AGIExec", attributes_hash={:privilege=>"agi,all", :subevent=>"End", :channel=>"SIP/4.55.12.163-00007e7d", :commandid=>"1369246299", :command=>"EXEC Playback \"lmc/monitored-and-recorded\"", :resultcode=>"200", :result=>"Success"}, target_call_id="bc22d026-9854-4c87-a6e8-b894fb44e596", component_id=nil, target_mixer_name=nil>
[2013-01-22 11:14:46] DEBUG Adhearsion::Call: bc22d026-9854-4c87-a6e8-b894fb44e596: Receiving message: #<Punchblock::Event::Ast
1.9.2p320 :001 > @call_flow = CallFlow.find_by_id(7107)
=> #<CallFlow id: 7107, provisioned_route_id: 1147, dnis: "2162019670", message: "blank", default_ringto: "0000000000", ouid: 170, caller_to_sms: nil, email_to_notify: nil, play_disclaimer: "before", created_at: "2012-12-19 18:43:14", updated_at: "2012-12-20 16:11:38", country_code: "1", tx_boost: nil, rx_boost: nil, vm_enabled: nil, routable_type: "OutboundRoute", routable_id: 5, webhook_enabled: nil>
1.9.2p320 :002 > call_flow_params = {:country_code=>"1", :ouid=>"170", :dnis=>"2162019670", :message=>"blank", :play_disclaimer=>"before"}
=> {:country_code=>"1", :ouid=>"170", :dnis=>"2162019670", :message=>"blank", :play_disclaimer=>"before"}
1.9.2p320 :003 > @call_flow.update_attributes(call_flow_params)
NameError: undefined local variable or method `to_ary' for #<CallFlow:0xa968ef8>
from /home/jaiken/.rvm/gems/ruby-1.9.2-p320@callengine/gems/activemodel-3.0.8/lib/active_model/attribute_methods.rb:392:in `method_missing'
from /home/jaiken/.rvm/g