Sleep mode in Mac

MacOS X 的3種睡眠模式 Sleep – 保持 RAM 的內容不變 Safe Sleep – 保持 RAM 的內容不變,同時會將 RAM 的內容備份至硬碟 Deep Sleep – 將 RAM 的內容儲存至硬碟 首先,要確定一下現在設定的是哪個睡眠模式,到 Terminal 輸入以下指令: pmset -g | grep hibernatemode 它會給你一個像 “hibernatemode X” 的回應。而 X 會有幾個可能性: 0 (數字零,不是英文字母 o) – Sleep 1 – Deep Sleep 3 – Safe Sleep 如果需要變更的話,就到 Terminal 輸入以下指令: sudo pmset -a … Read more

Share

Setup multi version PHP on same server

LoadModule fastcgi_module /usr/local/Cellar/mod_fastcgi/2.4.6/libexec/mod_fastcgi.so SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1 FastCgiExternalServer /Work/domains/cgi-bin/php54-fcgi -idle-timeout 60 -host 127.0.0.1:9054 -pass-header Authorization AddHandler php54-fcgi .php Action php54-fcgi /php54-fcgi Alias /php54-fcgi /Work/domains/cgi-bin/php54-fcgi FastCgiExternalServer /Work/domains/cgi-bin/php55-fcgi -idle-timeout 60 -host 127.0.0.1:9055 -pass-header Authorization # AddHandler php55-fcgi .php Action php55-fcgi /php55-fcgi Alias /php55-fcgi /Work/domains/cgi-bin/php55-fcgi FastCgiExternalServer /Work/domains/cgi-bin/php53-fcgi -idle-timeout 60 -host 127.0.0.1:9053 -pass-header Authorization # AddHandler php53-fcgi .php Action … Read more

Share

RHEL 6/ CentOS 6: Slow SSH logins with DNS timeouts

If you’re experiencing slow logins via SSH on a Red Hat Enterprise 6 or CentOS 6 system, it’s probably caused by DNS that is taking too long to respond. Even with correct nameservers in /etc/resolv.conf, you may still find yourself stuck with slow logins. The solution is to add the following line to your /etc/resolv.conf. … Read more

Share