Some gotchas when using AirDisk with Airport Extreme
Got this via Ali Ebrahim who recently purchased a Time Capsule but the information should be valid also when using an external USB disk connected to an Airport Extreme Base Station
Basically it is that for the AirDisk you have some options:
- Entire disk password
- User account based passwords
You’d generally want to do (2) and the gotcha is that you can’t switch between the two without wiping all data on the disk clean.
Another gotcha is that you can’t migrate your existing TM backup to an AirPort enabled AirDisk. Meaning that whatever history is stored in your existing TM backup would be lost.
Generating cache-friendly URLS for parallel image loading
The use of parallel image loading to improve page load time has been documented in multiple places. One of the key things to understand when one is using this technique is to always generate the same URL for the same static asset even if it resides on a different page.
This will allow the end-user to take advantage of HTTP proxy caches.
I wrote these set of simple PHP functions to demonstrate how one could incorporate this when generating the container HTML page for a website which uses parallel static asset loading
<?php function path_to_origin_suffix($path,$NUM_ALIASES=2) { /** Take hex value of md5 of $path. Get the ord value of the last hex char. Output it mod $NUM_ALIASES **/ if (1 == $NUM_ALIASES) return 0 ; $hex = md5($path); return ord($hex[31]) % $NUM_ALIASES; } function make_url($path,$scheme="http",$origin="static.example.org") { /** Add leading slash to $path. Generate suffix to append to basic hostname basic hostname is the phrase before the 1st '.' in $origin Output a fully qualified URI encased in double quotes "" **/ $pos = strpos($path,'/'); if ($pos === FALSE || $pos != 0) { $path = sprintf('/%s',$path); } $suffix = path_to_origin_suffix($path); $array= explode('.',$origin,2); $host = "$array[0]$suffix.$array[1]"; $abs_href = "$scheme://$host$path" ; echo "\"$abs_href\""; } function test() { echo make_url("/here/is/foobar") , "\n" ; echo make_url("here/is/foobar"), "\n" ; echo make_url("/there/is/foobar") , "\n" ; echo make_url("/there/was/never/a/foobar"), "\n" ; echo make_url("/please/mee/it/54"), "\n" ; } //test(); ?> <html> <head><title>Parallel Static Asset Loading</title></head> <body> <img src=<?make_url("/john/rambo.gif")?> /> <img src=<?make_url("here/was/john/rambo.gif")?> /> </body> </html>
Hope this helps
Impact of OpenDNS on CDN services particularly when used in Asia
At work, I am testing a CDN service run by Panther Express. I have been asking various colleagues and friends to run pings,traceroute and send me some HTTP response headers to analyze which Panther POP gets picked up where
Whilst working with a colleague in our Manila office, I found that he was being redirected to a Panther POP in San Jose California instead of being redirected to either a Hong Kong or Singapore POP as I expected.
I asked him for his /etc/resolv.conf entries and when he sent those to me, I found that one of the entries was that of OpenDNS dns cache. Whilst I truly appreciate OpenDNS’s work particularly its PhishTank system and API which we also use as part of SURBL, I think Asian users should understand that if they use OpenDNS then their DNS traffic leaves from the US and Content Delivery Networks like Akamai, Limelight, Mirror Image, Panther Express will route them to their US POP’s instead of their Asian POP’s
Once my colleague removed the OpenDNS entry, he was routed to the Asian POP for Panther Express
Workaround for Quartz Filter not available in Print menu in Leopard
I recently reinstalled my 20″ iMac (last 2006 model) from Tiger to Leopard. Today, whilst trying to print something on my HP PSC 1210 inkjet printer I found that it was not possible to print in black-and-white as I used to do in Tiger because the Quartz filter option was not available in Leopard
Here’s the workaround
-
Go to print the document. Use the item “Open PDF in Preview” item under the PDF Services drop down menu at the bottom left of the print
window. - After the document appears in Preview, choose Save As… from the File menu.
- Either change the name or use the Replace option when prompted. Select the output format as PDF and use the Quartz Filter to select “Black and White”. Click the save button
Not happy with Apple for making it so complicated to print in black and white. Going to send some feedback to them
Joi Ito, Pindar Wong in discussion with me about Creative Commons in Hong Kong
On Monday 21st January 2008, I got a few hours notice that Joi Ito who wears many hats amongst which he is the Chairman of Creative Commons, board member of Mozilla Foundation, board member of SanrioDigital whose staff I work closely with regularly was visiting Outblaze’s offices.
Whilst Joi caught up with SanrioDigital staff members, Pindar Wong an Internet pioneer in Hong Kong who co-founded the first licensed ISP in Hong Kong dropped by to share a few words with Joi. The discussion amongst us veered towards the issues facing bringing Creative Commons to Hong Kong and I’ve blogged about on the Outblaze blog.
Towards the end of our discussion, I send a shout out to lawyers specializing in intellectual property to review the draft of the localized Creative Commons license for Hong Kong so if you are my reader who fits that profile I hope that you will do the right thing
It’s a bit wierd though watching yourself on YouTube though. How do you think I fair ?
In a digital world, what does it take to scrap CD's ?
25 million pounds or
50 million US dollars
That’s what it takes EMI according to this article in the Financial Times
Read it and be flabbergasted
NetNewsWire 3.1 is now free
I’m a big fan of NetNewsWire and love its synchronization ability with NewsGator Online. Imagine my suprise when I open up NNW today and come across NewsGator’s CTO Greg Reinacker’s post that all of NewsGator desktop clients are now free and will include synchronization
Thanks to the team at NewsGator for making this decision.
Off to check out FeedDemon on a Windows box
network logging via djb's multilog
Had this recipe stuck in an old email somewhere, hope this helps someone else
The attached run files are required for the server who captures logs and the client which will send the logging data request.
Server
#!/bin/sh export PATH=”/usr/local/bin:$PATH” setuidgid remoteloguser tcpserver ip-addr-of-server listen-port-on-server multilog ./log
Client
#!/bin/sh export PATH=”/usr/local/bin:$PATH” 4>&1 | tcpclient ipaddr-of-server listen-port-on-server 6<&0
How to get PHP5 with GD enabled with JPEG/PNG on x86-64
I was trying to figure out why on CentOS 5.0 box on x86-64, I was unable to get GD support in PHP 5.2 for libjpeg and libpng. Lots of googling and looking through the PHP bug list and I finally worked out the magic invocation so for posterity (ie search engine’s sake) here it is
On an x86-64 environment ensure that you have the following configure options
-with-jpeg-dir=/usr \
–with-png-dir=/usr \
–with-libdir=lib64
Amazing song by Kailash Kher – Teri Deewani
I recently heard Kailash Kher’s phenomenal track Teri Deewani rendered by Toshi Sabri on Star Voice of India. A very moving experience. I searched for the original track at the usual places. I recommend to all my readers that they listen to this track at least once
Lyrics of Teri Deewani
Preet ki lath mohe aaisi laagi
Ho gayi main matwaali
Bal bal jaaun apane piya ko
Ke main jaaun vaari vaari
Mohe sudh budh naa rahee tan mann ki
Yeh toh jaane duniya saari
Bebas aur laachar phiru main
Haari main dil haari
Haari main dil haariTere naam se jee loon
Tere naam se marr jaaun
Tere naam se jee loon
Tere naam se marr jaaun
Teri jaan ke sadke mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewaniIshq junoon jab hadh se badh jaaye
Ishq junoon jab hadh se badh jaaye
Hanste hanste aashiq suli chadh jaaye
Ishq ka jaadu sar chadhkar bole
Ishq ka jaadu sar chadhkar bole
Khoob laga lo pehre raste rab khole
Yahi ishq di marzi hain
Yahi rab di marzi hain
Yahi ishq di marzi hain
Yahi rab di marzi hain
Tere bin jeena kaisa
Aagush kar di hai
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani
Teri deewani deewaniE main rang rangili deewani
E main rang rangili deewani
E main albeli main mastani
Gaaun bajaaun sabko rijhaaun
E main diru taraph se begaani
Ee main deewani main deewani
Tere naam se jee loon tere naam se marr jaaun
Tere jaan ke sadle mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani…