Skip to content

Instantly share code, notes, and snippets.

View khoimm92's full-sized avatar
🏠
Working from home

Khoi Ngo khoimm92

🏠
Working from home
View GitHub Profile
{
"value": 80000,
"unit": "m"
}
{
"value": 2.2,
"unit": "mile"
}
{
"value":30,
"unit":"km"
}
@khoimm92
khoimm92 / Testing in Magento 2.md
Created April 16, 2022 10:24 — forked from ProcessEight/Testing in Magento 2.md
M2: Notes on setting up PHPUnit and writing/troubleshooting tests in Magento 2
@khoimm92
khoimm92 / catalog_dump.sql
Last active October 1, 2021 06:23 — forked from markshust/catalog_dump.sql
magento2 dump all catalog tables
mysqldump -uUSER -p DATABASE catalog_category_entity catalog_category_entity_datetime catalog_category_entity_decimal catalog_category_entity_int catalog_category_entity_text catalog_category_entity_varchar catalog_category_product catalog_category_product_cl catalog_category_product_index catalog_category_product_index_replica catalog_category_product_index_store1 catalog_category_product_index_store1_replica catalog_category_product_index_tmp catalog_compare_item catalog_eav_attribute catalog_product_attribute_cl catalog_product_bundle_option catalog_product_bundle_option_value catalog_product_bundle_price_index catalog_product_bundle_selection catalog_product_bundle_selection_price catalog_product_bundle_stock_index catalog_product_category_cl catalog_product_entity catalog_product_entity_datetime catalog_product_entity_decimal catalog_product_entity_gallery catalog_product_entity_int catalog_product_entity_media_gallery catalog_product_entity_media_gallery_value catalog_product_entity_media_gallery_value_
@khoimm92
khoimm92 / Rails + Nginx Reserve proxy development
Created August 10, 2021 13:23
Rails + Nginx Reserve proxy development
# config/env/development.rb
config.assets.debug = false
# NGINX, etc/nginx/nginx.conf http directive
proxy_buffering off;
client_max_body_size 128M;
proxy_max_temp_file_size 0;
server_names_hash_bucket_size 256;
@khoimm92
khoimm92 / 2019-https-localhost.md
Created August 7, 2021 11:03 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@khoimm92
khoimm92 / mysql8_create_db_user
Last active August 10, 2021 13:23
MySQL 8 - create user
# create a user
mysql> CREATE USER 'khoai'@'%' IDENTIFIED BY 'khoai';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'khoai'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
# set policy
SET GLOBAL validate_password.LENGTH = 4;
SET GLOBAL validate_password.policy = 0;
SET GLOBAL validate_password.mixed_case_count = 0;
SET GLOBAL validate_password.number_count = 0;
@khoimm92
khoimm92 / my.ini
Last active June 2, 2021 13:12
MySQL config increase perfomance on XAMPP
# My note: have a look at '# Custom' sections
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
@khoimm92
khoimm92 / MDVA-25602_EE_2.2.3.composer.patch
Last active May 14, 2021 08:02
Patch for PayflowPro Checkout Issue https://github.com/magento/magento2/issues/26840. For M2.3.2 version
diff --git a/vendor/magento/module-payment/Block/Transparent/Redirect.php b/vendor/magento/module-payment/Block/Transparent/Redirect.php
new file mode 100644
index 00000000000..aeaeee7e4d2
--- /dev/null
+++ b/vendor/magento/module-payment/Block/Transparent/Redirect.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.