This file contains hidden or 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 | |
$location_id = 'location_id'; | |
$api_instance = new SquareConnect\Api\V1ItemsApi(); | |
$body = array( | |
'name'=>'Pots', | |
'description'=> 'Containers for gardening', | |
'variations'=> array( | |
array( | |
'name'=>'Large', | |
'price_money'=>array( |
This file contains hidden or 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 | |
echo "Hello World" | |
?> |
This file contains hidden or 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(__DIR__ . '/vendor/autoload.php'); | |
// Configure OAuth2 access token for authorization: oauth2 | |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('xxx'); | |
$api_instance = new SquareConnect\Api\CatalogApi(); | |
$body = new \SquareConnect\Model\UpsertCatalogObjectRequest( | |
array("idempotency_key"=>uniqid(), | |
"object"=>array( |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Square Register API Web example</title> | |
<style type="text/css"> | |
body { | |
background-color: #DDD; | |
margin: 10px; | |
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; |
This file contains hidden or 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 | |
$location_id = 'XXXXXXXX'; | |
$item_id = "XXXXXXXXX"; // string | The item's ID. | |
$api_instance = new SquareConnect\Api\V1ItemsApi(); | |
try { | |
$result = $api_instance->retrieveItem($location_id, $item_id); | |
print_r($result); | |
} catch (Exception $e) { | |
echo 'Exception when calling V1ItemsApi->retrieveItem: ', $e->getMessage(), PHP_EOL; | |
} |
This file contains hidden or 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 | |
$api_instance = new SquareConnect\Api\CatalogApi(); | |
$object_id = "XXXXXX"; | |
$include_related_objects = true; | |
try { | |
$result = $api_instance->retrieveCatalogObject($object_id, $include_related_objects); | |
print_r($result); | |
} catch (Exception $e) { | |
echo 'Exception when calling CatalogApi->retrieveCatalogObject: ', $e->getMessage(), PHP_EOL; | |
} |
This file contains hidden or 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
#!/bin/bash | |
# a script to make great time lapses from the narrative clip. | |
# copy files to safe place, iterate through with ls-v, use spinners | |
# find a .mp4, rename the files, make a timelapse with the files (use spinners and headless ffmpeg) | |
# And then turn into ts files? delete videos in progress? Less ram/storage better! | |
#convert videos to better files with ffmpeg | |
# concatenate all the ts files, be sure to specify codec | |
# clean up. |
This file contains hidden or 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
# Flags that we are using certbot on a different computer than the host. | |
manual | |
# Tells certbot where we want to store the ouput of respective processes | |
config-dir = ./config | |
logs-dir = ./logs | |
work-dir = ./work | |
#Specifies the domains that we want to create certificates for. | |
domains = example.com,www.example.com |
This file contains hidden or 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
echo "writing file to ../letsencrypt/$CERTBOT_TOKEN.txt" | |
echo $CERTBOT_VALIDATION > ../letsencrypt/${CERTBOT_TOKEN}.txt | |
gcloud app deploy ../app.yaml --project=xxx --quiet; |
This file contains hidden or 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
POST/v2/locations/LOCATION_ID/orders | |
{ | |
"idempotency_key": "86ae1696-b1e3-4328-af6d-f1e04d947ad120", | |
"reference_id": "my-order-001", | |
"line_items": [ | |
{ | |
"catalog_object_id": "7WBTDGGMYEJYU2GINA7HHKO2", | |
"note": "catalog-note", | |
"quantity": "1", | |
"discounts": [ |