Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjaminhu

  • Liftkeeper
  • Budapest, Hungary
View GitHub Profile
@Benjaminhu
Benjaminhu / aws-elasticache-bash-auto-discovery-node.sh
Last active Oct 18, 2020
AWS - ElastiCache for Memcached - bash query first node - Auto Discovery cluster node
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
@Benjaminhu
Benjaminhu / config.insert.sql
Created Aug 23, 2020
PostgreSQL self-check config insert template
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',
You can’t perform that action at this time.