Postfix – Only Allow Whitelisted Recipient Domains

We have a test environment with real user data, and during testing, the servers may send emails to these real users. But we definitely don’t want our users to receive those test emails, since they’ll be totally confused and get a bad feeling about our service. Yet we want the emails sent to our company’s domain to be delivered successfully, so we can test with our work email address.

One solution is update the database and change all user emails to dummy ones. However this requires one more step each time the development database is refreshed with real data.

Continue reading Postfix – Only Allow Whitelisted Recipient Domains

Evernote Mac Needs Improvements

Evernote Mac upgrading

To the left is a screenshot I took when Evernote Mac client was upgrading itself. Quite stupid isn’t it?

It also bothers me that searching is not so convenient. I don’t know if developers of this software actually use it or not. When I need to search for something, I need to use mouse to set focus to the search box, and then enter the phrase I want to search.

When I want to stop searching and clear the search box, I have to move my mouse and click the cross icon to the right of the search box.

I mean, for productivity’s sake, why not give it a shortcut key? In Adium, I can easily search contacts by directly typing, and stop searching by pressing ESC. That’s the key feature that allures me even if it’s less stable than the Messenger made by Microsoft.

I Don’t Need 3G on Kindle

Initially I wanted to buy a WiFi-only Kindle, but a friend encouraged me to buy the 3G version – why not spend $50 for life-time free 3G? It seemed so attractive, that I was convinced by him and chose the 3G version.

A year has passed since I got the 3G Kindle. How often did I use 3G on it? I think the total time I had 3G turned on must be less than one hour. Most times I turned the wireless network off so that the battery could last a little longer. When I have to access the network, I was always in a location with Wi-Fi wireless. Maybe that’s because I don’t travel a lot.

Many people are fond of the browser built in with Kindle and they think they get an unlimited data plan for free! But the browser has always been marked as “experimental” and it seems Amazon has no plan to make it usable in “production”. It’s by nature limited by the E-Ink display. Web pages must be specifically designed to make them readable in Kindle but few web sites are doing this. And free 3G web browsing is only available on Kindle 3. With the latest generation of Kindle (no keyboards), “Experimental web browsing (outside of Wikipedia) on Kindle Touch 3G is only available over Wi-Fi.

If you buy a book from Amazon (even if it costs you $0, free), it can be downloaded via 3G. But if you email a document to Amazon, it won’t be downloaded via 3G unless you pay the data fee.

Actually Wi-Fi is ubiquitous today. If I’m going to get another Kindle, I won’t buy the 3G version. But for people who will stay in a special area where Wi-Fi is not available but there is cellular network coverage, 3G is desirable.

Django prepopulated_fields not working?

Note – Just skip to the end of this article if you’re eager to find out the reason.

Yesterday I found that Django even had a special field SlugField for post slugs. I’m just starting with Django so there’s a lot I don’t know yet. It’s cool that they also designed a “prepopulated_fields” property in the admin module.

class ArticleAdmin(admin.ModelAdmin):
    prepopulated_fields = {"slug": ("title",)}

Continue reading Django prepopulated_fields not working?

Writing Greasemonkey User Scripts for Firefox and Chrome

Greasemonkey was initially only a Firefox extention but due to its popularity it’s quickly adopted by major browsers. Since Opera takes a very small market share, here on the topic of cross browser user scripts, I’m only going to talk about Chrome and Firefox. As for Internet Explorer, I just don’t like it.

Now Chrome doesn’t need an extension to enable user scripts. It had the functionality built in. But the way it handles the scripts is quite different from Firefox’s. At first when I wanted to test if my Greasemonkey script worked in Chrome, I tried to figure out where it stored the script. That’s the way I always do in Firefox – just right click on a user script and edit, save and refresh to see it in effect right away.

Continue reading Writing Greasemonkey User Scripts for Firefox and Chrome

“Google Reader Unread Count in Gmail” Script Again

After Google unveiled its “plus” social network to combat Facebook, its whole product line got an interface update and my “Google Reader Unread Count in Gmail” Greasemonkey script no longer worked. So it’s time to update it again.

Install latest version.

Google Reader Unread Count in Gmail

Now it seems Google hides Reader link in the “more” drop down. Or at least it’s the situation in my account. Anyway, If that’s the case, my script will swap it with the last one in the menu bar.

What’s more, It now supports Chrome! Day by day I’m getting more used to Chrome and discarding Firefox. And looking at the market share data, Chrome is also making great progress.