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
@for $space from 0 through $spacing-limit { | |
$value: $space + rem; | |
} |
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
@for $space from 0 through $spacing-limit { | |
} |
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
$spacing-key: ( | |
"top": "top", | |
"right": "right", | |
"left": "left", | |
"btm": "bottom", | |
"all": null, | |
"vert": null, | |
"horiz": null | |
); |
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
$spacing-limit: 4; |
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
products = ShopifyAPI::Product.find(:all, params: { order: 'inventory_total desc', limit: 250 }) | |
process_products(products) | |
3.times do | |
break unless products.next_page? | |
products = products.fetch_next_page | |
process_products(products) | |
end |
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
{ | |
"products": [ | |
{ | |
"id": 11111, | |
"title": "Paprika" | |
}, | |
{ | |
"id": 12345, | |
"title": "Chili Powder" | |
}, |
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
'use strict'; | |
var AWS = require('aws-sdk'); | |
var sqs = new AWS.SQS(); | |
var crypto = require('crypto'); | |
exports.handler = (event, context, callback) => { | |
var client_secret = event.client_secret; | |
delete event.client_secret; | |
//calculate the hash |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "ShopifyWebhookInput", | |
"type": "object", | |
"properties": { | |
"header": { "type": "string" }, | |
"body": { | |
"type": "string" | |
} | |
} |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "ShopifyWebhookInput", | |
"type": "object", | |
"properties": { | |
"header": { "type": "string" }, | |
"body": { | |
"type": "string" | |
} | |
} |
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
#set($inputRoot = $input.path('$')) | |
{ | |
"X-Shopify-Shop-Domain": "$input.params().header.get('X-Shopify-Shop-Domain')", | |
"X-Shopify-Topic": "$input.params().header.get('X-Shopify-Topic')", | |
"X-Shopify-Hmac-SHA256": "$input.params().header.get('X-Shopify-Hmac-SHA256')", | |
"body": "$util.base64Encode($input.body)", | |
"queue": "$stageVariables.sqs_queue", | |
"client_secret": "$stageVariables.client_secret" | |
} | |