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
## tuning by patrickz ## | |
## inspire from https://klaver.it/linux/sysctl.conf | |
## inspire from https://gist.github.com/voluntas/bc54c60aaa7ad6856e6f6a928b79ab6c | |
fs.file-max = 209708 | |
fs.suid_dumpable = 0 | |
kernel.core_uses_pid = 1 | |
kernel.exec-shield = 1 | |
kernel.kptr_restrict = 1 | |
kernel.maps_protect = 1 |
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
# Millisecond Difference | |
# keyword: Millisecond, ms, diff, time, timediff | |
# Online Perl: https://rextester.com/l/perl_online_compiler, https://www.onlinegdb.com/online_perl_compiler | |
my $t1 = "00:01:25.652"; | |
my $t2 = "00:01:22.932"; | |
print to_milli($t2) - to_milli($t1); | |
sub to_milli { | |
my @components = split /[:\.]/, shift; |
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
## tuning by patrickz ## | |
## inspire from https://klaver.it/linux/sysctl.conf | |
## inspire from https://gist.github.com/voluntas/bc54c60aaa7ad6856e6f6a928b79ab6c | |
fs.file-max = 209708 | |
fs.suid_dumpable = 0 | |
kernel.core_uses_pid = 1 | |
kernel.exec-shield = 1 | |
kernel.kptr_restrict = 1 | |
kernel.maps_protect = 1 |
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
upstream php-pools { | |
server 203.128.86.100:9000; | |
server 203.199.86.101:9000; | |
server 203.199.86.102:9000; | |
server 203.199.86.103:9000; | |
} | |
server { | |
listen 8080; | |
server_name patrickz.iiwnz.com; |
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
log_format rt_cache '$remote_addr - $upstream_cache_status [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent"'; | |
server { | |
access_log /var/log/nginx/domain.cache.log rt_cache; | |
} | |
# OUTPUT domain.cache.log | |
# xxx.xxx.xxx.xxx - HIT [25/May/2020:07:13:49 +0700] "GET /mediacache/........." |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>IncompatiblePaths</key> | |
<array> | |
<dict> | |
<key>Application Name</key> | |
<string>Sxs Memory Card Driver</string> | |
<key>Blurb</key> |
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
curl -s --user 'api:key-##############################' \ | |
https://api.mailgun.net/v3/{YOUR-DOMAIN}/messages \ | |
-F from='Monitor <postmaster@{YOUR-DOMAIN}>' \ | |
-F to=peerasan@{DOMAIN} \ | |
-F subject='Hello' \ | |
-F text='Testing some Mailgun awesomness!' |
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
version: '3' | |
services: | |
patrickz: | |
image: patrickz/ubuntu | |
container_name: patrickz | |
restart: always | |
hostname: $HOSTNAME | |
ports: | |
- 19999:19999 | |
environment: |
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
# | |
# /etc/sysctl.conf - Configuration file for setting system variables | |
# See /etc/sysctl.d/ for additional system variables. | |
# See sysctl.conf (5) for information. | |
# | |
#kernel.domainname = example.com | |
# Uncomment the following to stop low-level messages on console | |
#kernel.printk = 3 4 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
#compile nginx | |
apt-get install build-essential libpcre3 libpcre3-dev libssl-dev | |
mkdir /root/src | |
cd /root/src | |
wget https://nginx.org/download/nginx-1.13.8.tar.gz | |
tar -xvf nginx-1.13.8.tar.gz | |
cd nginx-1.13.8 | |
./configure |