This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: | |
Configure in Variables the objects and their properties you want to search. | |
The properties must include an Id and Name. Optionally you can include an Email property. | |
You can use https://app.calltrackingmetrics.com/salesforce/object_attributes.json?object=<insert your object type here> | |
to discover the internal names for your Object's properties. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.handler = function(event, context, callback) { | |
const ticket = event.activity.custom_fields.zd_ticket.match(/\d+/)[0] | |
const data = {call_id: event.activity.id, ticket_id: ticket, ticket_data: {"ticket": {"status": "open", "comment": { "body": event.activity.chat_transcription }}}} | |
var authHeaders = {'Authorization': process.env.ZDAuth}; | |
context.http_post('https://app.calltrackingmetrics.com/api/v1/accounts/25/zendesk/update_ticket', | |
JSON.stringify(data), | |
authHeaders).then(function(request) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jsforce = require('jsforce'); | |
function phoneQuery(number, objects) { | |
let digits = number.replace(/\D/g,'').split(""); | |
if (digits.length > 10) { | |
let country_code = digits.shift(); | |
} | |
let npa = []; | |
npa.push(digits.shift()); | |
npa.push(digits.shift()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl s_client -connect yum.datadoghq.com:443 | |
CONNECTED(00000003) | |
140536412514128:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:794: | |
--- | |
no peer certificate available | |
--- | |
No client certificate CA names sent | |
--- | |
SSL handshake has read 7 bytes and written 289 bytes | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example OAuth2 Application for CallTrackingMetrics.com | |
# Users are redirected to your application and prompted to allow access to their CallTrackingMetrics account with the given permissions | |
# After accepting they are redirected back to your applicaiton's /authorize URL via GET request. | |
# In this request you will receive a 'code' that you must send via a POST request back to CTM to get an access token and refresh token. | |
# Later when the access token expires you can renew it via the refresh request. | |
# | |
require 'sinatra' | |
require 'curb' | |
require 'uri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pt-slave-restart --master-uuid 393fa485-fd5d-11e7-8c56-0e15b1b77760 --host localhost -u root | |
******************************************************************* | |
Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client | |
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER | |
together with SSL_ca_file|SSL_ca_path for verification. | |
If you really don't want to verify the certificate and keep the | |
connection open to Man-In-The-Middle attacks please set | |
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. | |
******************************************************************* | |
at /usr/bin/pt-slave-restart line 3842. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Lazy load specific scopped run</title> | |
<script> | |
function goNow() { | |
__ctm.main.start(document.querySelector(".callus")); | |
} | |
window.winReady = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple Menu Template | |
* | |
* This Function builds a simple IVR menu. Learn more about <Gather> at: | |
* https://www.twilio.com/docs/api/twiml/gather | |
*/ | |
exports.handler = function(context, event, callback) { | |
let twiml = new Twilio.twiml.VoiceResponse(); | |
if (event.Digits && event.Digits.length && event.Digits != 'timeout' && event.Digits != '*') { | |
let digits = event.Digits.split("").join(", "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ObjectThing | |
extend PropertyAttributeHelper | |
property :my_options, :my__value # adding an extra underscore to indicate private | |
def my_value | |
my__value.nil? ? true : my__value | |
end | |
def my_value=(v) | |
my__value = v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="hidden" name="attributes[visitor_sid]" id="ctm_visitor_sid" value=""/> | |
<script> | |
function getCookie(name) { | |
var nameEQ = name + "="; | |
var ca = document.cookie.split(';'); | |
for(var i=0, len = ca.length;i < len;i++) { | |
var c = ca[i]; | |
while (c.charAt(0)==' ') c = c.substring(1,c.length); | |
if (c.indexOf(nameEQ) == 0) { | |
return c.substring(nameEQ.length,c.length); |