This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_accept $webp_suffix { | |
default ""; | |
"~*webp" ".webp"; | |
} | |
location ^~ /thumbnail/ { | |
pagespeed off; | |
expires 1y; | |
add_header Pragma public; | |
add_header Cache-Control "public"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pycurl | |
import json | |
import math | |
import time | |
from io import BytesIO | |
import sys | |
import requests | |
from requests.auth import HTTPBasicAuth | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Take care of your versions, do not downgrade! | |
1. Create Docker Image first (see 01_z_docker.sh) | |
2. Stop Docker Instance (docker stop mariadb-103) | |
3. Check data directory (permissions ls -aln, keep in mind, sample "chown 999:999") | |
4. Set Permission to Root User, on System MySQL/Mariadb (see 02_mysql_root.sql), may u have to start with --skip-grant-tables | |
4. Stop System MySQL/MariaDB | |
5. Copy Data /var/lib/mysql to new place for Docker ( rsync --delete --progress --numeric-ids -axAhHPc /old/ /new/ ) | |
6. Chown /new/ Data to set the correct permission for the docker container | |
7. Start Both Container and System MariaDb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Written on Debian Based Systems | |
usage: mysql_[import|export].sh DATABASENAME | |
Splits Database in to multplie files, based on Table Names | |
schema.sql will be also created! | |
i've an my_import.cnf / my_export.cnf or exists, this files will be used as Credentails, default is the debian default file. | |
Files: schema.sql, routines_triggers.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 127.0.0.1:8080; | |
index index.php index.html; | |
server_name varnish.default.tld; | |
root /home/USER/htdocs/public/; | |
location /recovery/install { | |
index index.php; | |
try_files $uri /recovery/install/index.php$is_args$args; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# delete files older than 14 days | |
DIR=/var/www/magento/var/session/ | |
/usr/bin/find $DIR -depth -mtime +14 -exec rm -rf '{}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM eav_attribute WHERE attribute_code IN('ts_dimensions_length', 'ts_dimensions_width', 'ts_dimensions_height', 'ts_packaging_type', 'ts_packaging_id', 'ts_country_of_origin', 'ts_hs_code'); | |
DROP TABLE temando_order; | |
DROP TABLE temando_quote_collection_point; | |
DROP TABLE temando_collection_point_search; | |
DROP TABLE temando_order_collection_point; | |
DROP TABLE temando_quote_pickup_location; | |
DROP TABLE temando_pickup_location_search; | |
DROP TABLE temando_order_pickup_location; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6 | |
vcl 4.0; | |
import std; | |
# The minimal Varnish version is 6.0 | |
# For SSL offloading, pass the following header in your proxy server or load balancer: 'SSL-OFFLOADED: https' | |
backend default { | |
.host = "10.0.1.2"; | |
.port = "80"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
exit; // change url first | |
$mainXmlUrl = 'https://www.example.com/sitemap.xml'; | |
$mainXmlContent = curlUrlExec($mainXmlUrl); | |
$mainXml = @simplexml_load_string($mainXmlContent); | |
unset($mainXmlContent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$hostip = '999.999.999.999'; | |
$certName = 'mostly.server.hostname.tld'; | |
$domainsList = array( | |
'domain1.tld', | |
'domain2.tld', | |
); | |
$certdns = trim(shell_exec('openssl x509 -noout -text -in /etc/letsencrypt/live/'.$certName.'/cert.pem | grep DNS:')); |
NewerOlder