Roy Lindauer
Home Blog Music
  • Deploying a Simple Rails App with Ansible

    Ruby on Rails is quickly becoming my framework of choice for my personal websites and projects. It's a pleasure to work with and has been easy to learn. But no framework is without its challenges. One of those challenges is of course deploying the app to a server. There are a lot of options for hosting and deploying a Rails app. But, I like to run my own servers which means I have to also take care of deploying to those servers. I'd prefer to be deploying images to AWS ECS but I don't need that kind of infrastructure for my personal website. It's just a blog it can suffer seconds of downtime when I deploy updates. So my approach these days is to use Ansible to handle the deploy steps.

    (Mar 11 2021)
  • How to Run Rails App Server with Systemd and Ansible

    Create a systemd service to run your rails app server.

    (Mar 7 2021)
  • Simplify Terraform By Generating Configurations

    Terraform is an awesome tool. To make it more awesome though we have wrapped it with some custom Ruby ERB templating to generate our terraform configurations from Yaml configurations.

    (Mar 3 2021)
  • 2020

    I am exhausted. Anxious. Stressed. This year has been a real test and I am done with being tested. The planet spun on and will make another revolution around the sun. For that I am grateful. But good fucking riddance to 2020.

    (Dec 31 2020)
  • Welcome, again, to my development blog

    Hello and thank you for checking out my not-a-blog blog. I mostly share tips and how-to's about web development, Sysadmin/DevOps, and other technical/development things

    (Dec 18 2019)
  • Doing that DevOps thing

    My first year at Blackbird has been good. My main goal in my first year was to migrate the monolithic system and infrastructure into something more scalable and reliable. Well this week was the week and we did it. We moved the last of the services over without any issue. I am grateful that I had the support I did and the team I did. I have learned an incredible amount from them. And ultimately, we killed it!

    (Aug 2 2019)
  • Feeling Satisfied

    I had set out about 2 years ago to get some certifications for my own personal and professional growth, but life and things and other things got in the way (work? Factorio? excuses?) and I just never finished them.

    (Mar 17 2019)
  • Docker putting downloads behind a login wall

    In regards to issue https://github.com/docker/docker.github.io/issues/6910, Docker putting links to download Docker CE behind a login wall. The comment thread is long, and people are, in my opinion, rightfully put out by the move.
    (Dec 20 2018)
  • The Reality of Gutenberg & WordPress

    Gutenberg is happening. It is coming and it is coming soon. I am not thrilled.

    (Mar 26 2018)
  • Profiling and Debugging a PHP app with Xdebug and Docker

    I have started using an IDE again (PHPStorm) so that I could debug some applications and do some basic app profiling. I want to use Xdebug to profile my PHP apps. I am using Docker Compose on Windows 10. I have made this very complicated for myself but here we go.

    (Feb 14 2018)
  • WP Transients must be used responsibly

    We ran into an interesting issue with WooCommerce at work. First, here is the subject of the support request we got from our hosting provider

    (Jan 29 2018)
  • Development on Windows

    It has been a few months since I got a new laptop with Windows 10. For the most part it has been pretty damn nice. The UI is pretty good, the native apps are not terrible, Cortana is actually useful. It's fine, until I want to do web development. There are all of these little things that get in the way, all of these little compromises. Beware, rant coming up..

    (Jan 17 2018)
  • Order Posts via "Weighted Pseudo Randomness"

    A request we are getting more often is to show a list of posts, to elevate some of those posts above others, and to show the posts in a random order. Imagine a post type called "Sponsors". Sponsors are tiered, like "Platinum", "Gold", "Silver", etc. We want the Platinum sponsors to appear before Gold, Gold before Silver, and so on. We don't want to favor one particular Platinum sponsor though, we want them to be randomized but ordered by the tier.

    (Jul 25 2017)
  • What happened to empathy and compassion in the medical industry?

    Healthcare in country is fucked.

    (Dec 21 2016)
  • Regular Expression of the day

    (?!(([1,2,3,4,5,6,8,9,0])\2{9}))(?!((1234567890|0987654321)))(((\+?\d{1,2}[\s.-])?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4})|(\d{10,}))
    (Dec 20 2016)
  • Technical Documentation for a Web Development Project

    Working on a large web development project requires that you have clear direction and good technical documentation. The designer needs to understand the functional requirements and the data model in order to deliver a successful design. The themer need to understand the UI/UX spec in order to deliver accurate and functional markup. The developers need to understand the functional requirements and data model in order to build out the CMS backend. Creating these documents, as a team, will help guide the project to success.

    (Oct 5 2016)
  • TLS Peer Verification w/PHP 5.6 and WordPress SMTP Email plugin

    We ran into an issue after upgrading from PHP 5.5 to 5.6. We were no longer able to send email via the awesome WordPress SMTP Email plugin. Turns out that PHP 5.6 introduced some enhancements to its OpenSSL implementation. Stream wrappers now verify peer certificates and hostnames by default. This was causing the form submissions on our site to fail. Clearly there are some issues with our Postfix config and certs. While we sort out those issues, we were able to "solve" our immediate problem, and disabled peer verification in the plugin without editing core files. Thankfully the plugin developer included a filter that would allow us to modify the options array that is passed to PHPMailer.

    (Sep 22 2016)
  • Whitelist IPs in Nginx

    I want to whitelist my clients IP addresses (and my office IPs) to allow them to view a site, while the rest of the world will be redirected to another site, using Nginx. My Nginx server is behind a load balancer.

    (Jun 13 2016)
  • Capistrano tasks for Magento

    Custom tasks for Capistrano that I am using to help manage a Magento website.

    (May 17 2016)
  • Creating link tags with hreflang attributes in CraftCMS

    I want to preface this with the following; I think CraftCMS is a poor CMS. I dislike many things that it does and cannot recommend it as a professional CMS. Having said, that, I am working with it a lot these days at work and recently had to add link tags with hreflang attributes to the head. For some reason the CMS does not do this for you. SproutSEO does not do this either.

    (May 6 2016)
  • Setting up Git HTTP Backend for local collaboration

    You want to share a topic branch with a colleague but do not want to push that branch upstream to Github/BitBucket/GitLab, etc. How do you do this? You could create a patch and email it. Or you could do it in the most crazy way possible and use Apache and allow your colleague to pull from your repo directly. This does take a bit more time to setup, but it would also be absolutely crazy dumb for everyone involved. Basically, let's setup a git server on your workstation!

    (Feb 9 2016)
  • Enable status for php-fpm

    Accessing the PHP-FPM Status screen is easy enough. First, enable pm.status in your php pool:

    (Jun 8 2015)
  • My Pantheon + Jenkins Process

    Here is a rough outline of my Pantheon + Jenkins process. I like my code in BitBucket. I also like Pantheon (check them out). The Pantheon workflow is all about being the source of truth for your code. This is fine, and actually I dig it because it promotes good practices. However, I, and my company, have many projects in BitBucket already, and am using Jenkins more and more for some Continuous Integration functions. We want to keep using BitBucket as our source of truth and our existing workflows, but also want to use Pantheon.

    (May 26 2015)
  • A WordPress ajax handler for custom themes

    Something I have been noodling on is a better way to handle ajax requests in my custom themes. Seems to me that a relatively complex theme ends up with a lot of add_action calls for custom ajax handlers, and this could be simplified/reduced. Every time a new endpoint is required we have to add two new add_action calls to our theme. Maybe a better approach is to write a single ajax endpoint that will route requests to the proper classes/methods?

    (May 21 2015)
  • My VagrantFile

    This is the Vagrantfile I am using for my development box at home and work. It is determines how much ram is available and how I want to allocate, how many CPUs are available, and configures the VM for me. I use NFS for shared folders. Finally, starting to use "hostupdater" to keep my host machines hosts file current.

    (May 19 2015)
  • Ohai Plugin for OpenVZ VMs to get public IP Address

    Media Temple uses the OpenVZ virtualization system and I have quite a few Media Temple servers under Chef management. The one thing that has made management difficult is that by default during a Chef run ohai returns 127.0.0.1 as the default IP address which means I cannot run knife to execute commands from my workstation.

    (Apr 2 2015)
  • What to do when your website is hacked/exploited

    So your website has been "hacked"? You load your website in your browser, and are redirected to some spammers website, or maybe you google'd yourself (naughty), and found a few thousand indexed pages for knock off prada gear? Ok, so how do you fix this, and more importantly, how do you learn how they did it so you can defend against it later.

    (Feb 19 2015)
  • Virtualbox Bug related to SendFile

    I have been doing more web development with Vagrant and VirtualBox. It's a nice way to keep my dev environment nearly the same as my production environments. Recently I was doing some front-end coding and was running into the most bizarre errors with my JavaScript.

    (Sep 26 2014)
  • Setup Development Environment with Vagrant & Chef

    I use Chef to manage and provision new staging and production servers in our company. It takes a lot of the headache out of managing multiple servers and allows me to fire up new web & data servers for our projects with ease. I have several cookbooks that I use to configure servers and to setup/configure websites. In a nutshell, it's rad, and website deployments have never been easier.

    (Jul 13 2014)
  • Trying to Troubleshoot extremely high MySQL CPU Usage

    MySQL CPU usage was spiking upwards of 1000%. Load average was around 50-60. I could not SSH into the machine though, not immediately.

    (Jul 12 2014)
  • Securing Git repository from accidental exposure using Chef

    It was brought to my attention at the office that a few of our recently launched websites had publicly exposed .git repository information. Unscrupulous users could use the exposed data to pull down the entire commit history, giving them unfiltered access to what is basically the blueprint for the website.

    (Jul 10 2014)