Linode
RSS 2.0 Feed
Posted on April 19th, 2011 at 08:34 PM by Corey Ballou

You may or may not be aware, but PHP has two separate module implementations wrapping the memcached (as in memcache daemon) server.
The memcache module utilizes this daemon directly, whereas the memcached module wraps the libMemcached client library and contains some added bonuses.
Both modules have built-in support for session handling, which can be specified in your php.ini file using session.save_handler = memcache[d].

You may see speed improvements if you decide to go with the full-blown install of the memcached module. The primary reason for this would be it’s use of the igbinary PHP extension; a drop in replacement for PHP’s serializer. There is currently a 2.0 beta (RC1) with a number of goodies. more »

Categories PHP, Performance
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter
Comments 1 comment
Posted on March 25th, 2011 at 05:20 AM by Corey Ballou

At my employer, Skookum, we recently launched an application for web designers, freelancers, and UI designers alike called ClickDummy. Clickdummy is currently 100% free and allows anybody with a series of screenshots (mockups) to turn them into a full blown presentation or website prototype. Dummies let users navigate your mockups as if they were live websites or applications. Simply upload mockups you’ve created offline and draw clickable areas to let users navigate between them. The result is a very convincing simulation that does a much better job of communicating user experience than mockups alone. The site is one of the first built upon node.js.

Clickdummy - Mockups that Click

Why Should I Use Clickdummy?

Have you ever sent mockups to a client and tried to explain how they work together? Have you ever had to dig through piles of email to organize all the feedback you’ve gotten on a design? You know it’s a pain, and so do we. Clickdummy lets you bring your mockups to life, annotate them, collaborate with co-workers, share your work with anybody, and gather feedback all in one place.

Give Clickdummy a Try

We’d love your feedback.

Categories General
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags ,
Comments 2 comments
Posted on August 18th, 2010 at 06:49 AM by Corey Ballou

I recently noticed that almost every WordPress plugin I have ever used does not restrict user access based on their role. Due to the increasing popularity of multiple authors and guest posting, there is a necessity for plugin authors to implement methods of restricing plugin access based on user roles. The primary goal of this tutorial is to add a multi-select dropdown of all user roles to your plugin’s administrative options page. This dropdown will be used to select only those user roles you wish to give access to your plugin. We will be demonstrating with a real WordPress plugin, JinX the Javascript Includer. It is a prime example of a plugin that you may wish to disallow lower level users from accessing due to it’s lack of escaping and filtering of data. You can download the sourcecode if you wish to skip the details. more »

Categories PHP, Wordpress
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags
Comments 1 comment
Posted on August 7th, 2010 at 08:31 AM by Corey Ballou

I’m going to outline the process of switching from Apache’s default installation of MPM Prefork to that of MPM Worker. I will also be covering the proper installation of FastCGI (mod_fcgid) to further improve your server performance. This guide is ideally intended for individuals running on low-memory VPS servers as memory consumption will likely be far lower with the Worker MPM because it spawns threads as opposed to forking child processes. If you’re intentionally reading this article, you’re probably aware of the performance benefits gained.

The worker MPM uses multiple child processes with many threads each. Each thread handles one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.

more »

Categories Apache, PHP
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags , ,
Comments 1 comment
Posted on August 7th, 2010 at 07:34 AM by Corey Ballou

The Linode Library has proved invaluable lately. I believe they may have one of the most comprehensive solutions for properly installing MongoDB out there. The best part, to me, is that they have separate walkthroughs for Debian, Fedora, CentOS, and Ubuntu. I would highly recommend checking out these guides when you prepare for your next (or first) MongoDB install. They not only cover the actual install, but they cover setting up bash scripts, adding Mongo to your system startup, and other useful tidbits.

A word of warning; The Database Clusters guide is slightly dated with the new release of Mongo 1.6. The documentation contains information for setting up Replica Pairs and not Replica Sets. The document is, however, a good source of information for setting up quick master/slave replication with 2 nodes.

Happy installation, it’s really quite painless!

Categories MongoDB
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags
Comments no comments
Posted on July 19th, 2010 at 07:08 PM by Corey Ballou

I have posted a couple of important updates to MongoSession (a PHP MongoDB Session Handler) that I’d like to share with you.

  1. I have removed the secondary indexed id field which should speed up operations as well as reduce the storage requirements. This is most beneficial for larger sites supporting a high rate of concurrent users.
  2. I recently added two boolean constants, FSYNC and SAFE. These two constants are documented on the MongoCollection::update() page and can be turned on to ensure your session data is actually written to the server. Please note that turning these variables on will cause a performance hit to the overall session handling.
  3. Both the garbage collection and session write methods have been updated to perform atomic operations. This was done as a measure to reduce the risk of race conditions as mentioned on the project page.
  4. A bug was fixed in the read method where an extra line of code existed for no reason.
  5. A bug in the garbage collector was fixed. Update previously only updated a single result as opposed to the whole set of matches.

Click here to be taken to the project page.

Questions, comments, forks, and bugfixes are welcome.

Categories MongoDB, PHP
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags ,
Comments 1 comment
Posted on July 19th, 2010 at 07:58 AM by Corey Ballou

I’ve got a bone to pick with the Kohana development team. I just wasted a couple hours out of my day adding functionality to their core Validate class only to find that the functionality had already been added in a future revision. All I was looking to do was pass parameters to a custom callback function. I had even documented the entire change and was looking to post a feature request with an included patch. I later came to realize that the version I was using, 3.0.3, was outdated to the point of lacking this seemingly trivial functionality that was included in 3.0.7. So bare with me while I rant on why your framework is losing in the popularity contest. more »

Posted on July 6th, 2010 at 06:19 PM by Corey Ballou

The @font-face CSS tag allows web designers and developers to specify custom fonts to display text on their web pages. Allowing websites to utilize custom fonts removes the burden of requiring your website visitors to have the custom fonts installed on their personal computer. The following examples use the DejaVu Sans font, which is freely available for download here. more »

Categories CSS
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags , ,
Comments 5 comments
Posted on June 2nd, 2010 at 12:12 PM by Corey Ballou

Back in late April, following Facebook’s f8 conference, a few articles began trickling out regarding possible security concerns with the new “Like” button. I had, at that time, unknowingly positioned myself as the potential originator of the term “likejacking.” In the comments section of How to “Like” Anything on the Web (Safely), I coined the term like-jacking; seeing a strong correlation between malicious usage of the button and clickjacking.

"Likejacking" Term Coined

Little did I know that my term would be on the forefront of a media frenzy, where a plethora of articles would be posted in a matter of minutes regarding the subject. The frenzy can be attributed to the release of two articles from security experts at Sophos regarding the topic:

An entry on Likejacking has made its way to Wikipedia. I urge security experts and web developers alike to please moderate and update the entry as it is in dire need of an overhaul. This will aid in a speedy addition to Wikipedia as well as a thorough, well-documented resource for web users to gain insight on this new security threat.

Please click here to contribute to the Likejacking Wikipedia article

Categories Security
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter

Tags ,
Comments 1 comment
Posted on April 30th, 2010 at 07:06 AM by Corey Ballou

There’s not a whole lot of PHP algorithms floating around. Perhaps people just rely upon the SPL. I had a curiosity to find a string sorting algorithm written in PHP and I didn’t find any non array-based solutions. The implementation I came up with this morning implements recursion, passing by reference, and string iteration. It’s worth noting that this is a horribly slow solution. For this reason I’ve included a very concise solution which is an order of magnitude faster as it uses a C implementation of quicksort which generally runs in O(nlogn). To make people aware of quicksort, I have also implemented a solution for string sorting. With that being said, this could be a fun exercise for students. Alternative solutions and runtime analysis are welcome in the comments section. more »

« Older Entries