Categories
Misc Quotes

4 questions you should always ask your doctor

  1. Is this really necessary?
  2. What are the risks?
  3. Are there other options?
  4. What happens if I don’t do anything?

Christer Mjåset TEDxOslo

Categories
Images

Nice Photos

 

Categories
Tech Tips

How to find files modified more than X days ago

search

Find files modified more than 48 hours ago:

$ find /path -mtime +1

Find files modified more than n=90 days ago (cutoff by the hour, not the day).

$ find /path -mtime +89

Note the +(n-1) in command. Many online articles got this wrong by simply putting +90.

Categories
Tech Tips

How to turn off Facebook’s “Do you know so-and-so” (and other) notifications on Android

  1. Open the Facebook app
  2. Click on the hamburger button (displayed as ≡) near the top-right corner of screen
  3. Scroll down and tap on Account Settings > Notifications
  4. Under the “How You Get Notifications” section, select “Mobile”
  5. Tap on the notifications that you want to turn off
Categories
Dharma Quotes

見緣起即見法,見法即見佛

 
從前,有一次,佛從忉利天來下人間,人間的佛弟子,都歡喜的去見佛。依次序,比丘應在比丘尼之先,但蓮華色尼為了先得見佛,即化作轉輪王,走在最前面。他以為最先見佛了,但佛對他說:不是你先見,『須菩提先見我身』。原來,那一次,須菩提沒有參加迎佛的勝會。當眾人去見佛時,他想:佛曾說:見法即見佛,我何不正觀法相!於是他就觀察諸法的從緣生滅,從無常為門而悟入諸法無性空,徹見了如來法身。

—— 印順法師《般若經講記》 (Source)


其次,《增一阿含經》有一段記載:

一時佛至忉利天為母說法,三月之後返回閻浮提僧迦尸池水側,蓮華色比丘尼搶先來到,欲先見佛;爾時尊者須菩提在羅閱城耆闍崛山中,於一山側縫補衣裳,原亦欲往問訊禮拜如來,再一思維:一切諸法皆悉因緣和合,沒有常恆性(無常),沒有獨存性(無我),是謂「緣起」。見緣起即見法,見法即見佛。於是不起於座,默思諸法之無常、無我性。當蓮華色因先見佛而雀躍之時,佛告大眾:「須菩提先見我身。」

這就是後來《金剛經》所說「凡所有相,皆是虛妄,若見諸相非相,即見如來」的深意。

—— 昭慧法師 · 無常、無我,大悲、大願——佛指舍利的啟發 (Source)

Categories
Tech Tips

How to prevent accidental keyboard input in a Linux terminal

In a multi-monitor setup, sometimes I type in the wrong window without knowing and end up spamming WeeChat IRC.

To prevent that, I now use gnome-terminal and turn on “Read-Only” mode to disable typing. This useful feature is, however, not available in other terminals. Please share in the comments if you know of alternatives.

2018 Mar 27 UPDATE: xfce4-terminal also has a “Read-Only” mode.
2018 May 7 UPDATE: konsole too.

Categories
Tech Encounters

WOT probes my web access history

I loaded a private web address using Chromium with the extension WOT v2.6.0 (by www [dot] mywot [dot] com).

Hours later, some unknown ec2-x.compute-x.amazonaws.com IP probed my private address.

I repeated the same test with another unique private URL, and hours later, the same ec2 IP loaded that private URL again.

Then I disabled the WOT extension in Chromium and repeated the same test with a new unique private URL. No more probes.

Bad WOT! You should just be checking whether a link has bad reputation instead of loading the web addresses I’ve visited.

Uninstalled.

Categories
Tech Tips

How to change sshd default port on firewalld

Instead of messing around with the ports directly with RHEL7/CentOS7 firewall-cmd, I’ve decided to update the port number in the ssh.xml service file instead. Think it’s cleaner this way.

For example, here are the steps to change sshd port from the default 22 to 9876:

1. Make a copy of the default ssh service file:
cp /usr/lib/firewalld/services/ssh.xml /etc/firewalld/services/

2. Inspect current firewall settings
iptables -nL | grep -e 22 -e 9876
ACCEPT     tcp  —  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

3. Edit /etc/firewalld/services/ssh.xml to change port number
From: <port protocol=”tcp” port=”22″/>
To: <port protocol=”tcp” port=”9876″/>

4. Change /etc/ssh/sshd_config port to 9876

5. Restart sshd
systemctl restart sshd

6. Notice that sshd now listens on new port
netstat -punta

7. Reload firewalld, which will pick up the new port in ssh.xml
firewall-cmd –reload

8. Inspect new firewall settings, notice port changed
iptables -nL | grep -e 22 -e 9876
ACCEPT     tcp  —  0.0.0.0/0            0.0.0.0/0            tcp dpt:9876 ctstate NEW

9. Test

Categories
Tech Tips

Cannot download HP printer driver using Chromium/Firefox on Linux

Problem: Somehow the “Software & Drivers” option does not show up when I try to download the printer driver of HP LaserJet Pro MFP M127fn from the official HP website using Chromium, Firefox, Opera and most web browsers on Linux.

Solution: Use Konqueror on Linux or another OS.

Categories
Tech Tips

Wordfence update failed: Could not copy file

If your Wordfence is not updating to newer version properly due to “Could not copy file” error, try deleting the leftover folder “wordfence.tmp” from /path-to-webroot/wp-content/upgrade/wordfence.tmp, then try again.