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
# Note: You will want to add the snippet: `include "pagespeed-requirement.vcl";` above your `vcl_recv` in the default.vcl file. | |
sub vcl_recv { | |
call pagespeed_capability_detection; | |
} | |
# Function derived from requirements here https://modpagespeed.com/doc/downstream-caching#ps-capabilitylist | |
# Additional detection logic for crawlers, tablet and mobile devices. | |
sub pagespeed_capability_detection { | |
if (req.http.User-Agent ~ "(?i)Chrome/[3][2-9]+\.|Chrome/[4-9][0-9]+\.|Chrome/[0-9]{3,}\.") { |
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
sub vcl_recv { | |
... | |
if (req.http.Accept-Encoding) { | |
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$") { | |
unset req.http.Accept-Encoding; | |
} elsif (req.http.Accept-Encoding ~ "gzip") { | |
set req.http.Accept-Encoding = "gzip"; | |
} elsif (req.http.Accept-Encoding ~ "deflate" && | |
req.http.user-agent !~ "MSIE") { | |
set req.http.Accept-Encoding = "deflate"; |
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
# you need these installed if you want to: | |
sudo apt-get update | |
# resize images | |
sudo apt-get install imagemagick -y | |
# compress jpg and png files | |
sudo apt-get install jpegoptim optipng | |
# compress video's | |
sudo apt-get install ffmpeg | |
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
elastic: | |
image: elasticsearch | |
haproxy: | |
image: haproxy | |
volumes: | |
- ${PWD}:/usr/local/etc/haproxy | |
links: | |
- elastic | |
ports: |
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
sysctl fs.inotify.max_user_instances=256 |
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
pct list |awk 'FNR > 1 {print "VMID=" $1 " - " $3}' |
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
Signification des variables : | |
<LOGIN> = L'utilisateur autorisé à effectuer l'action (ex: admin) | |
<PASS> = Votre mot de passe | |
<IP> = L'adresse IP de votre Home Center, il est donc nécessaire de lui attribuer une IP fixe (via la rédervation de bail de votre box / routeur Internet) | |
<ID> = identifiant du module Z-Wave (comment trouver l'ID d'un module ?) | |
name = action (ex: turnOff, turnOn, setValue) | |
<Value> = valeur (ex: niveau de variation à 39 % --> arg1=39 ) | |
Exemples : |
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
$ numactl --hardware | grep available | |
# If greater than 2 : NUMA is supported |
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
Try to add --noudevsync | |
Example : | |
lvremove -v --noudevsync <path to volume> |
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
grep -rl "OLD STRING" /etc/iscsi/nodes/ | xargs sed -i "s/OLD STRING/NEW STRING/g" |
NewerOlder