人造“锟斤拷”

人造“锟斤拷”

程序员的段子 “手持两把锟斤拷,口中疾呼烫烫烫”

“锟斤拷”来源于Unicode字符集和GBK字符集对同一段编码的不同解释。现在的OS和Browser都会判断字符编码,所以锟斤拷已经几乎灭绝了,想看就只能自己造锟斤拷了。

本文用Python简单示范了锟斤拷的制造过程。

Read More

AJAX HeartBeats


var Hz = 2; // tick frequency

function tick() {
  fetch('/quidditch/heartbeat')
    .then(function(response) {
      console.log(response.json());
    };
}

setInterval(tick, 1000/Hz);
The Best Useless App on Play Store

The Best Useless App on Play Store

I came across an app called “Useless” today. This is the best app I’ve ever seen on Google Play Store.

Extremely clean. I mean, no GUI, not even command line interface. It does have an app icon though, but as soon as you click on the icon it automatically closes itself.

So that’s why its name is “Useless”. Great name dude!

Bypass the ISP Restriction on Port 80

A couple of days ago, my friend Jeffery registered a new domain name. He pointed that domain to his in-house server and realized that his Internet Service Provider, Cox Communications, has blocked some common ports, namely 80 and 443, to prevent customers using their internet service to host websites.

As a result, Jeffery had to append the port number explicitly, which is not only a pain in life but also a significant impact on SEO. So he came to me for help, and I made him satisfy by using an Apache reverse-proxy server.

Read More

URL Shortening

URL Shortening

Two days ago, I had something that I would like to share with my friends, so I uploaded it to my personal file sharing server. The sharing URL was long (about 60 characters), it could be a hard time for people who want to access the file.

Shortened URL is needed, but none of the existed URL shortening services satisfy my need. I end up making my own URL shortening system using PHP+MySQL in just 5 minutes.

Read More

Get an Estimate Processing Time of USCIS Cases

Get an Estimate Processing Time of USCIS Cases

TL;DR

The USCIS’s case progress lookup tool does not give you an estimate waiting time for the decision of your case. However, by sending thousands of queries to the USCIS website, we can estimate our waiting time base on other cases’ status.

I developed this small app for my personal use. If anyone else wants to use it feel free to do that. But be aware that if you send a large amount of query in a short time, you may be considered abusing the lookup tool, or even considered performing DoS attack against the gov, and you may get IP-banned or any further punishments. You have been warned.

Read More