今天得到的教訓是,一個不會寫 Ruby 的人,就不應該去寫生產環境的 Ruby …
原寫法
for ip in ec2_urls do
puts("#{ip}")
end
$ ruby api.rb
10.24.1.177
10.24.2.93
10.24.1.177
10.24.2.93
指正後
ec2_urls.each do |ip|
puts("#{ip}")
end
$ ruby api.rb
10.24.1.177
10.24.2.93
HOW TO UPDATE OPENSSL 1.1.0 IN CENTOS 6.9/7.0
https://linuxscriptshub.com/update-openssl-1-1-0-centos-6-9-7-0/
發這篇文章的用意僅為參考,現在最新版本已經是 1.1.1b 了,不要裝個 1.1.0 上去鬧笑話…
DiscuzX 3.4 登录接口爆破密码问题
Upgrading simple shells to fully interactive TTYs
Every pentester knows that amazing feeling when they catch a reverse shell with netcat and see that oh-so-satisfying verbose netcat message followed by output from id.
And if other pentesters are like me, they also know that dreadful feeling when their shell is lost because they run a bad command that hangs and accidentally hit “Ctrl-C” thinking it will stop it but it instead kills the entire connection.
…
https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/
A better way to run PHP-FPM:
Why you should prefer the ‘ondemand’ Process Manager instead of ‘dynamic’
MySQL – Convert all Tables of one or more Database(s) from MyISAM to InnoDB and vice-versa
踩了個挺沒面子的坑,分享一下。
給某網站做的 CDN 服務器,不知道為什麼複製粘貼的配置全是 proxy_cache_valid any 30d;
然後就一直有一些不大不小的問題,比如明明存在的文件卻變成了 404 …
今天終於搞懂了 proxy_cache_valid 原來是靠狀態碼緩存的(我一直以為 proxy_cache_revalidate on; 不會讓這種問題發生 ),也就是還未上傳的文件被訪問了一次的話 30 天就別想訪問了 Orz…
現在改成這樣了:
proxy_cache_valid 200 30d;
proxy_cache_valid 404 1m;
How to Upgrade Kernel on CentOS 7
服務器已搬遷至阿里雲香港(國際版)
幾個亮點:
1. 全面使用 ECC 384 bits SSL 證書。
2. 更加 偷懶 創新的 Linux 用戶權限管理。
(詳見 https://github.com/richardevs/self-written-bash-script )
3. 改用 acme.sh 管理 Let’s Encrypt 訂閱。
4. 更細分更容易管理的 Nginx 配置寫法。