Skip to content

Instantly share code, notes, and snippets.

<style>
h1, a, p {
color:#fff;
margin-top:0;
padding-top:0;
}
</style>
<div style="padding:20px;background:orange">
<h1>Call Us Today!
@taf2
taf2 / transfer_api.sh
Last active March 9, 2017 16:25
API Commands for CTM
#!/bin/bash
api_host=api.calltrackingmetrics.com
key=account key
sec=account sec
act=account id
numberToTransferTo='+1dddddddddd' # E.164
echo "update above line"
exit 1
// Marketo Forms and FormReactor
var attempts = 0;
function TrackSessionForForm() {
__ctm.tracker.trackEvent(null, "1", "form");
jQuery("input[name=cTMSessionID]").val(__ctm.config.sid);
}
function CheckForMarketo() {
if (jQuery(".mktoButton").length) {
TrackSessionForForm();
jQuery(".mktoButton").click(function(e) {
@taf2
taf2 / ctm-geo-example.sh
Created January 2, 2017 17:30
Example script to setup and configure a CallTrackingMetrics Geo Router with custom sequential dial per receiving number
# example shell script to configure a CTM geo router
# the geo router created will route to 1 receiving number
# when you enter the zip code 21146 that receiving number will ring
# if you enter the wrong zip code it will ring to another receiving number after prompting
# the 1 receiving number for zip code 21146 will ring for 20 seconds and then route to the other receiving number
# all API output is captured in tmp/api folder for review
# you'll need to set the following environment variables to use this script:
#
# CTM_TOKEN - your API key
# CTM_SECRET - your API secret
var numbers = []; for (var n in __ctm_tracked_numbers) { numbers.push(n); }; __ctm_tracked_numbers={}; for (var i = 0; i < numbers.length; ++i) { __ctm.tracker.trackVisitor(null, numbers[i]) }

Keybase proof

I hereby claim:

  • I am taf2 on github.
  • I am taf2 (https://keybase.io/taf2) on keybase.
  • I have a public key whose fingerprint is 1F23 D584 2C92 11E2 6065 4C5E 9DC6 EE09 44A1 AF21

To claim this, I am signing this object:

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,latin1
endif
set rs=1
set ttyfast
set lazyredraw " big improvement in vim performance
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert mode
private static void rangeCheck(int arrayLen, int fromIndex, int toIndex {
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex +
") > toIndex(" + toIndex+")");
if (fromIndex < 0)
throw new ArrayIndexOutOfBoundsException(fromIndex);
if (toIndex > arrayLen)
throw new ArrayIndexOutOfBoundsException(toIndex);
}
<?php
$key = $_ENV['key'];
$sec = $_ENV['sec'];
$account = $_ENV['account'];
$post_request = array(
"post_uri" => "https://api.calltrackingmetrics.com/api/v1/accounts/$account/webhooks"
);
<!doctype html>
<html>
<head>
</head>
<body>
<div id="map">
<canvas></canvas>
</div>
<script>