=============== ======================= settings --------------- -----------------------name (Store name) handle (Store handle, used in url) address (Nexus/physical address of store) street1 street2 stateCode stateName
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
lastSyncedOrderTimestamp = 123456789 # (utc epoch timestamp) | |
# Fetch all orders since last timestamp per 20 | |
ordersToProcess = api.orders.all( | |
since=lastSyncedOrderTimestamp, size=20) | |
# Process the order one by one | |
for order in ordersToProcess: | |
try: |
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
{ | |
"city": "Cupertino", | |
"companyName": "Apple Inc.", | |
"countryCode": "US", | |
"countryName": "United States", | |
"email": "steve@apple.com", | |
"firstName": "Steve", | |
"homePhone": null, | |
"lastName": "Jobs", | |
"middleName": "", |
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
Test1: => | |
this.test = "test". | |
Test1.prototype.testFunction: => | |
print("It works!"). | |
t = new Test1() | |
t.testFunction() | |
Test2: => |
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
String.prototype.escape = function() { | |
return this.replace(/&/gm, '&').replace(/</gm, '<').replace(/>/gm, '>'); | |
} | |
function doIt() { | |
var viewDiv = document.getElementById("highlight-view"); | |
var t1 = document.getElementById("t1"); | |
var t2 = document.getElementById("t2"); | |
var selector = document.getElementById("langSelector"); | |
var selectedLang = selector.options[selector.selectedIndex].value.toLowerCase(); |
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
int main (int argc, const char * argv[]) { | |
dispatch_queue_t waitingChairs = dispatch_queue_create("com.madebysofa.waitingChairs", 0); | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create((long)3); | |
NSInteger index = -1; | |
while (YES) { | |
index++; | |
long success = dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW); | |
if (success != 0) { | |
NSLog(@"Customer turned away %i", index); |