Skip to content

Instantly share code, notes, and snippets.

View smpallen99's full-sized avatar

Steve Pallen smpallen99

View GitHub Profile
@smpallen99
smpallen99 / c_structure.ex
Created April 5, 2014 18:40
An approach to handling serialized binary data (i.e. with a C program)
defmodule CStructure do
alias :binary, as: Bin
@defmoudule """
Parses a binary received from the line that created by sending a C structure.
The structure is defined by a keyword list of the field name, the message type
and the size of the field.
Integer fields are reversed and string fields have 0 padding removed.
@smpallen99
smpallen99 / test
Created May 9, 2014 23:17
EXRM release rpm first pass
#!/bin/bash
#
# chkconfig: 345 95 5
# description: The test service script
# process name: test
#
# Author: Steve Pallen
#
# Source function library.
@smpallen99
smpallen99 / extest
Created May 10, 2014 14:31
EXRM release rpm with live upgrade
#!/bin/bash
#
# chkconfig: 345 95 5
# description: The extest service script
# process name: extest
#
# Author: Steve Pallen
#
# Source function library.
@smpallen99
smpallen99 / ex_form.ex
Last active August 29, 2015 14:15
Elixir form helpers prototype
defmodule ExForm do
@moduledoc """
Prototype for a helpers to generate html forms. Usable with Phoenix.
"""
@doc """
Generates a html form.
## Syntax:
1. pass model name atom and use input_field
@smpallen99
smpallen99 / cfg.conf
Created April 12, 2015 12:43
Conform tuple support
# Provide documentation for cfg.settings.login_defaults here.
cfg.settings.login_defaults = {/orange,initiate@example.com}, {/orange/monitor,admin@example.com}
@smpallen99
smpallen99 / freepbx_config.rb
Created May 9, 2012 03:25
xpath step for FreePBX config page testing using Capybara
# features/support/freepbx_config.rb
module FreePBXConfig
def find_and_click(str)
find_partial_link(str).click
end
def find_partial_link(str)
find(:xpath , "//a[contains(text(), '#{str}')]")
end
@smpallen99
smpallen99 / install_ruby_debug
Created June 3, 2012 15:14
Install ruby-debug with ruby 1.9.3-p194
# Install with:
# bash < <(curl -L https://raw.github.com/gist/2863872)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p194 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@smpallen99
smpallen99 / Log
Created October 19, 2012 20:48
Adhearsion Ghost Calls
➜ sample
➜ sample ahn -
Starting Adhearsion server at /Users/spallen/myprojects/adhearsion/sample
[2012-10-19 16:41:28] DEBUG Adhearsion::LinuxProcName: Error while attaching libc function prctl: Function 'prctl' not found in [libc.dylib]
[2012-10-19 16:41:28] INFO Adhearsion::Initializer: Setting RAILS_ENV to "development"
[2012-10-19 16:41:28] INFO Adhearsion::Drb::Plugin::Service: Starting DRb on 127.0.0.1:9950
[2012-10-19 16:41:28] INFO Adhearsion::Console: Launching Adhearsion Console
AHN> [2012-10-19 16:41:28] INFO Adhearsion::PunchblockPlugin::Initializer: Starting connection to server
[2012-10-19 16:41:28] DEBUG RubyAMI::Client: Starting up...
[2012-10-19 16:41:28] DEBUG RubyAMI::Client: Starting up...
@smpallen99
smpallen99 / adhearsion.log
Created April 16, 2013 15:04
Adhearsion hangup exception
[2013-04-16 10:58:05] DEBUG DrbEndpoint: DrbEndpoint#notification_call(112, UCX/304, 6, 304 User, Test 304)
[2013-04-16 10:58:05] DEBUG DrbEndpoint: Last message id is: 112
[2013-04-16 10:58:06] DEBUG Adhearsion::OutboundCall: : Executing command #<Punchblock::Command::Dial to="UCX/304", from="304 User", join=nil, headers_hash={}, target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new>
[2013-04-16 10:58:06] TRACE RubyAMI::Client: [QUEUE]: Action: originate
ActionID: 78452038-a272-4952-be2d-08c8501e6801
Async: true
Application: AGI
Data: agi:async
Channel: UCX/304
Callerid: 304 User

Coherence 0.2.0 to 0.3.0 Upgrade Instructions

Update your Coherence deps

def deps do
  [{:coherence, "~> 0.3.0"},
  ...]
end