This file contains hidden or 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
| #!/usr/bin/env bash | |
| apt-get build-dep php7.0 | |
| mkdir ~/php7-amd64 && cd ~/php7-amd64 | |
| apt-get source php7.0 | |
| cd php7.0-7.0.19 | |
| # rename packages to *-zts |
This file contains hidden or 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
| ### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org | |
| ### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works) | |
| yum -y groupinstall 'Development Tools' | |
| yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
| OPENSSL="openssl-1.0.2l" | |
| NGINX_VERSION="1.13.5-1" | |
| NJS_VERSION="1.13.5.0.1.13-1" |
This file contains hidden or 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 | |
| /** | |
| * @param $baseUrl - non protected part of the URL including hostname, e.g. http://example.com | |
| * @param $path - protected path to the file, e.g. /downloads/myfile.zip | |
| * @param $secret - the shared secret with the nginx server. Keep this info secure!!! | |
| * @param $ttl - the number of seconds until this link expires | |
| * @param $userIp - ip of the user allowed to download | |
| * @return string | |
| */ |
This file contains hidden or 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_user_agent $url { | |
| ~BPC.[4] /eset_upd/v4/update.ver; | |
| ~BPC.[5] /eset_upd/v5/update.ver; | |
| ~BPC.[6] /eset_upd/v6/update.ver; | |
| ~BPC.[7] /eset_upd/v7/update.ver; | |
| } | |
| server { | |
| server_name site.ru www.site.ru; |
This file contains hidden or 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/sh | |
| # Usage 1: | |
| # optimize-images.sh /images/dir | |
| # | |
| # Usage 2: | |
| # cd /images/dir | |
| # optimize-images.sh | |
| EXTENSIONS="jpe?g" |