Skip to content

Instantly share code, notes, and snippets.

View SnacksOnAPlane's full-sized avatar

Richard Smiley SnacksOnAPlane

  • CallRail
  • Atlanta
View GitHub Profile
@SnacksOnAPlane
SnacksOnAPlane / kblister.js
Created October 29, 2019 01:33
Kindle book lister
// ==UserScript==
// @name Kindle Contents
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://read.amazon.com/ref=kcr_app_surl_cloudreader
// @grant none
// ==/UserScript==
@SnacksOnAPlane
SnacksOnAPlane / op_tag.rb
Last active September 13, 2018 14:37
Call time, duration, time of opportunity tagging
op_tag = Tag.find(1581739)
def time_of_tagging(c)
c.taggings.where(tag_id: 1581739).first.created_at
end
calls.map { |c| [ c.start_time, c.duration, time_of_tagging(c) ] }
@SnacksOnAPlane
SnacksOnAPlane / did
Created July 26, 2018 14:25
Did function - record stuff you did when you do it
did () {
local note="$HOME/Dropbox/CallRail/did.md"
if [ ! -z "$1" ]
then
date >> $note
echo "$@" >> $note
echo "" >> $note
else
vim + -c ':r! gdate +\#\#\#\ \%Y-\%m-\%d\ \%H:\%M && echo' +star $note
fi
{
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2017"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
{
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2015"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
cfs = """165f4ec3-0525-4cad-9ba3-2d58c08843b3 GB
2b9cd8ab-644d-4f36-97ad-dcd81d93568f DE
0fb56998-6a9f-40de-9e5d-ec8275eebce2 NZ
5c821efd-ecf1-47e8-a101-8ee0d23c7630 NZ
250656f0-7ff9-4729-9d7e-8c049eb94420 AU
3947595c-d574-4afe-a41f-10956a32616b AU
9c945822-e805-424b-a516-97fbe088518a FR
d6dabd4c-a296-416c-ab80-15a1c589b2f5 AU
d3450b18-a90a-4371-a020-7b267c075745 AU
fab5f49a-8c42-4484-83a5-628c895a0290 AU
{"branches"=>
[{"next_step_id"=>959441291, "key"=>0, "criteria"=>nil, "errors"=>nil},
{"next_step_id"=>761083567,
"key"=>1,
"criteria"=>
[{"key"=>0,
"choice"=>{"id"=>"first_time_caller", "name"=>"First-Time Caller"},
"source"=>{"id"=>nil, "name"=>"PPC Search"},
"lead"=>{"id"=>nil, "name"=>"Good Lead"},
"input"=>nil},
@SnacksOnAPlane
SnacksOnAPlane / rr.rb
Last active June 7, 2017 18:46
responsive-routing-config
{"branches"=>
[{"next_step_id"=>959441291, "key"=>0, "criteria"=>nil, "errors"=>nil},
{"next_step_id"=>761083567,
"key"=>1,
"criteria"=>
[{"key"=>0,
"choice"=>{"id"=>"first_time_caller", "name"=>"First-Time Caller"},
"choices"=>
[{"id"=>"repeat_caller", "name"=>"Repeat Caller"},
{"id"=>"source", "name"=>"Source"},
@SnacksOnAPlane
SnacksOnAPlane / num-not-e164.txt
Created May 24, 2017 13:48
numbers not in e164
CR main app:
trackers outgoing_number
blocked_numbers number
number_errors number
Swappy:
source_trackers phone_number (only if US)
@SnacksOnAPlane
SnacksOnAPlane / aussie_check.rb
Created May 17, 2017 18:03
aussie address check
a = Address.new(company_id: 1, network: 'twilio', street_1: '76 Eastfield Rd', street_2: '', city: 'Croydon', state: 'VIC', country_id: 7, postal_code: '3136')
anp = CallRail::Telephony::AddressNetworkProxy::Twilio.new(a)
anp.save
before you run this, stick a "binding.pry" into lib/call_rail/telephony/address_network_proxy.rb line 35, right before response.success? && JSON.parse(response.body)