Exploring the creation of a generic cache class in TypeScript that can be used with any service based off of an abstract class.
Recent Posts
Here are some of my latest blog posts. Click Here to see a list of all tags.
-
TypeScript Generic Cache Class -
How to Delete Multiple Git Branches in One CLI Command In this post I show you how to delete multiple git branches in one command with a filter prefix.
-
Get The FULL Query from MySQL Process List This is how to get the Full Query from the MySQL Process List
-
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.
-
Prisma, MySQL, and max_prepared_stmt_count Over the course of a year, we have been fighting with MySQL and Prisma regarding an error referencing max_prepared_stmt_count. This is how we resolved it.
-
ViTest and TypeScript Paths How to set up TypeScript paths in a ViTest project.
-
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.
-
GitHub Actions Reusable Workflows This is how I created a reusable GitHub Action workflow that can be shared and reused within a repository.
-
MySQL Workbench Safe Mode Toggle We've been running into an issue with MySQL Workbench where the Safe Mode toggle is enabled. Here's how to desable it.
-
MySQL Left Join First Row This is how I solved a MySQL Left Join First Row issue
-
Changing the Origin of your Branch Today I learned that you can change the origin of your branch in Git.
-
Redis Stream Activity Feed I created a new Concept Project utilizing Redis Streams to create an Activity Feed
-
GitHub Action - Passing a Slack Message ID between Jobs How to pass a Slack Message ID (or any primitive value) between multiple GitHub Action Jobs.
-
Docker Run Internal Container Command How to run a command in a Docker container that is not the main running command of the container.
-
Get a Bash Scripts Absolute Path How to find a bash script absolute path without the use of realpath.
-
Building a Hexagon Game Board Playing with HTML Canvas to make a hexagonal grid-based game.
-
Image Generator Module an Exploration on using JavaScript and its Canvas to generate a dataurl image.
-
From REST to GraphQL - How To Build a GraphQL Server Exploring the Development of Refactoring a RESTful api 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.
-
How to get GitLab Runner to push a Git Tag Some thoughts on getting a Gitlab Runner to deploy tags back to a remote.
-
How to configure Nginx to load balance between multiple Docker containers A brief exploration of using Nginx as a load balancer for multiple docker containers.
-
Next Version I created a Node.js based Command Line Interface tool for creating and updating a Node Projects Version.
-
Folding the DOM I came across this article online and just needed to share it.
-
How to make GIT ignore future changes to a committed file. A quick command to tell Git to ignore future changes to a tracked file.
-
Playing with HTML 2D Canvas This is my first time playing with HTML Canvas, and I wanted to show it off.
-
Script to Close a Port on MacOS A very handy Bash alias for web developers to close an open port on macOS.
-
Ping Redis without CURL or NC I found this little snippet on Stack Overflow which allowed me to check the Redis connection from inside my container.
-
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.
-
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.
-
How to make macOS remember my ssh password You can follow these steps to mimic the older functionality of macOS remembering your password between sessions and restarts.
-
Helpful Docker Scripts I am doing a lot of docker experiments today and needed a few scripts for cleaning up.
-
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!
-
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
-
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
-
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
-
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
-
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
-
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
-
Web Developer Job Applicants - Here's some Pro Tips! I have been spent a fair bit of time looking a resumes and cover letters as of late. Some of which have prompted a few tweets from me.
-
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
-
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
-
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
-
As a general rule when programming... As a General Rule When Programming. If you think your code is going to cause a WTF moment a year from now re-evaluate your solution.
-
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
-
Step by Step Install of Graphite with Carbon and StatsD on CentOS 7.1.x Recently, we started to build our own Graphite StatsD Server. We tried following a couple of step by step guides, but all them were seeming out of date. And we encountered several errors, many of which did not have defined documentation.
-
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
-
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
-
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
-
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
-
What is DevOps Several Months ago, I attended a conference in Toronto called DevOpsDays. The purpose is like any other technical conference, a means to get like minded individuals together and to share new ideas. In this case, DevOps.
-
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
-
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.