View t3 total cache varnish config
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"; |
View sitemap-xml-warmup.php
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); |
View twemproxy.yaml
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
sessions: | |
listen: 127.0.0.1:6386 | |
hash: fnv1a_64 | |
distribution: modula | |
auto_eject_hosts: true | |
redis: true | |
redis_db: 6 | |
server_retry_timeout: 2000 | |
server_failure_limit: 1 | |
servers: |
View letsencrypt-auto-create-domain-tls.php
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:')); |
View iptables-route-port-to-ip.sh
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
iptables -t nat -A POSTROUTING -m mark --mark 0x0050/0xFFFFFFFF -j SNAT --to-source xxx.xxx.xxx.xxx | |
#Hex = Decimal | |
#0x0050 = 80 |
View nginx-shopware6.conf
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; |
View zwavejs2mqtt-update-from-source.sh
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 | |
systemctl stop zwavejs2mqtt | |
git fetch --all --prune | |
LATESTTAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
rm -rf node_modules package-lock.json yarn.lock .yarnclean yarn-error.log | |
rm -rf /dist/ | |
rm -rf /server/ | |
rm -rf /store/ |
View grub-install.sh
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 | |
find /dev/ -maxdepth 1 \( -name 'sd[a-z]' -o -name 'nvme[0-9]n[0-9]' \) -exec grub-install "{}" \; |
View docker-imap-devel.sh
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 | |
# running an test imap server for testing | |
docker run \ | |
--name imap-devel \ | |
-p 127.0.0.1:1143:143/tcp \ | |
-p 127.0.0.1:1993:993/tcp \ | |
-e MAILNAME=mail.example.com \ | |
-e MAIL_ADDRESS=service@example.com \ |
View magento1_fix_auto_increment.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
DELETE FROM catalog_product_entity_datetime WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity); | |
DELETE FROM catalog_product_entity_datetime WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute); | |
DELETE FROM catalog_product_entity_decimal WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity); | |
DELETE FROM catalog_product_entity_decimal WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute); | |
DELETE FROM catalog_product_entity_int WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity); | |
DELETE FROM catalog_product_entity_int WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute); | |
DELETE FROM catalog_product_entity_text WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity); |
NewerOlder