10th December, 2008
I started using OpenDNS again for the first time since Google released Chrome.
When I ran Chrome, I noticed a curious little quirk, Chrome was ignoring OpenDNS’ shortcuts and auto typo correction. I whipped out wireshark and took at what was going on.
By default, every time you enter a character into Chrome’s toolbar it fetches results from google.com/complete/search. Since google knows about every single website, Chrome is able to decide if you’re typing a valid domain without querying DNS. That is, it’s actually redirecting you to a google search results page at the HTTP layer, before your request queries any DNS info.
While it’s not neccessarily a bad way of doing things, it is somewhat annoying.
Luckily, google actually built a great product!
This feature is totally customizable.
To turn it off; pull up “options” under the wrench menu, click the “under the hood tab and uncheck “show suggestions for navigation errors.”
Chrome dns Google opendns in Apps Google HowTo Tips
28th May, 2008
This might be pretty obvious to anyone with basic math skills. It took me a few minutes to figure out, so I thought I’d share with the world. To round a unix timestamp to the previous midnight (UTC) use the following function:
function unixtime_round_to_midnight ($t) {
return $t – ($t%86400);
}
Thanks to Ian for pointing out my math ineptitude.
math php time in HowTo Tips
14th May, 2008
Update October 2010: These instructions are no longer valid. Take a look at voyageurs60′s comment.
If you’ve ever tried to delete more than 20 contacts in gmail, you might have noticed an error message informing you that you’re only allowed to delete 20 contacts at a time.
I don’t really think of Google as a company that puts abitrary limits on features. Who knows why they decided upon this limit.
Suppose you’ve accidentally quadrupled your contacts list in some sort of import mishap and you just want to start over. There’s a fairly simple – if somewhat non-intuitive – workaround for this. Click the “older version” link it the top navigation bar (http://mail.google.com/mail/?ui=1). This will allow you access to the old contacts list interface.
From there:
1) click “all contacts” tab
2) scroll down to the bottom, select “all” (no idea why this option is not at the top of the interface)
3) Delete!
email gmail in Google HowTo
21st March, 2008
The linux `find` command is very powerful, it has tonnes of switches and options that I’m not terribly familiar with. Even though I’ve been a LAMP developer for over 5 years, I don’t work on the command-line too often. Yesterday I ran into a problem that I had never tried to resolve before. I was working on a large project on a development server and I had some updates I wanted to push to the production server, but I had lost track of which files I had updated. I dug through the find manual for a few minutes and discovered the `-newer` flag, from man “File was modified more recently than file.” With this flag you can generate a list of files that are newer than a given file. If I set file to a file I knew had been updated before my last set of changes, I could pull a list of patch files.
find /path/to/project/ -newer /path/to/project/last-archive.tgz
After some more digging and trial and error I found the proper syntax for rolling up all these files into a nice little patch archive:
tar -czvf patch-20070321.tar `find /path/to/project/ -newer /path/to/project/last-archive.tgz -print`
linux server in HowTo
20th March, 2008
Firefox 3 has an annoying new URL bar that takes up about 75px in screen real estate for each auto-completed URL. It’s referred to as richResults in about:config. In the previous beta releases you were able to manually add a preference to remove this feature. As of firefox 3 beta 4 (or maybe beta 3, i didn’t install that release) this no longer works for whatever reason.
If you prefer the old style urlbar, you need to install the oldbar extension. https://addons.mozilla.org/en-US/firefox/addon/6227
firefox in HowTo