Recently I ran into a problem where I needed a site that would support SSL, optionally (for a Facebook application). The site needed to stay in SSL if that’s what was requested, and stay in non-SSL if that’s what was requested. The problem I ran into was that WordPress generated URLs would either point to […]
Development
Node Tip: .nodemonignore
Most node.js developers use Nodemon as a development server, as it allows you to watch your project files and will automatically restart Node when changes are detected. However, there are a few problems with this. Restarting an application every time a file changes is often unnecessary, and causes a slight delay before you can refresh […]
Git Tip: No History
If you’re using Git to install some piece of software, such as phpMyAdmin or WordPress, here’s a tip: Don’t get the history when you clone the repository! phpMyAdmin has 10,000+ commits for instance, and you don’t need that. Use the following command to only download the latest source: git clone –depth 1 https://github.com/phpmyadmin/phpmyadmin.git And here’s […]
Node Tip: require() JSON files
If you didn’t already know this, it may come in handy. You can use Node’s require() function to require JSON files. It will return a hash. Just like require() always does, it will cache the file, and only load it once (no matter how many files you require it from). Useful for config files. var […]
WordPress Must-Use Plugins
At this point in time, WordPress remains the easiest-to-use “CMS” available to us, so I end up developing quite a few sites with it. Somehow, there is this great feature I’ve never heard of until a few weeks back, so I thought I’d share with the class. WordPress has this feature called “Must Use Plugins“, […]
Use Layouts & Sub Templates
For the context of this article, I’ll be using Zend Framework 1 for usage examples (Why am I using Zend Framework 1 you ask? Because this post is based on an email I sent to my coworkers the other day who use Zend Framework 1). However, all major frameworks support something like this (Symfony2, Zend […]
Node.js and NodeFTPD
A buddy of mine has been telling me I should learn Node.js for the last few months, but I’ve been staying away because I haven’t been the biggest fan of JS in the client (Browser inconsistencies and all that). This week I decided to dive in and see what the hype is all about, and […]
Symfony: Using the current user object with a form

Recently I’ve been working with Symfony, a powerful and popular PHP framework. I’ve been running into my fair share of problems with the framework, a lot of which stems from lack of content/documentation for Symfony 2.x, so I’ve decided to start writing some blog posts about it. For the application I’ve been developing (For one […]
The power of session_write_close()
If you’re anything like me, you’ve probably created an infinite loop or two in your day. One misconception that I had however, was that a single script that entered an infinite loop was causing my entire server to get locked up, because I couldn’t reload the page or load any other page. I always just […]
- Development
- ...
How to run background tasks in PHP
This post is mostly to introduce some cool ways of doing tasks in PHP, that you may not be aware of. The recommended approach for anything like this is to use a cron job however. One of things I often do in PHP is create code that needs to run occasionally and perform some function […]