Skip to content

Instantly share code, notes, and snippets.

Avatar

Colin Loretz colinloretz

View GitHub Profile
@colinloretz
colinloretz / gist:b5c0ed3b1facd8f1f762eb2e17babb36
Last active Mar 25, 2021
Shopify Get Customer by id with payment methods
View gist:b5c0ed3b1facd8f1f762eb2e17babb36
query {
customer(id: "gid://shopify/Customer/XXXXXXXXXX") {
email
firstName
lastName
paymentMethods(first: 5) {
edges {
cursor
node {
id
View gist:c905cfe83ffc2e04f865
GET https://api.numerousapp.com/v1/metrics
@colinloretz
colinloretz / mars.json
Created Apr 9, 2015
Mars Weather Data
View mars.json
{
"report": {
"terrestrial_date": "2013-05-01",
"sol": 261,
"ls": 310.5,
"min_temp": -69.75,
"min_temp_fahrenheit": -93.55,
"max_temp": -4.48,
"max_temp_fahrenheit": 23.94,
"pressure": 868.05,
@colinloretz
colinloretz / gist:1ceb2102778ded63b0bb
Created Dec 10, 2014
num_queryArguments for multiple params
View gist:1ceb2102778ded63b0bb
- (NSDictionary *)num_queryArguments
{
NSMutableDictionary *returnArgs = [NSMutableDictionary dictionary];
NSString *query = [self query];
NSArray *strURLParse = [query componentsSeparatedByString:@"?"];
for(int j=0; j < [strURLParse count]; j++) {
NSArray *arrQueryString = [[strURLParse objectAtIndex:j] componentsSeparatedByString:@"&"];
View AwaitingReply.gs
function label_awaiting_reply() {
var emailAddress = Session.getEffectiveUser().getEmail();
Logger.log(emailAddress);
var EMAIL_REGEX = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-]+\.[a-z\.A-Z]+/g;
var label = GmailApp.createLabel("AwaitingReply");
var d = new Date();
d.setDate(d.getDate() - 7);
var dateString = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
threads = GmailApp.search("in:Sent after:" + dateString);
for (var i = 0; i < threads.length; i++)
View gist:1473242
+
.`. .`. +
` + `
_,._ _,._ ,--------.
`-,-`-,-.`-,-`-,-.`._,'| ` `.` |\`-/|
`-.-`-,-.`-.-`-,-.`-.-'|`. . `( ^ . ^)
`-.-` `-.-` `-.-'',,---,,`-,,'`
+
.`. .`.
` `
View unbounce-webhook-email.php
<?php
// This is a sample PHP script that demonstrates accepting a POST from the
// Unbounce form submission webhook, and then sending an email notification.
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}