Skip to content

Instantly share code, notes, and snippets.

View clivewalkden's full-sized avatar
🤓
Focusing on @golang & @kubernetes

Clive Walkden clivewalkden

🤓
Focusing on @golang & @kubernetes
View GitHub Profile
@clivewalkden
clivewalkden / README.md
Last active August 31, 2023 11:12
Magento 2 Clear all tables after testing is complete.

Magento 2 Clear DB for Launch

Includes a basic clear.sql file for removing orders and customers and resetting the base invoice, order, shipment and creditmemo id's back to 0

A customweb_sagepay.sql for clearing out test SagePay orders from the customweb module.

A invoice_starting.sql for setting the start id's of invoices, orders, shipments and credit memos.

A mollie.sql for clearing out test orders using Mollie payment module.

@clivewalkden
clivewalkden / README.md
Created August 18, 2023 09:30
CustomWeb Opayo Magento 2 PHP 8.2 Patch

Patch notes

Required to be added for PHP 8.2 sites. Without this patch the site errors at checkout steps.

@clivewalkden
clivewalkden / centos-resize.sh
Last active May 19, 2023 12:44
Google Cloud Resize a disk (CentOS & Ubuntu)
# Before this is run you need to change the disk size on the cloud (or via cli)
# Get the partition and device information
df -h
# Get the block size of the device and any partitions
sudo lsblk
# Make sure you have the tools to resize a drive
sudo yum -y install cloud-utils-growpart
@clivewalkden
clivewalkden / centos-7-package.sh
Last active September 30, 2022 03:13 — forked from fernandoaleman/gist:5083680
How to add VirtualBox Guest Additions for vagrant into minimal install of Cent OS 7.
# Start the old vagrant
$ vagrant init centos-7
$ vagrant up
# You should see a message like:
# Installing Virtualbox Guest Additions 5.0.20 - guest version is unknown
$ vagrant ssh
vagrantup:~$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
vagrantup:~$ sudo yum -y update
@clivewalkden
clivewalkden / backup.conf
Last active May 3, 2022 10:02
GCP Packer default nginx config
# Configuration file for db-sync (https://github.com/clivewalkden/bash-magento2-db-sync)
remote_host={{remote_host}}
remote_domain={{remote_domain}}
remote_port={{remote_port}}
remote_username={{remote_username}}
remote_magento_dir={{remote_magento_dir}}
remote_backup_dir={{remote_backup_dir}}
remote_shared_deployment_dir={{remote_shared_deployment_dir}}
local_backup_dir={{local_backup_dir}}
@clivewalkden
clivewalkden / setup.sh
Last active March 10, 2021 09:49
How to add swap to CentOS 7
# Check if we already have swap
swapon -s
# Second Check
free -m
# Check available space
df -h
# Generate the file (4GB)
@clivewalkden
clivewalkden / motd.sh
Created September 23, 2020 22:33 — forked from mikecentola/motd.sh
MOTD for Centos / RHEL
#!/bin/bash
# This motd.sh file is to be placed in /etc/profile.d/ to be executed upon
# successful login.
# -------------------------------------------------------------------------
# Copyright (c) 2018 Mike Centola (mikecentola.com)
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@clivewalkden
clivewalkden / block-index.patch
Created March 27, 2020 10:16
UB Migrate Data Pro
Index: magento/app/code/Ubertheme/Ubdatamigration/Block/Index.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- magento/app/code/Ubertheme/Ubdatamigration/Block/Index.php (date 1585223427069)
+++ magento/app/code/Ubertheme/Ubdatamigration/Block/Index.php (date 1585223427069)
@@ -70,11 +70,17 @@
public function getToken() {
$token = '';
@clivewalkden
clivewalkden / 00-ioncube.ini
Last active December 12, 2019 16:35
Ubuntu IonCube PHP 7.2
zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so