Quickly Scan Local Network

Recently I need to quickly scan the local network and find my other device's IP address. I do not have access to the access point, and my device does not report its IP so I cannot directly get what I want. But using another device (laptop specifically), I can quickly find out the IP address of that device.

Just simply do:

for ip in $(seq 1 254); do echo $ip; nmap -sP --max-retries=1 --host-timeout=10ms 10.0.0.$ip | grep "Host is up"; done

Since we are under the same network (assuming my IP is 10.0.0.xx), we will have very low latency (so we can set low timeout). And then this prints:

Host is up (xxxs latency).
Host is up (xxxs latency).
Host is up (xxxs latency).

That means:

  • is my gateway (access point)
  • is me
  • And of course the one left is, which is my device's IP


Mac El Capitan: Blurry Display Issue

Recently I updated my MacBook Pro to El Captain, and I don't like El Captain. One major thing I noticed is the screen went blurry. Text and everything. My Mac does not have retina display, and yet it looked fine when I still had Yosemite. Well, not saying Yosemite was good either, but it was at least better than El Captain. Found several solutions online but they didn't quite work for me. After digging into the settings, I found below method working for me to fix the blurry issue.

Continue reading Mac El Capitan: Blurry Display Issue

VPS Setup Record - SSH Security

The VPS info I have is listed in VPS Setup Record - Basics, and I have talked about how to install LAMP at VPS Setup Record - LAMP. This is a follow-up post that targets at making our VPS more secure. Remember, to use vim to edit files, you need to press i to start inserting. When you finish, type on your keyboard :wq to save and exit.

Using Strong Password

The first thing is to make the password stronger and harder to be hacked. A good password should include at least one capital letter, one number, and one symbol. It should be of length > 8, and it should NOT contain any commonly used password like what has been listed here.

Use a password manager if you are afraid of forgetting the passwords. Get a trustable password manager as listed here. Continue reading VPS Setup Record - SSH Security