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 | |
/************************************************************************* | |
* Create an RDR for every source for a shop, useful for testing. | |
* Bypasses duplicate check. | |
* | |
* Usage: php rdr_create.php [shop_id] | |
*******************************************************************************/ | |
require 'GCI/bootstrapcli.php'; |
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
// by Rafael Broering de Souza, não tão bom programador, muito menos sniper no cod | |
function checkAvailableSpots(){ | |
let xhr = new XMLHttpRequest(); | |
xhr.withCredentials = true; | |
xhr.open('GET', 'https://myroadsafety.rsa.ie/api/v1/Availability/All/5a35bbab-7f79-ee11-af86-005056b9b50c/0fed074d-c2d6-e811-a2c0-005056823b22'); | |
xhr.setRequestHeader('Accept', 'application/json, text/plain, */*'); |
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
SET @utc_offset = 6; | |
-- Orders Per Year -- | |
SELECT period_date, CONCAT("UTC-", @utc_offset) AS utc_offset, order_count, gross_revenue, ROUND(gross_revenue / order_count, 2) AS gross_aov | |
FROM ( | |
SELECT | |
COUNT(*) AS order_count, | |
ROUND(SUM(base_grand_total), 2) AS gross_revenue, | |
date_format(date_sub(o.created_at, INTERVAL @utc_offset HOUR), "%Y") AS period_date | |
FROM sales_order o |
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/sh | |
# Based on Mac setup at https://mac.iamdeveloper.com | |
# Log file | |
timestamp=$(date +%s) | |
logFile="./my-mac-setup-$timestamp.log" | |
# if true is passed in, things will reinstall | |
reinstall=$1 |