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 / index.php
Created December 6, 2022 16:04
[magento] multidomain-multistore-multistoreview setup with visible language codes

Use these snippets to setup a magento installation with the following structure:

@bst2002git
bst2002git / xenmigrate.py
Created May 3, 2022 09:27 — forked from miebach/xenmigrate.py
xenmigrate - convert a Citrix *.xva file to a XEN *.img file.
"""
Original Location: http://www.robotics.net/wp-content/uploads/xenmigrate.py
Quote from the Documentation: http://www.robotics.net/2009/06/06/converting-citrix-xva-to-xenorg-img/ :
'The file formats of the commercial and open source Xen are totally different.
The open source is a standard image file, you can mount it, fdisk it, whatever you would like.
The Citrix Xen Virtual Appliance .XVA file is quite different. It is actually a tar file
with ova.xml meta data and directories starting with Ref full of 1M files that make up the
rive volumes of the virtual image.
@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 \
@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 / 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 / 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 / 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 / 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 / git-diff-single-file
Created June 30, 2020 13:11
Git diff single file
git diff <branch>:<dir>/<filename> <branch>:<dir>/<filename>
@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 \