View aws-elasticache-bash-auto-discovery-node.sh
#!/bin/bash | |
# https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/AutoDiscovery.html | |
# | |
# ConfigurationEndpoint example: mycluster.fnjyzo.cfg.use1.cache.amazonaws.com | |
# | |
# CacheNodes Endpoint 1: mycluster.fnjyzo.cfg.0001.use1.cache.amazonaws.com | |
# CacheNodes Endpoint 2: mycluster.fnjyzo.cfg.0002.use1.cache.amazonaws.com | |
# | |
# Queries and returns the SORTED FIRST item |
View config.insert.sql
INSERT INTO | |
config (id, host, section, name, value) | |
SELECT | |
nextval('seq_config'::text), new.host, new.section, new.name, new.value | |
FROM ( | |
SELECT DISTINCT host, '<SECTION>' AS section, '<NAME>' AS name, '<VALUE>' AS value FROM config | |
) AS new | |
WHERE NOT EXISTS ( | |
SELECT notexists.host | |
FROM config AS notexists |
View qb_online_log_test.php
<?php | |
include_once ' <<< PATH_TO >>> /vendor/autoload.php'; | |
use QuickBooksOnline\API\DataService\DataService; | |
$config = [ | |
'auth_mode' => 'oauth2', | |
'scope' => 'com.intuit.quickbooks.accounting', | |
'baseUrl' => 'Development', |