Category: Code

Brainings, ramblings, and probably a code sample or two of stuff I pick up that is damn-near impossible to find on the interwebs.

0

Custom File Check for Datadog Agents

One of the greatest things I’ve found about Datadog agent is it’s extensible nature.  While there are numerous OOB integrations, we often find an edge case or two that require some quick code and a custom check here and there. This is a pretty basic check that looks to see if a file exists and if it does, reports a successful check, and if not, reports a check error tagged with the particular filename.  Additionally, if the file does exist,   file.age  and  file.modified  metrics are reported back also tagged by filename.  Handy for knowing if certain files exist and how old they may be....

Linux Shell 0

Custom Shell Check for Datadog Agents

One of the greatest things I’ve found about Datadog agent is it’s extensible nature.  While there are numerous OOB integrations, we often find an edge case or two that require some quick code and a custom check here and there. This is one that had previously been put up in one of the repos but I found that as the agent had updated, this check to run shell commands and retrieve metrics relied on some code that was included with the agent that changed over some revisions. So… I re-wrote this to operate as a standalone. This check allows you to run...

Microservices Primer 0

Microservices Primer

Microservices!  I’m sure we’ve all heard that fancy new term bouncing around all over the web and spilling from the mouths of our executive overlords on a regular basis, but what is it really? Another dive into the darkness of SOA, more ESBs, something fancy sounding, but really just idealistic? No my friends, it is none of these things.  It’s something far better that a) can be attained, and b) will help your organization and applications thrive and flourish.  We’ll go through a quick primer and help you get to a minimum understanding of Microservices and where to go next! The Current...

Securing Your APIs 1

Best Practices for Securing Your APIs

I’d like to share a presentation I’ve put together on some best practices for securing your APIs.  This presentation covers everything from encryption, to UUIDs, the differences between authentication and authorization, OAuth and OpenID Connect, and a host of other information around SSL, TLS, and more ways you can secure your APIs from those pesky would-be hackers. Much has been said around securing APIs and fortunately people do try to implement some of these practices.  Unfortunately, most do not implement multiple legged security thereby relying solely on a single measure or two simplistic and easy-to-defeat mechanisms to secure their APIs.  Alas, some...

0

Why you should use UUIDs in your APIs

I’d like to take a moment to dwell on using UUIDs (Universally unique identifier) in your APIs, the good and the bad, and really why you should use them.  Today we’ll focus around using these specifically as resource identifiers where we will, for the purposes of this blog post, think of a resources as items like users, groups, etc.  So without further ado… let’s take a look at UUIDs and why a good API should take advantage of them. What is a UUID? For time’s sake, let’s just go ahead and quote the Wikipedia definition of a UUID as it will serve...

1

WordPress Optimization: Installing and Configuring WordPress

Welcome to part 5 of 8 in my series on Kick-Ass WordPress Optimization!  If you’re here, you’ve probably just completed setting up your server and DNS to host your website on your very own Digital Ocean droplet.  Now we’re going to get down to business and install your database and your WordPress installation! WordPress Optimization: Installation This section on Installing and Configuring WordPress will consist of the following topics: Installing MySQL and Configuring Your Database Actually Installing MySQL Creating a Database Creating a User Granting your User Permission to Use Your Database Tuning MySQL for WordPress Installing and Configuring WordPress Downloading...

2

Kick-Ass WordPress Optimization

So you want to know about WordPress Optimization? Well I’ve scoured the web (and continue to do so frequently) for ways to optimize the various WordPress blogs that I run.  While I can’t claim to be the source of all knowledge on this topic, I can tell you what has worked well for me and how I run all of my blogs (some have seen upwards of 60K visits in a day!) on a single server and don’t lose a second of sleep over it. I’ll be splitting this post into several parts mostly because I just can’t bring myself...

3

WordPress Optimization: Setting Up a Web Server

Welcome to part 3 of 8 on Kick-Ass WordPress Optimization: Setting Up a Web Server!  In this segment we’ll be covering the implementation of a web server on your virtual (or regular) server that we set up in the previous segment or part 2 of 8: Setting Up a Virtual Server.  If you haven’t already done this… you may want to go back and get this going before you end up here. WordPress Optimization: Web Server Set Up This segment will cover the following topics: nginx Web Server – Because I won’t be covering Apache. Installing PHP Installing PHP-FPM and Tuning...

1

WordPress Optimization – Setting Up A Virtual Server

Welcome to part 2 of 8 of my series on Kick-Ass WordPress Optimization: Setting Up Your First Server.  Here’s where we dive into the basics of setting up your very first server that you, regardless of your experience, can set up, manage, and turn into a lean mean blogging machine. I’m going to assume that you’ve already done Part 1: Getting Started.  If you haven’t… for shame! So, get back there and check your list and make sure you’re ready to rock! We’ll cover the following topics in this segment: Why anyone can do this! Virtual Servers – WTF is a Virtual...