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
$(function() { | |
var client = ZAFClient.init(); | |
client.invoke('resize', { width: '100%', height: '400px' }); | |
showStart(); | |
$("#get-tasks").click(function() { | |
getTaskData(client); | |
}); | |
}); | |
function showStart() { |
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
// FirstViewController.swift | |
// ChatBadgeCount | |
// | |
// Created by Barry Carroll on 30/05/2016. | |
// Copyright © 2016 chatbadge. All rights reserved. | |
// See the tutorial at https://support.zendesk.com/hc/en-us/articles/220080968 | |
import UIKit | |
import ZDCChat |
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
function search_other_hc(hc, hostname) { | |
var search_string = encodeURIComponent(document.getElementById('query').value); | |
var lang = document.getElementsByTagName('html')[0].getAttribute('lang').toLowerCase(); | |
var url = 'https://' + hostname + '/hc/'+ lang + '/search?utf8=%E2%9C%93&commit=Search&query=' + search_string; | |
window.open(url); | |
} | |
function init_multi_product_search() { | |
if (document.getElementsByClassName('search-other-products')) { | |
var help_centers = [ {product: 'acme', hostname: 'acme.zendesk.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
function search_other_hc(hc, hostname) { | |
var search_string = encodeURIComponent(document.getElementById('query').value); | |
var lang = document.getElementsByTagName('html')[0].getAttribute('lang').toLowerCase(); | |
var url = 'https://' + hostname + '/hc/'+ lang + '/search?utf8=%E2%9C%93&commit=Search&query=' + search_string; | |
window.open(url); | |
} | |
function init_multi_product_search() { | |
if (document.getElementsByClassName('search-other-products')) { | |
var help_centers = [ {product: 'zendesk', hostname: 'support.zendesk.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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Storable; | |
use Excel::Writer::XLSX; | |
my $topic_hash_ref = retrieve('my_serialized_data'); | |
my %topic_data = %{ $topic_hash_ref }; | |
my $workbook = Excel::Writer::XLSX->new( 'topic_posts.xlsx' ); |
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
import dateutil.parser | |
import pandas as pd | |
topic = pd.read_pickle('my_serialized_data') | |
posts_df = pd.DataFrame(topic['posts'], columns=['id', 'title', 'created_at', 'author_id']) | |
users_df = pd.DataFrame(topic['users'], columns=['id', 'name']).drop_duplicates(subset=['id']) | |
posts_df['created_at'] = posts_df['created_at'].apply(lambda x: dateutil.parser.parse(x).date()) |
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; | |
use warnings; | |
no warnings 'utf8'; | |
use LWP; | |
use JSON; | |
use MIME::Base64; | |
use Storable; | |
my $topic_id = 123456; | |
my $zendesk = 'your_zendesk_url'; |
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
import pickle | |
import time | |
import requests | |
credentials = 'your_zendesk_email', 'your_zendesk_password' | |
session = requests.Session() | |
session.auth = credentials | |
zendesk = 'your_zendesk_url' | |
topic_id = 123456 |
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
import json | |
import requests | |
from bottle import route, template, run, static_file, request, response | |
@route('/create_ticket', method=['GET', 'POST']) | |
def handle_form(): | |
if 'verified_email' in request.cookies: | |
ask_email = False |
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; | |
use warnings; | |
use LWP::UserAgent; | |
use JSON; | |
use MIME::Base64; | |
my $num_args = $#ARGV + 1; | |
if ($num_args != 1) { | |
print "Usage error: list_followers.pl hc_id\n"; | |
exit; |