Recently I created a "File Drop" folder that allows anyone who owns the link to upload files. However, I want to drop/upload files programmatically. Luckily, there is an undocumented way to do so.
Tag: tip
Samsung Galaxy S8 Update Issue with Project Fi
I did not find online anyone mentioning about this. But after I update my S8 to Android Oreo (8.0, the latest system version), my Project Fi lost its data connections. I found this issue after I left home taking an Uber. I was standing outside and there was no WiFi. My S8 behaved as usual… Continue reading Samsung Galaxy S8 Update Issue with Project Fi
Convert png to eps with minimal size
Every time I try to convert from png to eps, through commands like convert or via online converters like here, the eps file is always super large. For example, a 50KB png after conversion becomes 3MB eps. Then I figured a way to reduce the file size. It is still through convert command, but with… Continue reading Convert png to eps with minimal size
Unlock Samsung Gear S2/S3 (AT&T)
Not sure if T-mobile follows the same procedure but I find the original solution here for S3 Frontier (AT&T). It apparently works for S2 also. I have no idea why AT&T does not release this and claims they cannot unlock wearables (in 2016). Here is a log of the procedure, verified by both XDA folks and… Continue reading Unlock Samsung Gear S2/S3 (AT&T)
Upgraded to OSX 10.12 and many problems pop up
There are many things going on wrong after I upgraded to OSX 10.12. For example, the Latex issue logged here. Here I plan to log stuff that went wrong and how to fix them. As I kept updating, it could be long.
Quickly create a large dummy file
Use the following to create a large dummy file containing all zeroes. Below we assume 1GB size file. You can change it to something else. dd if=/dev/zero of=bigfile count=1 bs=1 seek=$((1024 * 1024 * 1024 - 1)) Learned from here.
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:
1 Host is up (xxxs latency). 2 3 ... 61 Host is up (xxxs latency). ... 206 Host is up (xxxs latency). ...
That means:
- 10.0.0.1 is my gateway (access point)
- 10.0.0.61 is me
- And of course the one left is 10.0.0.206, which is my device's IP
✌️
Weird issue fixed: favicon not showing up
So I encounter this weird issue where favicon.ico does not show up on my browser. No matter if I cleared my browser or restarted the browser, it doesn't work. And the trick below saves me some troubles.