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
rm /var/www/vhosts/carocci.it/httpdocs/cache_status.txt | |
sleep 10 | |
sessionid=$(curl -s -A 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' --data-raw 'username=vmXXXX&password=YeXXXX' -X POST 'https://cs.cloudcenter.seeweb.it/accounts/login' -c - | grep 'sessionid' | awk '{print $NF}') | |
csrftoken=$(curl -s 'https://cs.cloudcenter.seeweb.it/dashboard' -H 'Cookie: sessionid='$sessionid -H 'Referer: https://cloudcenter.seeweb.it/' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' -c - | grep 'csrftoken' | grep -v jQuery | awk '{print $NF}') | |
curl -s -A 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' -H 'Cookie: sessionid='$sessionid'; csrftoken='$csrftoken -H 'X-CSRFToken: '$csrftoken -H 'Referer: https://cs.cloudcenter.seeweb.i |
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
# WebP Express rules | |
# -------------------- | |
location ~* ^/?wp-content/.*\.(png|jpe?g)$ { | |
add_header Vary Accept; | |
expires 365d; | |
if ($http_accept !~* "webp"){ | |
break; | |
} | |
try_files | |
/wp-content/webp-express/webp-images/doc-root/$uri.webp |
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
if ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) { | |
$http_x_headers = explode( ',', $_SERVER['HTTP_CF_CONNECTING_IP'] ); | |
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0]; | |
} |
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
yum install epel-release -y | |
yum install jpegoptim -y | |
yum install optipng -y | |
for i in `ls --hide='system' /var/cpanel/users/`; do | |
find /home/$i/ -type f -iname '*.jpg' -print0 | xargs -0 -n4 -P5 sudo -H -u $i jpegoptim -s | |
find /home/$i/ -type f -iname '*.jpeg' -print0 | xargs -0 -n4 -P5 sudo -H -u $i jpegoptim -s | |
find /home/$i/ -type f -iname '*.png' -print0 | xargs -0 -n4 -P5 sudo -H -u $i optipng -o1 -strip all | |
sleep 5 |
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
yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc -y | |
wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz | |
tar -xzvf megatools*.tar.gz | |
cd megatools* | |
./configure | |
make | |
make install |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDtYAMj6ZcTAsgLCgHz2TnAl0lbyq/iU3msaXJaT7PfSVQYX8qQZ5tmycumEvwkgHG0bKxF6tmjuNYkSN4jWQX8McPllneDHoEwlw7nyx9lv05PsL+qziG/4MR81lETowvBbvhXN82MnbmjlV7eGuM3eyDL5v5JGxKBsPtNHTsXXfy9h5CIBLQBFbRHX9glGV/gs3wSdiw/iRAsFJ+g4YQCfdzPURwYis8shmKHeotUirlLURa7Q6PctnkTJ3sTA52aKy/3zgPtFj29Ky58yOqN/v1KIy1iBbhEzIXk7RhFN6QDsGrirL2uwBgGIOgFjg2+D2Pa8JbNLQ8KazH9qomH luka@paunovic |
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
window.lazyprocess22 = 'yes'; | |
jQuery(window).on('resize scroll', function() { | |
if (jQuery('.et_pb_section_3').isInViewport()) { | |
if (window.lazyprocess22 == 'yes') { | |
window.lazyprocess22 = 'no'; |
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
jQuery.fn.isInViewport = function() { | |
var elementTop = jQuery(this).offset().top; | |
var elementBottom = elementTop + jQuery(this).outerHeight(); | |
var viewportTop = jQuery(window).scrollTop(); | |
var viewportBottom = viewportTop + jQuery(window).height(); | |
return elementBottom > viewportTop && elementTop < viewportBottom; | |
}; |
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
location ~* ^.+\.(css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ { | |
expires max; | |
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
location ~* ^.+\.(css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ { | |
expires max; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
} |
NewerOlder