<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>benzwu &#187; Web</title> <atom:link href="http://benzwu.com/category/web/feed/" rel="self" type="application/rss+xml" /><link>http://benzwu.com</link> <description>contemplation and lifestyle in between</description> <lastBuildDate>Thu, 12 Jan 2012 09:32:42 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>xkcd&#8217;s comic on password strength</title><link>http://benzwu.com/2011/08/xkcds-comic-on-password-strength/</link> <comments>http://benzwu.com/2011/08/xkcds-comic-on-password-strength/#comments</comments> <pubDate>Thu, 25 Aug 2011 00:19:01 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Stupidity]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[password]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=1361</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<p
style="text-align: center;"><img
class="aligncenter  wp-image-1362" title="password_strength" src="http://i.imgur.com/O2HN5.png" alt="" width="518" height="421" /></p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2011/08/xkcds-comic-on-password-strength/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Firefox, Chrome and IE</title><link>http://benzwu.com/2011/08/firefox-chrome-and-ie/</link> <comments>http://benzwu.com/2011/08/firefox-chrome-and-ie/#comments</comments> <pubDate>Wed, 17 Aug 2011 01:00:20 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Joke]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Browser]]></category> <category><![CDATA[Chrome]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[Goggle]]></category> <category><![CDATA[Internet Explorer]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Mozilla]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=1318</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<p><img
src="http://i.imgur.com/fDHZP.jpg" alt="" /></p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2011/08/firefox-chrome-and-ie/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>IOS WordPress app working now</title><link>http://benzwu.com/2010/12/ios-wordpress-app-working-now/</link> <comments>http://benzwu.com/2010/12/ios-wordpress-app-working-now/#comments</comments> <pubDate>Tue, 21 Dec 2010 01:25:46 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Gadget]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[Wordpress]]></category> <guid
isPermaLink="false">http://benzwu.com/2010/12/ios-wordpress-app-working-now/</guid> <description><![CDATA[Finally after updated this morning, wordpress app working now. Yesterday the blog name was blank and showing up error user name and password on all action. I was given up on this app yesterday. One more thing, this post was made entirely from ios. Cheers]]></description> <content:encoded><![CDATA[<p>Finally after updated this morning, wordpress app working<br
/> now. Yesterday the blog name was blank and showing up error user<br
/> name and password on all action. I was given up on this app<br
/> yesterday.</p><p>One more thing, this post was made entirely from ios.</p><p>Cheers</p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/12/ios-wordpress-app-working-now/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XML/ajax error</title><link>http://benzwu.com/2010/12/xmlajax-error/</link> <comments>http://benzwu.com/2010/12/xmlajax-error/#comments</comments> <pubDate>Sat, 11 Dec 2010 04:32:00 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[HTTP]]></category> <category><![CDATA[HTTP Header]]></category> <category><![CDATA[XML]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=958</guid> <description><![CDATA[If you happen to stumble upon this error, please check your HTTP response whether they return extra line after HTTP header. Some said it&#8217;s caused by the code that have extra line before but what I found is the very same code works without extra line on a server and not working on another. Debugging [...]]]></description> <content:encoded><![CDATA[<p>If you happen to stumble upon this error, please check your HTTP response whether they return extra line after HTTP header. Some said it&#8217;s caused by the code that have extra line before  but what I found is the very same code works without extra line on a server and not working on another.</p><p>Debugging and checking all your code will be tiresome, fortunately we can put pre-processing on the header. Wejn really help a lot of people by making this script on http://wejn.org/stuff/wejnswpwhitespacefix.php.html</p><p>You need to put it in your server and include it using your .htaccess (only when you are allowed to overide) or include it on your script.<br
/> <span
id="more-958"></span><br
/> Here is the code backup here.</p><blockquote><p><?php<br
/> /*<br
/> Wordpress leading whitespace fix</p><p>================================<br
/> Ever got the infamous "xml declaration not at start of external<br
/> entity" error instead of your RSS feed when using WordPress?</p><p>Well, you're not alone. I've spent couple hours tracking down<br
/> which of the active WordPress plugins/themes broke my RSS feed.</p><p>When the same situation repeated again on a different blog,<br
/> my patience ran out... and I wrote this script that takes<br
/> care of the issue once and for all.</p><p>If you suffer with the same problem, download the plaintext<br
/> version and follow install instructions to free yourself from<br
/> the whitespace tyranny. ;)</p><p>Download<br
/> --------<br
/> Plaintext version: http://wejn.org/stuff/wejnswpwhitespacefix.php<br
/> VIM Syntax colored: http://wejn.org/stuff/wejnswpwhitespacefix.php.html</p><p>Requirements<br
/> ------------<br
/> Works with PHP5 only, as the headers_list() function is missing<br
/> in PHP4 which makes output Content-Type detection impossible.</p><p>Installation<br
/> ------------<br
/> Either use this as auto_prepend in your .htaccess:</p><p>php_value "auto_prepend_file" /path/to/wejnswpwhitespacefix.php</p><p>or include it as first thing in WordPress' index.php file even<br
/> before that "short and sweet" line:</p><p><?php<br
/> include("wejnswpwhitespacefix.php");<br
/> // Short and sweet<br
/> define('WP_USE_THEMES', true);<br
/> require('./wp-blog-header.php');<br
/> ?></p><p>Note: For the .htaccess way your AllowOverride must include<br
/> &#8220;Options&#8221; (or better yet, be set to &#8220;All&#8221;); otherwise all you&#8217;ll<br
/> be getting is &#8220;Internal Server Error&#8221;.</p><p>Author: Wejn {wejn at box dot cz}<br
/> License: GPL v2.0, no latter version(s)<br
/> Version: 2.0<br
/> Changelog:<br
/> - Added better mime-type detection<br
/> - Now works even when C-T header not set<br
/> - Changed intro text to better target keywords<br
/> */</p><p>function ___wejns_wp_whitespace_fix($input) {<br
/> /* valid content-type? */<br
/> $allowed = false;</p><p> /* found content-type header? */<br
/> $found = false;</p><p> /* we mangle the output if (and only if) output type is text/* */<br
/> foreach (headers_list() as $header) {<br
/> if (preg_match(&#8220;/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i&#8221;, $header)) {<br
/> $allowed = true;<br
/> }</p><p> if (preg_match(&#8220;/^content-type:\\s+/i&#8221;, $header)) {<br
/> $found = true;<br
/> }<br
/> }</p><p> /* do the actual work */<br
/> if ($allowed || !$found) {<br
/> return preg_replace(&#8220;/\\A\\s*/m&#8221;, &#8220;&#8221;, $input);<br
/> } else {<br
/> return $input;<br
/> }<br
/> }</p><p>/* start output buffering using custom callback */<br
/> ob_start(&#8220;___wejns_wp_whitespace_fix&#8221;);<br
/> ?></p></blockquote> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/12/xmlajax-error/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Becoming Goth Geek</title><link>http://benzwu.com/2010/09/becoming-goth-geek/</link> <comments>http://benzwu.com/2010/09/becoming-goth-geek/#comments</comments> <pubDate>Mon, 13 Sep 2010 10:24:35 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Attitude]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Geek]]></category> <category><![CDATA[Goth]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=894</guid> <description><![CDATA[Try to looking for your name on tombstones in cemetery]]></description> <content:encoded><![CDATA[<blockquote><p>Try to looking for your name on tombstones in cemetery</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/09/becoming-goth-geek/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tuning Squid, my way</title><link>http://benzwu.com/2010/09/tuning-squid-my-way/</link> <comments>http://benzwu.com/2010/09/tuning-squid-my-way/#comments</comments> <pubDate>Mon, 06 Sep 2010 02:24:45 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Cache]]></category> <category><![CDATA[Squid]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=877</guid> <description><![CDATA[I&#8217;ve been using polipo and squid on my local but polipo was keep having segmentation faults that really annoying. To get the performance level up to polipo&#8217;s pipeline, you can add this line to your squid conf to enable pipelining which is disabled by default due to bandwidth management and logging issue which I don&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been using polipo and squid on my local but polipo was keep having segmentation faults that really annoying.</p><p>To get the performance level up to polipo&#8217;s pipeline, you can add this line to your squid conf to enable pipelining which is disabled by default due to bandwidth management and logging issue which I don&#8217;t use currently,</p><div
id="_mcePaste"><blockquote><div
id="_mcePaste">pipeline_prefetch on</div><div></div></blockquote><div>Next bonus is to block ads on proxy level,</div><div><blockquote><div>acl ads dstdom_regex &#8220;/users/benzwu/adblock.txt&#8221;</div><div>http_access deny ads</div></blockquote><div>just fill the text file with simple regex rule like</div></div><div></div><div><blockquote><div>(^|\.)123banners\.com$</div><div>(^|\.)123found\.com$</div><div>(^|\.)123pagerank\.com$</div></blockquote><div>Ensquid!</div></div></div> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/09/tuning-squid-my-way/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SMF 2 and Facebook like button</title><link>http://benzwu.com/2010/08/smf-2-and-facebook-like-button/</link> <comments>http://benzwu.com/2010/08/smf-2-and-facebook-like-button/#comments</comments> <pubDate>Mon, 30 Aug 2010 14:10:46 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Web]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[Like]]></category> <category><![CDATA[SMF]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=863</guid> <description><![CDATA[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&#8217;t seeing the actual number [...]]]></description> <content:encoded><![CDATA[<p>Here is the problem,</p><p>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&#8217;t seeing the actual number of person click the like button.</p><p>And now is the solution,</p><p>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.</p><p>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 &#8220;linter&#8221; and it works.</p><p>Hope this will save you few hours of confusion that was happened to me.</p><p>Cheers</p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/08/smf-2-and-facebook-like-button/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>HTML5Boilerplate, proven HTML5 Template</title><link>http://benzwu.com/2010/08/html5boilerplate-proven-html5-template/</link> <comments>http://benzwu.com/2010/08/html5boilerplate-proven-html5-template/#comments</comments> <pubDate>Mon, 16 Aug 2010 11:44:16 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Web]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[Template]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=855</guid> <description><![CDATA[Just in case you need to build ground up on HTML based web, even though in this &#8220;cms everywhere&#8221; 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 [...]]]></description> <content:encoded><![CDATA[<p>Just in case you need to build ground up on HTML based web, even though in this &#8220;cms everywhere&#8221; era, or maybe you want to build your theme, HTML5Boilerplate could be as the starting point.</p><p>Here is advertised on the website,</p><blockquote><p>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.</p></blockquote><p>Please note that</p><blockquote><p>Boilerplate is not a framework, nor does it prescribe any philosophy of development, it&#8217;s just got some tricks to get your project off the ground quickly and right-footed.</p></blockquote><p>Go get it at http://html5boilerplate.com/</p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/08/html5boilerplate-proven-html5-template/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Blocking Ads Without Tools</title><link>http://benzwu.com/2010/05/blocking-ads-without-tools/</link> <comments>http://benzwu.com/2010/05/blocking-ads-without-tools/#comments</comments> <pubDate>Sat, 22 May 2010 13:55:59 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Web]]></category> <category><![CDATA[Ad]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=734</guid> <description><![CDATA[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 [...]]]></description> <content:encoded><![CDATA[<p>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.</p><p>To start, I found http://someonewhocares.org/hosts/ have extensive list and still maintained. Go there and find the instruction on that page.</p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/05/blocking-ads-without-tools/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>jquery ui dialog with iframe</title><link>http://benzwu.com/2010/01/jquery-ui-dialog-with-iframe/</link> <comments>http://benzwu.com/2010/01/jquery-ui-dialog-with-iframe/#comments</comments> <pubDate>Mon, 11 Jan 2010 14:12:00 +0000</pubDate> <dc:creator>benzwu</dc:creator> <category><![CDATA[Web]]></category> <category><![CDATA[dialog]]></category> <category><![CDATA[iframe]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[jqueryui]]></category> <guid
isPermaLink="false">http://benzwu.com/?p=719</guid> <description><![CDATA[If you ever come across those combination, you&#8217;ll know where this post will lead. Whether we fire the dialog on the iframe element, the contained iframe in the dialog will adjusted it&#8217;s width to &#8216;standard&#8217; 150px regardless the dialog&#8217; width and iframe&#8217; width setting. To put it another way, you call dialog to show in [...]]]></description> <content:encoded><![CDATA[<p>If you ever come across those combination, you&#8217;ll know where this post will lead.</p><p>Whether we fire the dialog on the iframe element, the contained iframe in the dialog will adjusted it&#8217;s width to &#8216;standard&#8217; 150px regardless the dialog&#8217; width and iframe&#8217; width setting. To put it another way, you call dialog to show in 300px but the iframe contained only fill half of the dialog and leaving plain blank on the rest.</p><p>It&#8217;s been a pain to be in the situation but you really have to use those combination. I&#8217;ve been tinkering with it with no luck and luckily my hunch lead to the solution.</p><p>The key is to resize the iframe to fill the margin AFTER the dialog opened. Put it at the open event of the dialog.</p><blockquote><p>$(&#8220;#theiframe&#8221;).dialog({<br
/> bgiframe: true,<br
/> modal: true,<br
/> width:600,<br
/> height:480,<br
/> close: function(event, ui) { $(this).dialog(&#8216;destroy&#8217;) },<br
/> <strong>open: function (event,ui) {$(this).css(&#8220;width&#8221;,&#8221;100%&#8221;)}</strong><br
/> });<br
/> }</p></blockquote><p>That should do the trick!</p> ]]></content:encoded> <wfw:commentRss>http://benzwu.com/2010/01/jquery-ui-dialog-with-iframe/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
