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 / 2.1.12_directory_resolver_v1.patch
Created April 10, 2018 12:44
Magento 2.1.12 Directory Resolver Patch
Index: magento/vendor/magento/framework/App/Filesystem/DirectoryResolver.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- magento/vendor/magento/framework/App/Filesystem/DirectoryResolver.php (date 1521531005000)
+++ magento/vendor/magento/framework/App/Filesystem/DirectoryResolver.php (date 1521561205000)
@@ -39,7 +39,7 @@
public function validatePath($path, $directoryConfig = DirectoryList::MEDIA)
{
@clivewalkden
clivewalkden / OHN-351-88432.patch
Last active April 27, 2018 14:32
Fix for Amasty GoogleInvisible ReCAPTCHA 2.1.4
Index: app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml (revision 4a453745274c5b47515d72496ca05465be86f6bc)
+++ app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml (revision )
@@ -73,7 +73,9 @@
tokenInput.type = 'hidden';
tokenInput.name = 'amasty_invisible_token';
@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 / 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
@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 / 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 / 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 / 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 / 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