January 2015

Fixing a Slow Site, in Real Time

  • Posted on: 23 January 2015
  • By: davis

Due to other responsibilities popping up, I haven't been able to devote much time to optimizing americanlibertypac.com. As such, the performance has taken a hit due to heavy use, frequent experimentation, and the usual reasons for performance degradation. 

Anyways, I logged the experience. Follow along as we fix a website.

Important benchmarks to note before heading down the rabbit hole. This table is my initial measurement of the site.

Playing Jeopardy in Slack (Heroku/Outgoing Webhook Integration)

  • Posted on: 16 January 2015
  • By: davis

Slack is pretty awesome. If you're bored, why not try playing Jeopardy?

This was a fun experiment in setting up Heroku to work with Slack.

First, you'll want to grab the source code.

You'll need a free Heroku account (requires credit card information, but they don't bill you unless you buy something) and Slack administration privileges (to add integrations).

Display Gravity Forms Poll Results With Wordpress Shortcode

  • Posted on: 8 January 2015
  • By: davis

Gravity Forms does not come with an easy mechanism for displaying poll/survey results independently of user actions. This seems to be a pretty big oversight. 

I was trying to put up a post that showed the results of a previous poll, but found no way to simply display the results to users. Gravity Forms Polls usually only display the result post-survey, or via a "View results" link.

Workaround For Affiliate Links In SmartFocus

  • Posted on: 8 January 2015
  • By: davis

SmartFocus allows you to upload pictures and give them a description. More robust sytems typically would allow us to attach a permanent link to this image, but SmartFocus's system doesn't allow for it. Instead, we're using a simple but clunky workaround.

When we paste an affiliate ad in our messages, we need to ensure the correct tracking ID is attached to the image. This allows our sponsors (and us!) to track user engagement. It is vital that these links are correct to ensure the integrity of our data!

Anti-DDoS XMLRPC Tweak Breaks Jetpack's Site Management

  • Posted on: 5 January 2015
  • By: davis

I've written before about using a special XMLRPC access rule to stop Wordpress DDoS attacks.

Quick summary: My server was being bombarded with hundreds of thousands of requests from foreign hosts (mostly Chinese). It took about a week before finding a fix - during which time my servers were slow, prone to crashing, and generally unusable. I found a helpful tip here. I simply added the following code to the bottom of my .htaccess file.