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
onlyLoggedIn = $.get("/api/v2/users/me.json", function(data){ | |
in_or_out = data.user.id; //this variable contains the data for current user's UID | |
current_path = window.location.pathname; | |
}) | |
onlyLoggedIn.done(function() { | |
if(!in_or_out && current_path != 'access/normal'){ //this is what checks to see if UID is null. If it is null, then executes the code below | |
windlow.location = "https://support.shareholderinsite.com/access/normal"; | |
} | |
}) | |
onlyLoggedIn.fail(function(){ |
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
{% if content contains "font-family:'Lucida Sans Unicode','Lucida Grande','Tahoma',Verdana,sans-serif;" %} | |
{{content | replace: "font-family:'Lucida Sans Unicode','Lucida Grande','Tahoma',Verdana,sans-serif;", "font-family: Georgia, Times, "Times New Roman", serif;" | replace: "font-size:14px;", "font-size:12px;" | replace: "color:#2b2e2f;", "color:#6b6d6e;"}} | |
{% else %} | |
{{content}} | |
{% endif %} |
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 | |
payload = '{"ticket":{"requester":{"name":"Dan Pawluk", "email":"daniel.pawluk@me.com"}, "subject":"My printer is on fire!", "comment": { "body": "I want thousands of tickets" }}}' | |
s = requests.Session() | |
s.headers.update({'Content-Type': 'application/json'}) | |
s.auth = ('{username}','{password}') | |
#r = s.post("http://requestb.in/1hjs6jw1", data=payload) | |
for x in range (0,11999): | |
try: | |
r = s.post("https://sandedboxy.zendesk.com/api/v2/imports/tickets.json", data=payload) | |
print("finished with request number:" + str(x)) |
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}','{password/token}') | |
#r = s.post("http://requestb.in/1hjs6jw1", data=payload) | |
ticketCount = 2000 |
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
{{content | replace: "<p></p>","<br />"}} | |
or even | |
{{content | replace: "<p></p>"," "}} |
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): |
OlderNewer