Skip to content

Instantly share code, notes, and snippets.

View howethomas's full-sized avatar
💭
Currently pairing, sleeping or walking the dogs.

Thomas Howe howethomas

💭
Currently pairing, sleeping or walking the dogs.
View GitHub Profile
@howethomas
howethomas / July 30, 2022.md
Created August 4, 2022 03:22
RingPlan post

{ "callback_type": "calls.recording.created", "company_id": "626c013fdcc272d3682c0f1e", "id": "2f91937b-3a95-446f-a3e0-c57701d0691a", "payload": { "cdr": { "billsec": 21, "direction": "IN", "dst": "2064159733", "duration": 21,

const express = require('express')
const app = express()
var bodyParser = require('body-parser')
const port = 5000
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
app.post('/webhook', function(request, response){
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 512 bytes
03:43:29.332415 IP (tos 0x40, ttl 44, id 29581, offset 0, flags [none], proto UDP (17), length 766)
12.239.217.2.49202 > ip-10-251-202-114.ec2.internal.sip: SIP, length: 738
REGISTER sip:184.73.37.39 SIP/2.0
Via: SIP/2.0/UDP 198.18.41.216:49202;branch=z9hG4bK-d8754z-3cc36555b0892e7a-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:filiz@12.239.217.2:49202;rinstance=d38bf266d86c1a98>;expires=0
To: "Fliiz"<sip:filiz@184.73.37.39>
From: "Fliiz"<sip:filiz@184.73.37.39>;tag=03f7b57d
Call-ID: YzdkYzQ0YWFkMGYzMmI4ZjA1NTk5NjE2ZDY4YzIxMDc.
module FixtureReplacement
attributes_for :person do |u|
u.first_name = Random.firstname_male
u.last_name = Random.lastname
u.email_address = Random.number(10000).to_s+Random.email
u.im_handle = "#{u.first_name}#{Random.number(10000)}"
u.im_service = "gtalk"
u.phone_number_office = Random.international_phone
u.phone_number_mobile = Random.international_phone
bash>$ heroku rake sample_data:sample_company count=100 --app karelaccept
(in /disk1/home/slugs/157396_5a6081a_515c/mnt)
Created Major Software
Created Thomas Industrial
Created Anderson Enterprises
Created Thomas Software
Created Clarkson Productions
Created Johnson Software
Created Harrison Productions
Created Garcia Productions
08:32 PM [ taqi ]$ heroku create karelprofile
Creating karelprofile..... done!
Created http://karelprofile.heroku.com/ | git@heroku.com:karelprofile.git
/Library/Ruby/Gems/1.8/gems/heroku-1.8.0/bin/../lib/heroku/commands/base.rb:45: warning: Insecure world writable dir /usr/local in PATH, mode 040777
08:34 PM [ taqi ]$ git remote
heroku
origin
08:34 PM [ taqi ]$ git remote add profile git@heroku.com:karelprofile.git
08:35 PM [ taqi ]$ git push profile master
Counting objects: 3984, done.
rds-create-db-instance --db-instance-identifier taqistaging --allocated-storage 20 --db-instance-class db.m1.small --engine mysql5.1 --master-username xxxxx --master-user-password xxxxxx
DBINSTANCE taqistaging db.m1.small mysql5.1 20 dbroot creating 1 ****
SECGROUP default active
PARAMGRP default.mysql5.1 in-sync
rds-describe-db-instances
DBINSTANCE taqistaging db.m1.small mysql5.1 20 dbroot creating us-east-1d 1 ****
SECGROUP default active
PARAMGRP default.mysql5.1 in-sync
sudo apt-get install perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl libfrontier-rpc-perl libterm-readline-gnu-perl libberkeleydb-perl gcc bison flex make
mkdir src
cd src/
wget http://opensips.org/pub/opensips/latest/src/opensips-1.6.2-notls_src.tar.gz
tar zxvf opensips-1.6.2-notls_src.tar.gz
cd opensips-1.6.2-notls/
make all include_modules=“db_mysql” modules
sudo apt-get install mysql-server
sudo make install include_modules=“db_mysql” modules
sudo bash
namespace :deploy do
PRODUCTION_APP = 'myapp'
STAGING_APP = 'myapp-staging'
def run(*cmd)
system(*cmd)
raise "Command #{cmd.inspect} failed!" unless $?.success?
end
def confirm(message)
Module.constants.select do |constant_name|
constant = eval constant_name
if not constant.nil? and constant.is_a? Class and constant.superclass == ActiveRecord::Base
constant
end
end