Skip to content

Instantly share code, notes, and snippets.

@Tajmahal86
Tajmahal86 / sanitize-magento-database.sql
Last active October 7, 2022 11:32 — forked from zlik/sanitize-magento-database.sql
Sanitize Magento database
DROP FUNCTION IF EXISTS SANITIZE_EMAIL;
DROP FUNCTION IF EXISTS GET_RANDOM_FIRSTNAME;
DROP FUNCTION IF EXISTS GET_RANDOM_LASTNAME;
DROP FUNCTION IF EXISTS GET_RANDOM_STREET;
DROP FUNCTION IF EXISTS GET_CITY;
DROP FUNCTION IF EXISTS GET_REGION;
DROP FUNCTION IF EXISTS GET_RANDOM_ZIP;
DROP FUNCTION IF EXISTS GET_RANDOM_PHONE_NUMBER;
DROP FUNCTION IF EXISTS GET_RANDOM_COMPANY;
DROP FUNCTION IF EXISTS GET_RANDOM_CC_LAST_4;
@Tajmahal86
Tajmahal86 / cf-worker-find-replace.js
Created December 12, 2019 12:46 — forked from samuelcolvin/cf-worker-find-replace.js
Cloudflare worker to find and replace
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
// Fetch from origin server.
let response = await fetch(request)
// don't do the find and replace for png file,s should probably use content type here instead.
if (request.url.endsWith('.png')) {
return response
@Tajmahal86
Tajmahal86 / .gitlab-ci.yml
Created September 20, 2019 23:37 — forked from foklepoint/.gitlab-ci.yml
Build and Push images to GCP Container Registry with Gitlab CI
image: docker:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID
IMAGE_NAME: image_id
services:
@Tajmahal86
Tajmahal86 / lbcheck.php
Created July 16, 2018 12:29 — forked from jrodriguez-ifuelinteractive/lbcheck.php
Magento load balancer health check script
<?php
include './app/Mage.php';
try {
Mage::app();
echo gethostname();
} Catch (Exception $e) {
header("HTTP/1.0 503 Service Unavailable");
}