Blogs

GeSHi - Generic Syntax Highlighter for Drupal

Since howforge.com has lots of contents related to programming techniques and source codes, I have been looking for a good syntax highlighter that supports all codes published in this site such as Python, HTML, XML, bash, C, Java, C#, CSS, JavaScript, SQL, Ruby, and PHP. Today, while editing XML code in DokuWiki, I found it has very powerful syntax highlighter provided by GeSHi. GeSHi is a generic syntax highlighter written in pure PHP. The advantage of GeSHi is its purity, in my opinion. You don’t have to deploy any additional software stacks like perl. Anyway, GeSHi is such a library for developer to call at run-time. To use it as a filter in Drupal, there must be a filter module that wraps GeSHi. Fortunately, vfilby has done geshifilter module for Drupal already. Actually, geshifilter covers all functions existing in codefilter module so you don’t need codefilter anymore.

Have you ever want to insert javascript into a web page? Yes, I want to do it right now in . There are so many javascript that I would like to insert such as counter, AdSense and . Unfortunately, the script tags are removed on displaying. It seems Google Page Creator has a kind of tag filter to make sure all layout works perfectly on all browsers.

The  said that Google Page Creator isn’t fully compatible with JavaScript yet.  in  mentioned that it is only possible to upload files with JavaScript to Google Page Creator directly from your computer. Anyway, it is impossible to upload the first page aka /home.

Handle overflow in CSS

If you noticed some pages in howforge.com, they are containing

 tag to show code in monotype format. The side-effect of this tag is that all contents inside pre tag will never be wrapped if lines too long like usual cases. In other words, your layout may be extended the width for so long. Fortunately, I found a solution for this problem and just fixed in howforge.com. You could see the result of the solution in previous post. To fix this problem, just modify your CSS as follow.

pre {

Common mistake in squid.conf

Squid is an open-source web proxy cache. It is widely used in enterprise network with high traffic through web service to reduce traffic load and sometimes to prevent access to prohibit web sites. Usually, you might use Squid as just a cache, there is no problem. Whenever you want to block access through outside via access control list in Squid, you have to verify what you have done. For example, you want to prevent end-users to download virus, worm, spyware, malware and other possible unwanted files. As a result, you add below ACL.

acl block-download urlpath_regex -i \.exe$ \.zip$ \.iso$ \.avi$ \.mpeg$ \.wma$ \.vbs$ \.com$ \.vbe$ \.sys$ \.diz$ \.pif$ \.bat$ \.scr$ \.cmd$ \.dat$;  

ajaxLaunch launched ajaxWrite

AJAX is a must to be existed in all web applications for today. I have just found a post at Slashdot about ajaxLaunch. They has just launched ajaxWrite which is the direct competitor of Microsoft Word on the web. Imagine that you might see MS Word through Firefox. Though, it seems they can’t handle too many connections right now. If you get timeout, keep trying.

Anyway, it is not fully ajaxified yet. Popups are still popups. It would be nice if it use the same technique of Google Page Creator.

My Gmail account has been enabled to sign in to  on last Friday. As I , Google Page Creator was offered to everyone from novice to expert to construct homepage easy than ever. After creating my first page at , I found something different from just other wysiwyg editors such as TinyMCE and FCKeditor.