:::: MENU ::::

WordPress Permalink Settings on Windows Hosting

My 2 cents: You should not host WordPress (or any script other than ASP, .NET) on Windows hosting. Try Linux. You will not be disappointed.

In case you still want to use Windows hosting for your WordPress, here is a piece of code that will save you lots of time trying to figure out how to update Permalink Settings on WordPress. You will probably got this message:

You should update your web.config now.

Open FTP and put the following into web.config file (create a new one if you can’t see it)

<?xml version="1.0" encoding="UTF-8"?>
 <rule name="wordpress" patternSyntax="Wildcard">
 <match url="*"/>
 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
 <action type="Rewrite" url="index.php"/>

That’s it. You’re welcome.

Mailbox (from Dropbox) is using Nodemailer to send your emails from Amazon AWS

So I started testing Mailbox on my iPhone and my Mac recently. It has a very elegant interface and a nice Snooze feature (basically you can tell Mailbox to put some messages back to your inbox to process at a later time – this is quite similar to a Chrome extension — Boomerang). The Mac version is beta, but the iPhone version has been around for more than a year, so I don’t think the core functions will change any time soon.

One thing I notice about Mailbox is they don’t send email using Gmail SMTP servers. Wait. Something definitely wrong here. The question is Why? The Mailbox app has granted full access to Gmail account, so why don’t they just use Gmail’s SMTP to send mail? Instead, they use Nodemailer on Amazon AWS. What the hell?

Return-Path: <>
Received: from hedwig-51.prd.orcali.com (ec2-54-85-253-165.compute-1.amazonaws.com. [])
        by mx.google.com with ESMTPSA id u2sm2020155qap.22.2014.
        for <>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 28 Oct 2014 11:54:28 -0700 (PDT)
Date: Tue, 28 Oct 2014 11:54:28 -0700 (PDT)
X-Google-Original-Date: Tue, 28 Oct 2014 18:54:27 GMT
MIME-Version: 1.0
X-Mailer: Nodemailer (0.5.0; +http://www.nodemailer.com/)

So what is the point of promoting domain keys, or DKIM? Why not send email using a legitimate and foolproof? Instead, they send users email from a fake SMTP server hosted somewhere on Amazon AWS. I don’t get their point.

Update: Thanks Sean Beausoleil and Andris Reinman for clearing that up. I would definitely prefer Amazon AWS over my own IP address to be revealed in email headers.

Screen Shot 2014-10-29 at 7.07.19 PM

How to use Tor as a socks5 proxy

Yes, you can definitely use Tor as a socks5 proxy. Never heard of it? Tor is a network that uses peer-to-peer connections to allow people securely surfing the web without leaving any trace. Originally developed by U.S. Naval Research Laboratory, now Tor is being used by millions of Internet users.

When you start a Tor session, it also comes with a socks5 proxy at port 9150 on your computer. So you can easily use any application that supports socks5 proxy under Tor with a simple configuration. Remember that Tor application need to be opened the entire time.

Again, the socks5 address for Tor proxy is : socks5://localhost:9150

Increase “a little” privacy by disabling third party cookies

Have you remember searching for something or browsing some products, and the next day Facebook recommends the same or similar type of products? Companies these days try pretty hard to track your every movement.

Cookies is one of the main tracking panel. 1+ button, Like button, social button, … in general come with a tracking code that can track your behavior on the current website, and if, by accident (but very likely) you also logged in to Google, Facebook, …, these information will be linked to your Google, Facebook, … accounts. These information will be used to track, identify and ultimately, make money.

If you fell comfortable about this, that’s completely fine. However, if you fell disturbing and disguising, here are some little tricks that can gain you a little privacy.

  1. Install AdBlock or AdBlockPlus. They are not the same, by the way.

  2. Disable third party cookies. On Safari, it’s located at Preferences -> Privacy and select “Allow from current website only”. On Chrome, it’s located at Settings -> Show advanced settings… -> Content settings… and check “Block third-party cookies and site data”. I don’t use any other browser, so I can’t tell where this option located, but it should be pretty easy to figure it out.

  3. Do-Not-Track option does not help at all, so don’t bother trying this.

Hope this make you fell a little secure.

Update on DigitalOcean’s connectivity issue with

This is the followup post of the following report:

Seems that DigitalOcean haven’t fixed anything yet. 8 days since my last post. This page https://status.digitalocean.com/ show no information regarding this issue. Other people also reported similar behavior. Come on, do something DigitalOcean!

Here is the latest benchmarks from my server to 3 different DNS provider: (Level3), (Google) and (OpenDNS). I issued 10 dig queries for google.com, each of them 10 seconds apart. 6/10 queries sent to are timed out. None of them happen for and

[email protected]:~$ for i in {1..10}; do dig google.com @ | grep 'connection timed out'; sleep 10; done;
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
[email protected]:~$ for i in {1..10}; do dig google.com @ | grep 'connection timed out'; sleep 10; done;
[email protected]:~$ for i in {1..10}; do dig google.com @ | grep 'connection timed out'; sleep 10; done;

New API: Expand URL

Today, the Internet is flooded with shortened URL. All links shared on Twitter are shortened (start with t.co). There is nothing wrong with it. I just don’t feel comfortable clicking a shortened URL without knowing where it will bring me to. How paranoid I am!

There are several reason I don’t trust shortened URL:

  1. They might contain tracking or referral code. SlickDeals heavily uses it (to make money, of course). Again, there is nothing wrong with it. They provide you a service and they deserve to get some money out of it.
  2. They might hide malicious URL, like XSS
  3. I hate them!

There are several expand URL services out there, however they just support a very limited set of URL shorten service. What I want is something more. I want to be able to track the final URL after a bunch of redirections. So I wrote this API:


For example:


Here is the API result. You will be amazed how many hops it take to the final destination:







Suggestions welcome!

beautyofnewyork.com and wigtypes.com are likely to be the same company

Normally I don’t care who owns what. However, when it come to spam email, it’s a completely different problem. I hate spam. Yes.

I setup a specific domain to act as honeypot to catch spam. This week I received more than 3 emails from wigtypes.com under the email I submitted into beautyofnewyork.com. I don’t remember giving my email to wigtypes.com and I generated an unique email every time I submit to a website. Surprise?

In their websites, there is no link to each other and they don’t claim they are the same company either. So who the hell give wigtypes.com the permission to spam me?

They share the same address, same phone number and used to be in the same server. In my opinion, they are likely to be the same, or under the same owner.

Some information:


Speedtest for your Linux server

Have you ever wonder how to test network speed (Internet specifically) of your server? Well, with GUI you can use something like speedtest.net, but how about CLI server, where you only have command-line interface? There are indeed several option:

1. Speedtest for CLI: https://pypi.python.org/pypi/speedtest-cli


easy_install speedtest-cli


2. wget

You first need to find some “big” files. My favorite is Ubuntu image:



wget -O /dev/null your_link

It will actually not save anything on your system, so you don’t have to deal with clean up stuffs after you’ve done.

DigitalOcean droplets (at least for NYC2 region) are having trouble connecting to

I noticed a noticeable degrade in network performance in my droplets. It took forever to open a connection. It happened from last week I guess. Restart server does not help. I though it’s just temporary. However today I noticed that, DigitalOcean by default assign 2 DNS servers for every droplet in NYC2 region:


Here is the result for ping from my droplet to both servers:

[email protected]:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=46 time=13.7 ms
64 bytes from icmp_req=2 ttl=46 time=13.8 ms
64 bytes from icmp_req=3 ttl=46 time=13.8 ms
64 bytes from icmp_req=4 ttl=46 time=13.8 ms
64 bytes from icmp_req=5 ttl=46 time=13.7 ms
64 bytes from icmp_req=6 ttl=46 time=13.7 ms
64 bytes from icmp_req=7 ttl=46 time=13.7 ms
64 bytes from icmp_req=8 ttl=46 time=13.7 ms
64 bytes from icmp_req=9 ttl=46 time=13.7 ms
64 bytes from icmp_req=10 ttl=46 time=13.7 ms
--- ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 13.705/13.774/13.883/0.147 ms
[email protected]:~$ ping
PING ( 56(84) bytes of data.
--- ping statistics ---
167 packets transmitted, 0 received, 100% packet loss, time 167318ms

Performing dig returns similar problem:

[email protected]:~$ dig google.com @

; <<>> DiG 9.8.1-P1 <<>> google.com @
;; global options: +cmd
;; connection timed out; no servers could be reached

As you can see, somehow my droplet won’t be able to connect to A simple switch to as main DNS resolver and thing’s back to normal.

Free course: The Complete iOS 7 Course – Learn by Building 14 Apps (was $499)

I always want to learn how use build an iOS app, and I have some idea in mind. However, I’m just lazy and procrastinating to do so. Today I found a free course (via Slickdeal) to build an iOS app, and already registered (and you should). It’s free (was $499).

Link: http://bitfountain.io/course/the-complete-ios-7-course-learn-by-building-14-apps/?couponCode=COUPON111677