system-skyhigh

SMF 2 and Facebook like button

Here is the problem,

Since SMF will add PHPSESSID at the URL for guest for 4 or 5 times first access, the facebook linter will return the URL with PHPSESSID and that would be undesired since it will not unique since PHPSESSID will be changing time to time and you won’t seeing the actual number of person click the like button.

And now is the solution,

In old days, SMF have similar issue when bot indexing SMF and it have been resolved. For Facebook we will use the same solution too. Just add the user-agent along with other bot.

Facebook said their linter come with facebooktexternalhist/1.1 user-agent string but the actual Like button it seems using other user-agent string. I just too lazy to open up the log so I just use facebook instead to capture the “linter” and it works.

Hope this will save you few hours of confusion that was happened to me.

Cheers

Professional is…

Professional cu se kong,
kang ciao co, cin liong co, bo pau ho, lui cau siu,
ce kio “Professional”

Taken from “Just Follow Law”

system-skyhigh

This tape will self destruct in five seconds

Your mission, Jim, should you decide to accept it, is… As usual, should you or any member of your I.M. Force be captured or killed, the secretary will disavow any knowledge of your existence. This tape will self-destruct in five seconds. Good luck, Jim.

- Original Mission: Impossible

HTML5Boilerplate, proven HTML5 Template

Just in case you need to build ground up on HTML based web, even though in this “cms everywhere” era, or maybe you want to build your theme, HTML5Boilerplate could be as the starting point.

Here is advertised on the website,

After more than two years in iterative development, you get the best of the best practices baked in: cross-browser normalization, performance optimizations, even optional features like cross-domain ajax and flash. A starter apache .htaccess config file hooks you the eff up with caching rules and preps your site to serve HTML5 video, use @font-face, and get your gzip zipple on.

Please note that

Boilerplate is not a framework, nor does it prescribe any philosophy of development, it’s just got some tricks to get your project off the ground quickly and right-footed.

Go get it at http://html5boilerplate.com/

Happiness is…

Happiness is like peeing in your pants.
Everyone can see it, but only you can feel it’s warmth.

iPad vs Windows 7 Tablet

Yes, Win7 tablet shows more speed when launching. But how about battery life?

Judging from the GUI and feedback, iPad still have better response and eye-candy.

hmm, not to mention viruses…

Micro$oft's Dirty Secret: SharePoint Sucks

SharePoint Sucks
I was amazed to find that the SharePoint community are quite sensitive about the constant message they hear that “SharePoint Sucks”. Those in the pro-SharePoint camp feel it is a message being unfairly attached to the product (keep drinking the kool-aid guys). Hey, they have even started giving User Group presentations with titles such as “SharePoint for Developers Who Hate Sharepoint”. The key difference here is that the “Notes Sucks” mantra was largely a response by users of the Notes client prior to Notes 8.0. The “SharePoint Sucks” mantra appears to be from a developer community forced to use a product they quickly grow to hate. Another difference is that Micro$oft has been quite successful in amplifying the “Notes Sucks” message while the “SharePoint Sucks” message has been well muted. Don’t wory Micro$oft, your secret is safe with me. Lets keep it between you, me. Oh… and the few people who read my blog… SHAREPOINT SUCKS!, SHAREPOINT SUCKS!, SHAREPOINT SUCKS!!!!!

Taken from http://www.bleedyellow.com/blogs/dotdomino/entry/mores_goodness_from_the_sharepoint_community?lang=en_us

Blocking Ads Without Tools

Blocking ads is easy these days but I happened to hit the wall few times on my OS X. Glimmer Blocker is not facebook ajax upload friendl. Chrome plugin does not really block but hide the element only. I decided to do it hard way by mapping ad delivery network host to localhost ip.

To start, I found http://someonewhocares.org/hosts/ have extensive list and still maintained. Go there and find the instruction on that page.

The Law of Documentation

  1. If it should exist, it doesn’t.
  2. If it does exist, it’s out of date.
  3. Only documentation for useless programs transcends the first two laws.

- Unknown

Compress files individually in Mac

To compress selected files individually instead of 1 zip files, we need to setup script to handle this. Luckily we do have the “Automator” to seamlessly integrate to finder.

These are the Steps for Automator 2.1, should be similar for minor version:
1. Open Automator
2. Choose Service
3. Service receives selected = files or folders
4. in = Finder
5. Drag Run Shell Script to the right pane.
6. Pass input = as arguments
7. Paste this code to the script area
for f in "$@"
do
zip -j -9 "$f.zip" "$f"
done

8. Save and name your script, “Compress Individually” should be fine or just make one up that informative enough for you.
9. Try to right clicking on files, and you should find it on the lists