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
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 / 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 / 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 / php70.conf
Created December 12, 2019 14:30
example settings for php-fpm on ubuntu
[php70]
user = clive
group = webdev
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
@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
@clivewalkden
clivewalkden / 00-ioncube.ini
Created December 10, 2019 09:18
Installation process for IonCube on CentOS 7
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.2.so
@clivewalkden
clivewalkden / 0. Ubuntu 18.04 Setup for development
Last active December 11, 2019 23:01
Ubuntu setup for Magento development
# Readme
Good starting point for a development machine. This is how to setup multiple php version on a Ubuntu 18.04 instance with ondrejj setup.
@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 / queries.sql
Last active August 2, 2019 16:21
Useful Magento 2 Database queries
# Display the number of SKUs in a attribute set
SELECT eas.attribute_set_name, COUNT(cpe.sku)
FROM eav_attribute_set AS eas
LEFT JOIN catalog_product_entity AS cpe ON cpe.attribute_set_id = eas.attribute_set_id
WHERE entity_type_id = 4
GROUP BY eas.attribute_set_name
# To see if an email to a user has been successfulyy sent in the sales_order table and sales_shipment table
SELECT s.email_sent AS "Shipment Email Sent", o.email_sent AS "Order Email Sent", s.order_id
FROM sales_shipment AS s