I know I’m late to the game but this is good news
WordPress + Nginx + HHVM
Today I played around with installing WordPress 3.9 on Nginx at DigitalOcean and was amazed at how easy it really was. It was so easy that I decided to also install HHVM. I’m not going to go into every detail since I mostly just used already existing tutorials that I combined….
How to merge PDFs and add a Table of Contents (TOC)
This sample code shows how to merge multiple PDFs and add a Table of Contents (TOC) at the end of the document. http://stackoverflow.com/a/25316944/231316
How to convert HTML to PDF using iTextSharp
I just posted a question and answer tutorial on Stack Overflow for how to convert HTML to PDF using iTextSharp. It shows off both HTMLWorker as well as XMLWorker.
WordPress command line (WP-CLI) and proc_open
WP-CLI is an awesome command line tool to manage your WordPress installation. You can view plugin information, perform plugin or core updates and show the current cron tasks. This is great for both system administrators who don’t always have user accounts within WordPress as well as WP admins who don’t want to fire up a…
Disable WordPress’s cron for XML-RPC requests
WordPress has a custom task scheduler that gets fired on every single request to a WordPress site. By “fired” I mean that every request involving WordPress causes a lookup to see if there are any tasks waiting to be run and if so runs them. The tasks are actually run by the…
Handling a splitting table in iTextSharp
The PdfPTable class has a property called TableEvent that can be used to receive (as you would expect), events related to a table. If you’re used to .Net, however, you’ll find that it isn’t a true .Net event that you can += or AddHandler and event onto. Instead, like most…
PHP Base85 encode 128-bit integer (GUID/UUID)
I’m working with GUIDs in PHP and am trying to find the most compact way to represent a 128-bit integer via a string. Searches showed theory and C# code along with a Wikipedia article that referenced many languages except for PHP so I decided to roll my own. The code below relies…
Additional string formatting for $wpdb->insert
I really like using the helper $wpdb class for inserts but occasionally I have a need to insert data using more than just %s, %d or %f format strings. Almost everyone will tell you to manually write your own INSERT statement and then just pass that to $wpdb->prepare() (which $wpdb->insert()…