This file contains hidden or 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
'use-strict' | |
Emitter = require 'emitter' | |
_ = require 'lodash' | |
binder = require 'binder' | |
module.exports = class DrawingTracker extends Emitter | |
constructor: (@_element, visible = no) -> | |
if typeof this._element == 'string' or this._element instanceof String | |
this._element = document.getElementById this._element |
This file contains hidden or 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
public class Multipass | |
{ | |
private static String SITE_KEY = 'site_key'; | |
private static String API_KEY = 'api_key'; | |
public static void generate() | |
{ | |
System.debug('== Generating =='); | |
System.debug(' Create the encryption key using a 16 byte SHA1 digest of your api key and subdomain'); |
This file contains hidden or 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
var crypto = require('crypto') | |
// site name is your desk.com subdomain | |
, siteName = 'site_name' | |
// api key is generated here: https://your_subdomain.desk.com/admin/channels/support-center/auth_settings | |
, apiKey = 'multipass_token' | |
, data = JSON.stringify({ | |
uid: '19238333', | |
expires: (new Date(Date.now() + 120000)).toISOString(), | |
customer_email: '[email protected]', |
This file contains hidden or 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
public class DeskTriggerHelper | |
{ | |
private static DeskClient CLIENT = new DeskClient(new Map<String, String>{ | |
'token' => 'TOKEN', | |
'tokenSecret' => 'TOKEN_SECRET', | |
'consumerKey' => 'CONSUMER_KEY', | |
'consumerSecret' => 'CONSUMER_SECRET', | |
'endpoint' => 'https://example.desk.com' | |
}); | |
This file contains hidden or 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
<script> | |
$(function() { | |
var tid = $('#tabs .ui-state-active a').attr('href').replace('#tabs-tid_', '') | |
, sel = '#email_reply_div_tid_' + tid | |
setTimeout(function() { | |
$(sel).prepend([ | |
'<div>', | |
' <ul class="reply-toggle">', | |
' <li class="active">', |
This file contains hidden or 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
ticket = DeskApi.cases.create({ | |
external_id: 123456, | |
subject: 'Subject', | |
description: 'Description', | |
priority: 1, | |
status: 'resolved', | |
type: 'email', | |
labels: ['Label 1', 'Label 2'], | |
custom_fields: { | |
my_key: 'My Value' |
This file contains hidden or 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
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" recordSetVar="macros" docType="html-5.0" | |
standardController="Macro__c" extensions="ApplyMacroControllerExtension" title="Select Macro" > | |
<apex:includeScript value=""/> | |
<apex:includeScript value="/support/console/30.0/integration.js"/> | |
<apex:includeScript value="/soap/ajax/30.0/connection.js"/> | |
<apex:includeScript value="/support/api/30.0/interaction.js"/> | |
<apex:includeScript value="/canvas/sdk/js/30.0/publisher.js"/> | |
<apex:stylesheet value="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" /> |
This file contains hidden or 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
require 'desk_api' | |
require 'csv' | |
DeskApi.configure do |config| | |
config.username = '[email protected]' | |
config.password = 'Top$ecret1' | |
config.endpoint = 'https://example.desk.com' | |
end | |
CSV.foreach('./customers.csv', headers: true) do |csv| |
This file contains hidden or 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
require 'desk_api' | |
DeskApi::Default::CONNECTION_OPTIONS[:request] = { | |
open_timeout: 45, | |
timeout: 45 | |
} | |
client = DeskApi::Client.new({ | |
token: 'TOKEN', | |
token_secret: 'TOKEN_SECRET', |
This file contains hidden or 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
new DESK.Widget({ | |
id: 'test', // The ID of the element to place the button into | |
version: 1, | |
site: 'hecos.desk.com', | |
port: '80', | |
type: 'chat', | |
displayMode: 0, //0 for popup, 1 for lightbox | |
features: { | |
offerAlways: false, | |
offerAgentsOnline: true, |