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
using System; | |
using System.Net; | |
using System.IO; | |
using System.Text; | |
using System.Collections.Specialized; | |
namespace test2 | |
{ | |
class MainClass | |
{ |
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
//Begin Humble Squid Category Image Boxes JS Snippet | |
cat_list = $("ul.category-list li"); // jQuery object containing the category list elements | |
link_list = $("ul.category-list li a"); // jQuery object containing the category list link elements | |
// hardcoded array of image assets for use with categories | |
image_links = [ | |
"//p1.zdassets.com/hc/theme_assets/link/to/images/for/categories.jpg",//replace with actual image links from your Help Center's assets | |
"//p1.zdassets.com/hc/theme_assets/link/to/images/for/categories.jpg", | |
"//p1.zdassets.com/hc/theme_assets/link/to/images/for/categories.jpg", | |
"//p1.zdassets.com/hc/theme_assets/link/to/images/for/categories.jpg", |
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
requests: { | |
var json_data = { | |
"ticket": { | |
"subject": "Hello", | |
"comment": { | |
"body": "Some question" | |
}, | |
"ticket_form_id": this.carrierOpsFormId, | |
"custom_fields": [{ | |
"id": 23810968, |
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
<?php | |
require_once('curlwrap.php'); | |
function getUserIdByEmail($email) { | |
$query = curlWrap('/search.json?query=type:user%20email:' . $email ,'',GET); | |
$results_array = $query->results; | |
$results_length = count($results_array); | |
if($results_length == 1){ | |
echo "we found a single match, good stuff!\n User ID: "; | |
return $results_array[0]->id; |
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
import requests | |
s = requests.Session() | |
s.headers.update({'Content-Type': 'application/json'}) | |
s.auth = ('ADMINEMAIL/token','APITOKEN') | |
y = 1500 #starting ticketid | |
#declare last ticketid here | |
while (y < 24167): |
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
<?php | |
include("vendor/autoload.php"); | |
$subdomain = "subdomain"; | |
$username = "username@domain.com"; | |
$password = "password"; | |
$headers = array('Content-Type' => 'application/json'); | |
$options = array('auth' => array($username, $password)); | |
$newTicket = array ( | |
'ticket' => array ( |
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
$('span.nesty-input').detach(); | |
var formOptions = $("#request_issue_type_select option"); | |
var nullOption = $("<option value>-</option>"); | |
var externalOptions = _.chain(formOptions) | |
.filter(function(option) { | |
return option.value == 33297; | |
}) | |
.value(); | |
var internalOptions = _.chain(formOptions) |
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
import thread | |
import threading | |
import requests | |
s = requests.Session() | |
s.headers.update({'Content-Type': 'application/json'}) | |
s.auth = ('USERNAME/token','TOKEN') | |
#r = s.post("http://requestb.in/1hjs6jw1", data=payload) | |
ticketCount = 4000 |
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
<?php | |
$username = '__USERNAME__'; | |
$password = '__PASSWORD__'; | |
$url = 'https://__SUBDOMAIN__.zendesk.com/api/v2/tickets.json'; | |
//$data = http_build_query($data); //use if sending data, ticket object or whatnot | |
$context_opts = [ | |
'http' => [ | |
'method' => 'GET', | |
'header' => "Content-Type: application/json\r\n" . |
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
(function() { | |
var Client = require('client.js'); | |
return { | |
requests: { | |
requestOne: function() { | |
return { | |
url: '/api/v2/tickets.json' | |
}; | |
} |
OlderNewer