Skip to content

Instantly share code, notes, and snippets.

View epritchard's full-sized avatar

Ed Pritchard epritchard

View GitHub Profile
@epritchard
epritchard / zendesk_slack_theme.txt
Last active May 13, 2019 19:15
Zendesk Slack Theme #2
#04444d,#04444d,#68737d,#FFFFFF,#4A5664,#FFFFFF,#038153,#cc3340
@epritchard
epritchard / zendesk_slack_theme.txt
Last active May 13, 2019 19:15
Zendesk Slack Theme #1
#303E4D,#2C3849,#6698C8,#FFFFFF,#4A5664,#FFFFFF,#94E864,#78AF8F

Keybase proof

I hereby claim:

  • I am epritchard on github.
  • I am epritchard (https://keybase.io/epritchard) on keybase.
  • I have a public key ASAA611aiZx6D4Q37mWIMq6g-G7g-31ext3JbzQPQnTdPgo

To claim this, I am signing this object:

@epritchard
epritchard / sketch-font-finder.js
Last active December 11, 2015 19:41
Prints out what font each text layer uses in a Sketch 3 document
var doc = context.document,
fontUsed = '',
layerName = '';
for (var i = 0; i < doc.pages().count(); i++) {
var page = doc.pages().objectAtIndex(i),
layers = page.children();
// Loop through all children of the page
@epritchard
epritchard / gist:de87ac1702cbb4acdd15
Created March 5, 2015 16:29
Creating a Zendesk ticket using PowerShell v3.0+ and Invoke-RestMethod
$user = "email@address.com"
$pass = "yourpassword"
$uri = "https://yoursubdomain.zendesk.com/api/v2/tickets.json"
$json = '{"ticket": {"subject": "My printer is on fire!", "comment": { "body": "The smoke is very colorful." }}}'
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$pass)))
Invoke-RestMethod -Uri $uri -Method Post -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Body $json