5 Common Reasons To Use Pre-commit Hooks in Your Python Project

Pre-commit hooks are scripts that run automatically before a commit is made. In my post Adding pre-commit Hooks to Python Repo, I explained how to configure pre-commit hooks in your repo and address the issues identified by them. After understanding how to setup these hooks, the next question is what hooks should I use and why? Here are five common reasons to use pre-commit hooks for Python and some example plugins that you can use for each reason....

January 6, 2023 · 5 min · Scott

Successfully Deploying a Static WordPress Site

If you’ve followed my previous posts, you’ll see that I’ve spent some time attempting to build my blog on WordPress and then finally make it static. This had resulted in lots of custom code and even more failed attempts to get things to publish correctly. I’ve finally been successful in building out my site with a combination of some of my failed attempts: Adding Nginx in Front of WordPress Building a Kubernetes Container That Synchs with Private Git Repo Building a Static WordPress The third article above is the most failed attempt to date at making the WordPress site static because it resulted in just as many successes as it did failures....

November 17, 2022 · 6 min · Scott

Adding pre-commit Hooks to Python Repo

Writing code can be tough and writing clean code can be even more difficult some times. When you get on a roll and put together highly functional and imaginative code, it might not always look the greatest. Also, when crunched for time, it can be very difficult to go back over the code and attempt to make it as pretty as possible. You might also need to make sure other files used by your code are also formatted properly....

November 6, 2022 · 10 min · Scott

Using Github Actions To Test Before You Deploy

I’ve been using DigitalOcean for quite some time now and had recently setup their App Platform to run my website. Their platform is great in that I’m able to build a docker container running Openresty and it handles all of my needs. The platform does a great job of catching docker build failures and stops attempting a deployment when this happens. A few weeks ago, I had a concerning thought in that they don’t catch problems with my Openresty configuration until it’s too late....

October 23, 2022 · 5 min · Scott

Tuning My Content Security Policy

In my Getting Started With a Content Security Policy post, I setup a report only CSP policy so that I could try and identify things that could test out a policy before implementing it. It is time to parse through the results and see what needs to be updated in my deployed policy. The original policy was very simple default-src https Inspecting The Violations I started trying to look at the current violations and I think it was clear that I had a rather permissive Content Security Policy because nothing much was being blocked....

October 16, 2022 · 2 min · Scott