Categories

Tags

Page 19 of All Articles

Quitting a job you just started

It’s happened to everyone, you just started a brand new job, probably event left a decent job for it, only to realize that the new job sucks and you absolutely hate it. It happened to me recently, I was starting to get cabin fever working for myself and decided to […]

How to calculate Independence Day observances with PHP

On this 238th anniversary of the United States of America, I felt it appropriate to post an article on how to determine what day the July 4th National Holiday is observed on. There are two rules to the observances. First, if the holiday falls on a Saturday, it is observed […]

The importance of a staging environment

Full disclosure, I don’t actually have a staging server for my personal projects. I develop locally in a very similar environment as my production server and any time I have to do something major, like upgrading the OS or upgrading software between major revisions, I always do a dry run […]

How to parse XML with PHP's SimpleXML

Parsing XML in PHP couldn’t be easier thanks to the SimpleXML extension. SimpleXML allows you to read in an XML string, verify that it is in fact XML and can create an object that you can interact with by way of the node names in the XML.The SimpleXML extension also […]

$10 Showdown: Linode vs. DigitalOcean

Every time I think that I’m done with this topic for a while, someone (usually Linode) drops something new on us. The latest from Linode is the addition of a 10$ a month plan which nearly puts it in line with DigitalOcean in regard to low tier pricing. Because of […]

Checking your IMAP email using PHP

I have an upcoming freelance project coming up that includes checking an IMAP email account as well as working with XML in PHP. Let’s talk about connecting to an IMAP account in PHP, don’t worry, I’ll discuss parsing XML next week ;) For the sake of example, we’re going to […]

Android Pros and Cons after 2 years with an iPhone

I recently discussed migrating to cross-platform apps in an attempt to break away from the Apple Ecosystem which was a precursor to me swapping my iPhone 4S for a Nexus 5. Now it’s time to talk about the pros and cons that I ran into by making the move. PRO: […]

How to calculate Mother's Day and Father's Day with PHP

A little late on the Mother’s Day part, but since today is Father’s Day, I figured it would be fun to discuss how to obtain the dates for these moving holidays. To do so, all we need to use is use strtotime and tell it when the holiday will occur […]

The receiving end of a DDoS Attack

This post was supposed to be a discussion of my migration back to Android from iOS but direction changed yesterday morning. At 9:30 am I found myself in the middle of a DDoS attack that was affecting the rack my server lives on. My sites slowed to a crawl and […]

How to pipeline with phpredis

Have you ever run into a scenario where you have to loop through a set of data and perform database queries for each iteration? Obviously we shouldn’t run them one by one, so we end up using a TRANSACTION or even just building out one large query in the case […]

How to process PUT requests with PHP

You are probably already familiar with $_GET, $_POST and $_REQUEST but what about $_PUT? Trick question, $_PUT (as well as as $_HEAD and $_DELETE) doesn’t exist in PHP at this time. Never fear! We can create a $_PUT array with the following code: if ($_SERVER['REQUEST_METHOD'] == 'PUT') { parse_str(file_get_contents("php://input"), $_PUT); […]

Breaking away from the Apple Ecosystem

I’ve recently come to a crossroad with Apple and it’s ecosystem. I’ve had an iPhone 4S for the last 2 years and I was itching for a new device. Giving the current iPhone lifecycle, it makes more sense to hold out for the next iteration of the iPhone than jump […]

URL Routing with PHP

I’ve been taking a lot of programming tests / challenges recently as I was in the market for a new [and hopefully exciting] opportunity to spend my time on. Because of this, I am full of new blog post ideas based on the questions / challenges asked. This week I’m […]

Having a child ruins your life

I started a new contract gig this week and one of my new co-workers was very candid in letting me know that having children ruins your life and implying that I in fact had ruined my life in doing so. To be quite honest, I was very taken back by […]

Spending money on advertising only to acquire spammers

I performed a little experiment last year, I decided to spend a small bit of money on advertising one of my sites via AdWords. My budget was low as I didn’t want to spend more than 100$ and my daily allocation fluctuated between 1$ and 5$ as I made adjustments […]

Google Places PHP Library

I tend to shy away from these self gratifying posts about my own open source contributions, but I’m going to make the exception because this particularly library has been receiving quote a few downloads this month. I’m unsure for the increase, but my Google Places PHP Library has had over […]

Linode vs. Digital Ocean, performance benchmarks

I mentioned the in my last Linode vs. Digital Ocean post that I would be doing a performance comparison of the two in the near future and here it is! I used sysbench with some pretty basic settings to compare a 2GB server from both hosting companies. Apples to apples, […]

How to Install PHP Redis on Ubuntu 14.04 LTS

Previously, I had shown you how to install PHP Redis from source but things changed with the latest Ubuntu LTS release. Now you can install the phpredis extension from the Ubuntu respositories. First, if you don’t have it installed already, let’s install Redis: sudo apt-get install redis-server After we get […]

Swallow your pride and stop blaming your tools

I was at my favorite neighborhood biergarten last week when I spied a flyer on the bar for the today’s Cinco de Mayo event. Upon closer examination, I noticed that the kerning was set very high in between the Ma and the Yo so it looked like Cinco de Ma […]

How to Install the MongoDB PHP Module on Ubuntu 14.04 LTS

Installing the PHP module for MongoDB on Ubuntu 14.04 LTS is just a command away, but first, let’s ensure that we have MongoDB itself installed: sudo apt-get install mongodb Once we have MongoDB installed, we can proceed with installing the module. Please note that you could combine these commands to […]

Linode SSD vs. DigitalOcean

Time for another installment of my Linode vs. DigitalOcean series. The most notable improvement this go around is on Linode’s end by offering SSD Linux servers exclusively. This had been the pain point for many as DigitalOcean has been offering this since day one and Chris Aker had made it […]

How to Setup a LEMP Stack on Ubuntu 14.04 LTS

Last week I covered setting up a LAMP server on Ubuntu 14.04 LTS but for my money, it’s all about LEMP stacks. The “E” actually stands for Nginx (pronouced Engine X) and it’s an altnerative to the Apache web server that is built for speed and has a very low […]

The pros and cons of being accessible to your users

How accessible I am to my site’s users is something that I’ve went back and forth with over the last few years. When I say “accessible” I don’t mean venturing into offline interactions or anything like that, just in regard to how I interact with the users. I tend to […]

How to Setup a LAMP Stack on Ubuntu 14.04 LTS

The newest long term support release of Ubuntu (Trusty Tahr) is finally here! I just spun up a droplet over on DigitalOcean to walk through setting up a LAMP stack for this post. I also recommend making sure that your system is completely up to date. At the time of […]

Reducing Redis used memory by moving back to MySQL

If you know me then you know I fucking adore Redis. Over the last few years it’s slowly worked it’s way into the majority of the things I have built. Unfortunately, recently I ran into a problem that Redis could easily accomplish but would require more RAM than I have […]