Subscribe via

Block Unwanted Spam Bots Using Varnish VCL


Every time I search the web for information on how to block spam bots, scrapers, and harvesters, I always see an Apache .htaccess file or some code to dump into httpd.conf to achieve this. I’m a bit against using this method for blocking evil bots. I do respect Apache for being a flexible & modular web server (that’s why I still use it), but I do not have much to boast about Apache’s speed and efficiency.
To achieve the same purpose on my server with greater efficiency, I made use of my Varnish reverse proxy configurations (located under /usr/local/etc/varnish/default.vcl).
In this post, I will only be discussing about vcl_recv subroutine, which gets called when a client request is received.
Read on…

Widget Bugs or Features in WordPress 2.5?


This might be useful for WordPress widget developers out there. I wasn’t going to post this before, but I just found that another developer ran into the exact same issue. So hopefully the 10 minutes I spend writing this post can help save somebody hours of debug.

After WordPress 2.5 released I found that my NowThen Photo Display widget broke the sidebar management page in WordPress adminitration. I took the longest time to figure out why, but the root of the problem was that the new WordPress 2.5 actually executes widget code in the wp-admin area. I have no idea why this is the case. Is this a bug or a feature of the new 2.5 code? I can see it as a feature in a sense that, if the code is not able to executed properly in the wp-admin area, then it should not be added to the front-end. If that’s the case, I would expect an error message rather than a broken sidebar management page.

Anyhow, here are a couple of tips that I have if your plugin breaks after the upgrade: Read on…

Make WP-PostViews Work with WP-Super-Cache

In response to JTPratt’s comment on my post, ‘Make Popularity Contest Work with WP-Super-Cache,’ I am releasing a modification of Lester Chan’s WP-PostViews plugin to support counting using Javascript. Please try it out to see if this works for you.

A side note to Lester Chan and Richer Yang (WP-PostViews and WP-PostViews Plus authors repectively). Please feel free to contact me about incorporating these changes into WP-PostViews and/or WP-PostViews Plus so that it can be officially committed to the wp-plugins.org repository. I would create my own version of WP-PostViews in the repository, but do not want to steal your thunder :).

Read on…

Creating a Staging WordPress Blog for Testing

Over the past few months, I’ve been meaning to create a staging WordPress blog that is an exact replica of my production OMNINOGGIN blog so I can test major feature changes before releasing them to my production site.  I have to admit that there are many other interesting things to spend time on (see also: Make Popularity Contest Work with WP-Super-Cache and NowThen Photo Display WordPress Plugin) so I have been lagging at getting this task done.  Fortunately the WordPress 2.5 released was enough to motivate me to get this done.  My goal in this post is to provide a step-by-step set of instructions (or checklist) for getting this task done.  I run Apache 2.2.8, MySQL 5.0.51a, and PHP 5.2.5 on a FreeBSD 7.0 machine that I have complete control over.  Keep in mind that these steps will vary depending on how your blog is configured.  It is a good checklist nonetheless so without further ado:

Read on…

Make Popularity Contest Work with WP-Super-Cache

Previously I wrote ‘Make Your WordPress 10X faster During Traffic Storms‘, which is a post about automatically turning WP-[Super]-Cache on/off and automatically switching your WordPress theme to a lighter theme during heavy traffic. One of the main reasons that I had this setup was because I could not get statistics to work with WP-Super-Cache (i.e. my chCounter & Popularity Contest plugin is hosed).

After some tinkering, I was able to get chCounter and Popularity Contest to work with WP-Super-Cache. This involves using javascript to count instead of PHP. chCounter was a simple change, but Popularity Contest was a bit more challenging. Usually I would immediately post the “How-to” here, or rather release the modded plugin to the public myself, but I believe that I shouldn’t step on Alex King’s shoes (the original developer of Popularity Contest). I’ve sent the Popularity Contest code to Alex for code review. He’s been doing some of the same work, and hopefully he can incorporate some of my changes into the plugin and release it to the public soon.

If anybody would like to use my version of the Popularity Contest before Alex King releases it to the public, you may download the WordPress 2.3.3 and WordPress 2.5 compatible version here:
Read on…

Developing CiCi’s Cafe Website

Cici (Paweena’s sister) owns a breakfast restaurant in Tarzana, CA. I am blessed and thankful for that because she lets me free-load off the delicious fresh food at her restaurant every time I visit Los Angeles. (As a side note: If you ever get the chance, you should visit CiCi’s Cafe in Tarzana, CA. Highly recommended breakfast joint!)

Aside from not knowing how to repay her for her kindness, I love the food so much that I have been developing a website for her restaurant, ciciscafe.com.

CiCi’s Cafe Screenshot

Believe it or not, the site’s backbone is WordPress! I can’t believe how easy it is to turn a WordPress blog into a simple restaurant site. This just goes to show how flexible Content Management Systems (CMS) are now.

I am nearly finished with the site. All I need to do now is update the menu and add some yummy food pictures.

Nowthen Photo Display WordPress Plugin

This plugin is no longer supported/updated because of low demand for the plugin.

Today I would like to announce the release of “Nowthen Photo Display” WordPress widget that parses picture RSS feeds from the image service nowthen.com and displays the pictures neatly on the sidebar. This is my first WordPress widget so any comments and suggestions are welcomed. I would be happy to make updates/releases if the demand for this widget is high enough and there are some worthwhile feature requests.

Screenshots

Sidebar Widget
Sidebar Widget
Widget Options
Widget Options
Gallery
Gallery
Gallery Options
Gallery Options

Read on…

150W to Power My Computer

Comments Off on 150W to Power My Computer


In the previous post, I found out that it takes 150W to power my personal computer which I always leave on the entire day. I felt bad that I am not contributing to the “Go Green & Save the planet” cause. I actually use my person computer for a variety of things throughout the day but there was definitely a way to optimize the usage. Here are tasks that require my computer to be on all the time:

  1. File Server (mainly used for backups)
  2. Torrents
  3. PVR System
  4. Personal FTP Server (mainly used for syncing settings with my work computer)
  5. MyCast Orb Sharing

I immediately saw that I can give up MyCast Orb Sharing, since I haven’t used it for months. Read on…

1500VA of Battery Backup for Omninoggin.com


I recently purchased an APC BACK-UPS XS 1500VA LCD for $120 to prepare for California rolling blackouts/brownouts. I’m not sure if this is going to be worth it yet since I still cannot supply backup internet access in case of power outage. So if the power goes out, omninoggin.com along with a few other sites will still be forced offline. The great news though is that all of my precious hardwares are completely protected from over/under power issues. Here are some interesting facts I found out while installing this battery backup unit:
Read on…

Kombucha Detox Tea – The Miracle Drink?

Kombucha

Have you ever seen one of these bottles selling in Whole Foods or Trader Joe’s? Do you ever wonder what it is and why the heck each bottle cost $4? A few months ago, I decided to find out what it is myself and forked out $4 for a raspberry flavored one. Once I opened the cap, the liquid started fizzing and foaming (naturally carbonated). I took a sip and it tasted nothing like what I was expecting. The drink was quite sour and had an odd after taste to it. I didn’t like it at all, but I figured that I should finish it and make it worth $4. About fifteen minutes later, I was in for a surprise. Read on…