Skip to content

Instantly share code, notes, and snippets.

View bst2002git's full-sized avatar
💭
Cafè del Mar

bst2002git

💭
Cafè del Mar
View GitHub Profile
@bst2002git
bst2002git / container-layout-names.md
Created April 24, 2019 14:48 — forked from joshfortyfour/container-layout-names.md
List of container layout names in Magento 2 Community Edition
  • actions_apply_to
  • admin.scope.col.wrap
  • adminhtml.block.report.product.lowstock.grid.container
  • adminhtml.catalog.product.set.edit.wrapper
  • after.body.start
  • alert.urls
  • assign_products_container
  • available_sort_by_group
  • backend.page
  • backend.session.activity
@bst2002git
bst2002git / magento-nginx.conf
Created June 9, 2020 09:34 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@bst2002git
bst2002git / accounts.list
Created June 10, 2020 10:03 — forked from onlime/accounts.list
imapsync script to migrate multiple IMAP accounts in a row
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW>
@bst2002git
bst2002git / mockbuild.sh
Created June 17, 2020 14:58 — forked from borisisok/mockbuild.sh
Rebuild varnish-6.2.0 Centos7 rpm packages with the help of mock.
yum -y install mock
adduser mockbuild
usermod -a -G mock mockbuild
su - mockbuild
mock -r epel-7-x86_64 --init
wget https://packagecloud.io/varnishcache/varnish62/el/7/SRPMS/varnish-6.2.0-1.el7.src.rpm
# rebuild without modification
mock -r epel-7-x86_64 --target=x86_64 \
@bst2002git
bst2002git / extract_sql.pl
Created January 26, 2021 11:03 — forked from leoromanovsky/extract_sql.pl
Extract SQL tables from database dump
#!/usr/bin/perl -w
##############################################################################
##
## Written by: Jared Cheney <jared.cheney@gmail.com>
##
## Original Template written by:
## Brandon Zehm <caspian@dotconf.net> and Jared Cheney <elph@leph.net>
##
## License:
##
@bst2002git
bst2002git / magento.vcl
Created May 28, 2021 08:08 — forked from dvershinin/magento.vcl
Magento 2 VCL file for Varnish 4.x: supports multiple stores better, allows purging arbitrary URLs https://www.getpagespeed.com/web-apps/magento/varnish-vcl-magento-2
vcl 4.0;
import std;
# The minimal Varnish version is 4.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "localhost";
.port = "8080";
.first_byte_timeout = 600s;
@bst2002git
bst2002git / rpm-digital-signature.sh
Created June 14, 2021 12:14 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
@bst2002git
bst2002git / clustercheck.socket
Created November 2, 2021 15:06 — forked from sts/clustercheck.socket
Percona XDB Clustercheck with SystemD
# /etc/systemd/system/clustercheck.socket
[Unit]
Description=MySQL Clustercheck Socket
[Socket]
ListenStream=9200
Accept=true
[Install]
@bst2002git
bst2002git / haproxy.cfg
Created November 10, 2021 09:50 — forked from junaid-malik-confiz/haproxy.cfg
Haproxy configuration to handle email alerts in case servr go down / up
backend pakkey_ser_with_auth_junaid
email-alert mailers mta
email-alert level info
email-alert from noreply@example.com
email-alert to example@example.com
option httpchk HEAD / HTTP/1.1\r\nHost:\ www.pakkey.com\r\nAuthorization:\ Basic\ cGFrYm9hcmQ6cFlzWEtlR1R3Tm85Ng==
server server1 127.0.0.1:8080 check inter 5000 fastinter 2000 fall 1 observe layer7 on-error mark-down error-limit 10
server server2 127.0.0.1:9000 check inter 5000 fastinter 1000 fall 1 observe layer7 on-error mark-down error-limit 10
errorfile 503 /etc/haproxy/maintenance.http
@bst2002git
bst2002git / glibc-2.17_centos6.sh
Created November 15, 2021 13:44 — forked from harv/glibc-2.17_centos6.sh
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \