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
<?php | |
$googleChatWebhookURL = '<YOUR-GOOGLE-CHAT-WEBHOOK-URL>'; | |
$integrationClientSecret = '<YOUR-Sentry-Settings-integration-Edit Integration-CREDENTIALS-Client Secret>'; | |
/** | |
* https://developers.google.com/chat/how-tos/webhooks#step_2_write_the_webhook_script | |
* https://developers.google.com/chat/api/guides/message-formats/basic | |
*/ |
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
// steps: | |
// 1. copy code (CTRL + A, CTRL + C) | |
// 2. go to: http://subsimple.com/bookmarklets/jsbuilder.htm | |
// 3. paste code after: "javascript:" | |
// 4. [optional] customize "pattern" | |
// 5. add name | |
// 6. push "(function...)" button | |
// 7. push "comress" button | |
// 8. drag & drop your bookmarklet name to your bookmark tab |
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
-- <TABLE NAME> replace to table name | |
-- <COLUMN> replace to column name | |
SELECT COUNT(*) INTO @exist FROM information_schema.columns | |
WHERE table_schema = DATABASE() AND table_name = '<TABLE NAME>' AND column_name = '<COLUMN>' LIMIT 1; | |
SET @query = IF (@exist <= 0, | |
"ALTER TABLE <TABLE NAME> ADD COLUMN <COLUMN> MEDIUMTEXT NULL", | |
"SELECT 'COLUMN EXISTS: <TABLE NAME>.<COLUMN>' AS column_exists_info" | |
); |
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
javascript: | |
// steps: | |
// 1. copy code | |
// 2. go to: http://subsimple.com/bookmarklets/jsbuilder.htm | |
// 3. paste code after: "javascript:" | |
// 4. [optional] customize "removeRegexp" | |
// 5. add name | |
// 6. push "(function...)" | |
// 7. push "comress" | |
// 8. drag & drop your bookmarklet name to your bookmark tab |
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
#!/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 |
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
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 |
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
<?php | |
include_once ' <<< PATH_TO >>> /vendor/autoload.php'; | |
use QuickBooksOnline\API\DataService\DataService; | |
$config = [ | |
'auth_mode' => 'oauth2', | |
'scope' => 'com.intuit.quickbooks.accounting', | |
'baseUrl' => 'Development', |