Blog Posts | Christopher Vachon

Recent Posts

Here are some of my latest blog posts. Click Here to see a list of all tags.

  1. How to Delete Multiple Git Branches in One CLI Command
  2. Get The FULL Query from MySQL Process List
  3. MySQL, Prisma, and Views
    MySQL, Prisma, and Views

    Sometimes you need to use a view in your database schema. Here is how we chose to manage views with Prisma.

  4. Prisma, MySQL, and max_prepared_stmt_count
  5. ViTest and TypeScript Paths
  6. Modifying a commit's file
    Modifying a commit's file

    Sometimes you commit files that you did not mean to stage. Here is how to modify that commit to add or remove files.

  7. GitHub Actions Reusable Workflows
  8. MySQL Workbench Safe Mode Toggle
  9. MySQL Left Join First Row
  10. Changing the Origin of your Branch
  11. Redis Stream Activity Feed
  12. GitHub Action - Passing a Slack Message ID between Jobs
  13. Docker Run Internal Container Command
  14. Get a Bash Scripts Absolute Path
  15. Building a Hexagon Game Board
  16. Image Generator Module
  17. From REST to GraphQL - How To Build a GraphQL Server
  18. From REST to GraphQL
    From REST to GraphQL

    I am giving a talk at NorthOT this Thursday in Barrie Ontario about Migrating from a RESTful API to GraphQL.

  19. How to get GitLab Runner to push a Git Tag
  20. How to configure Nginx to load balance between multiple Docker containers
  21. Next Version
    Next Version

    I created a Node.js based Command Line Interface tool for creating and updating a Node Projects Version.

  22. Folding the DOM
  23. How to make GIT ignore future changes to a committed file.
  24. Playing with HTML 2D Canvas
  25. Script to Close a Port on MacOS
  26. Ping Redis without CURL or NC
  27. High Availability Redis Session with Express
    High Availability Redis Session with Express

    Recently we have needed update our session solution with Redis to use Redis as a cluster, increasing the availability of our sites in the event that we have to cycle our Redis servers.

  28. Playing with CSS Grid
    Playing with CSS Grid

    Recently, Rachel Andrew gave a great talk on the topic which was uploaded to youtube. This was a great introduction to the subject for me, and also provides a brief comparison between CSS Grid and CSS Flexbox.

  29. How to make macOS remember my ssh password
  30. Helpful Docker Scripts
  31. SVG Donut Charts
    SVG Donut Charts

    Recently, I wanted to build a simple SVG donut chart to display some data Icalculate in a React Application. I did some searching and found an excellenttutorial on Medium by Mark Caron (Scratch-made SVGDonut & Pie Charts in HTML5).  This got me started.With this tutorial in mind, I created the following React Component.Hope someone finds this useful!

  32. Giving a Presentation with Git Commits
    Giving a Presentation with Git Commits

    recently I have been creating and giving presentations on how to use certaintechnologies. Event expanding some to be more like workshops.I decided that rather than writing all my code on the fly while giving thepresentation, which would undoubtedly lead to a number of errors as I go, that Iwould pre-write all the code and stores changes as git commits.This leads me this post.  How to navigate those commits quickly and easilyduring my presentation.My solution was to create three bash al

  33. Arduino State Machine
    Arduino State Machine

    Recently, I have been on a bit of a beer making kick and have decided that Ireally do enjoy it.> View this post on Instagram My first batch of

  34. What's my IP Address
    What's my IP Address

    I have recently been giving a new 15inch MacBook Pro by the office, and havespent a fair bit of time moving things over from a MacMini to it to be my newprimary console. Although there are several tools available to transition fromone mac to another, I have decided to do this as a fresh/clean install as themini has been around for 4 years. It's also allowed me to mark down everythingfor a new on-boarding process I am starting.One of the main issues in switching from a desktop unit to a la

  35. Human Readable Code
    Human Readable Code

    I have recently spent a great deal of time reviewing code from externaldevelopers. Some of it is good, some of it is rough, some of it makes my headhurt. Ultimately, if the code produces the expected result, I tend to let thingsslide to be included as part of a later refactor if needed, but this leads me tomy topic of the day; Human Readable Code.No longer do we live in an age where we need to consider how a computer is goingto process a block code, and as such, code for the compiler in t

  36. Cherry-Pick with Git
    Cherry-Pick with Git

    Sometimes things don't quite work out as planned. Okies, lets be honest, Most ofthe time things don't work out as planned from the start. But with a properworkflow, this is not always detrimental.For one of my office projects, I had a transition over to DoubleClick forPublishers (DFP). This was completed, and entered into a merge release for thestart of the month along with a few other patches and small features. However,that transition was to be pulled from the upcoming release for inter

  37. React with Gulp, Babel, and Browserify
    React with Gulp, Babel, and Browserify

    Recently I have started working with React for a prototype for an upcoming project. I have found a large community outthere, and have started using Browserify , Babel, and Gulp to streamline the process oftranspiling the react code.However I have found it slightly frustrating that with most of the workflows Ihave found, that my with poor working knowledge of react at this time, thatbrowse

  38. Web Developer Job Applicants - Here's some Pro Tips!
  39. How to Modify a DoubleClick Advertisement
    How to Modify a DoubleClick Advertisement

    Today an odd request came by my desk. The company has a DoubleClick forPublishers (DFP)Account serving advertisement on page for one of there clients. They want to beable to detect the destination URL of the advertisement, and if it meats acertain criteria, to get additional information for the advertisement related tothe sponsored client.My initial solution was to simply load the content you want as you want itdispl

  40. CSS3 Columns
    CSS3 Columns

    Today we had an issue where we needed to split an ordered list into multiplecolumns. So took some time to explorer a different way to accomplish the task ofsplitting a standard html into multiple columns. Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 Item 8 Item 9 Item 10 Item 11 Item 12 Item 13 Item 14 Item

  41. Some Thoughts on Setting Up a Workflow
    Some Thoughts on Setting Up a Workflow

    A key component to DevOps is setting up and maintaining a workflow fordevelopers. It's not all about automation and statistics. Having a developmentbackground comes in nice and handy, but system operations is valuable too. Ifyou don't have that experience behind you, find an experienced developer and/orsystems administrator to work with on your workflow.Step 1 - Analyze What You're Already Doing.Lets start by taking some time to analyze your current process. Unless you are aone man shop

  42. As a general rule when programming...
  43. I am learning to love VI
    I am learning to love VI

    I will admit that in my early developer days, that I was extremely resistant todoing anything command line. My thought was that we lived in an age where wecould easily make GUI so why wouldn't we create and use them. Now will toolslike GIT, LESS, SASS, Grunt, Gulp, Vagrant, and Docker (just to name a few) Ihave learned to love working in the command line and cant imaging workingwithout it.That being said, the one thing about command line that has always bothered was vi (or vim). I never

  44. Step by Step Install of Graphite with Carbon and StatsD on CentOS 7.1.x
  45. The Power of Statistics
    The Power of Statistics

    Over the past couple of weeks I have been exploring Application Monitoring toolswhich has resulting in me playing with StatsD and Graphite .  I quickly found a Docker Container, and plugged in an NPM library called node-statsd into an Express RESTful api to see what kind of data I could get.At firs

  46. NGINX Location Rewrite
    NGINX Location Rewrite

    with my change over to the Ghost Blogging platform from myown custom engine, I had one major problem.The URL's from my old blog did not directly match the URL's of the new blogSpecifically, the blog path.In my custom built blog, I had entered all the blog posts to sit under the /blog/ route. Ghost does not do this, nor does it directly allow me to modifythat path without modifying Ghost itself. Because the intention of thistransition is to utilize an existing communi

  47. Promises Versus Callbacks
    Promises Versus Callbacks

    Recently I have been asked about the differences between JavaScript Promise (sometimes called a deferred) and a JavaScript Callback. Over the years, we haveseen many implementations of both these types of infrastructure, and even manylibraries which mix and match between to two.The point of both of these types of programming are that they allow you to codeasynchronously by allowing you to perform actions when your active action iscompleted. The main difference between the two is that prom

  48. Testing Middleware
    Testing Middleware

    Recently I wrote a small custom piece of middleware for an express applicationto consume on its requests. It takes a query parameter and reworks it for lateruse in the event loop. Nothing too fancy or overly complicated.But as is the good practice, and because this was for a production application,I wanted to test this bit of middleware with mocha . Buthow?A brief google search did not return to me any relevant information, so that'swhat prompted this post.Writing

  49. What is DevOps
    What is DevOps

    Several Months ago, I attended a conference in Toronto called DevOpsDays. The purpose is like any other technical conference, ameans to get like minded individuals together and to share new ideas. In thiscase, DevOps.I have long counted myself as the DevOps Engineer of the company I work for, andhave had a lot of issue getting the company to believe that DevOps is a realthing. It doesn't help when goggling "DevOps" gives you a large and varyingdescription of the r

  50. Band of Brothers Inspired Layout
    Band of Brothers Inspired Layout

    With November 11th quickly coming, I've been watching a lot of Band of Brothers.If you are unfamiliar with that series, it is about the American 101st AirBourne and their trials in the second world war.  I would highly recommend it toanyone as it is very well done.At the start of each episode, the screen is black, and the episode title andnumber as displayed in a simple white text with a singular red line separatingthe two elements.  It is this clean and simple display that I am wanting t

  51. CSS3 :nth-last-of-child Demo
    CSS3 :nth-last-of-child Demo

    This is a neat trick I learned for CSS3 to select out the last box of a grid off loading elements and set its width to fill the remaining box.  For this, I amusing a CSS pseudo-class called :nth-last-of-type(). This pseudo-class will select out the last element of the attached element in the containing element. So in a grid of 9 span tags in a div tag, the selector will pick out the the box.whats nice about selector is that it will accept arguments.