Scheduling backups with GitLab CI/CD
I recently created a small Django project to manage a rolling menu for our family meals. It’s not a large project. I’m hosting it on a Digital Ocean droplet (for which I pay $4/month, and it runs more than one project), and I have a free-tier Postgres database with ElephantSQL. Because this is only a personal project, I didn’t want to pay for the database or any backups there (though my experience so far of ElephantSQL is positive, and for a larger project I may well do this!
Email inbox for Django development
My current project sends emails. Not a very controversial statement that, as most web projects probably need to send the occasional email. To make testing during the dev phase easy, I’ve configured the project to use the django.core.mail.backends.filebased.EmailBackend backend, which just writes an email to a file in a directory you specify. This means I can just open up the file, read and visually verify the email, and click on any links (eg.
Colourblind settings for Git
Like around 12% of people on the planet, I am colour-blind. Mine isn’t too bad compared to others, and is the common red/green kind (protanopia). I still like to use colours in my terminals though, as I find the various highlights useful, so I thought I’d share the colours I have set up for git to make life easy for me. Just copy/paste the following into your ~/.gitconfig file, and of course if any of these colours don’t work for you, just change them to something that does (mostly what I’ve done is get rid of the dark reds and blues, which are very hard for me to see on a blackish terminal background.
Debugging Django in a Docker container
Have you ever tried hunting for a bug in a Django app that’s running in a Docker container? It’s not always a trivial process and can have you dotting print statements all over the place because you can’t figure out how to use breakpoints properly inside the Docker container. Well, fortunately there is a solution to this. 2 solutions even. Solution 1: Configure VS Code to debug a dockerised app Step 1 - Configure VS Code VS Code has built in debugging support for a variety of languages.
Power-up your DuckDuckGo searches with !bangs
DuckDuckGo continues to gain ground over Google for searches, not least because it doesn’t track you. But is it as efficient as Google, and how can you get more out of it? Here are 5 simple tips: Make use of !bangs DuckDuckGo has had bangs for years, though I only discovered them recently. Put simply, a bang allows you to perform a search directly on another site, from the DuckDuckGo site.
Welcome to v2 of michjnich.com
Welcome … … to v2 of my personal site. Version 1 was created using mkdocs and deployed on GitHub pages. Mkdocs is extremely simple to use and a powerful tool, but perhaps not ideal for a more “modern” looking site. While I could have run a blog using mkdocs, it wasn’t entirely practical, and it was for that reason I then set up a seperate tech blog site. stddev.tech This was actually pretty short lived, mainly because I used the hosted version of Ghost, which was quite expensive for somebody just running a small blog with only a handful of visitors, so when it came time to renew I found it hard to justify.
Remote working is not a zero-sum game!
This post was originally published on LinkedIn Wikipedia describes a zero sum game as: In game theory and economic theory, a zero-sum game is a mathematical representation of a situation in which each participant’s gain or loss of utility is exactly balanced by the losses or gains of the utility of the other participants. It goes on to compare it with cutting a cake to share amongst a group.
What to do with your legacy monolith
This post was originally published on LinkedIn Are you working at a company that has a legacy monolith that you’d like to get rid of? Are you sure? Maybe you think you should migrate it to a microservice-based architecture? After all, that’s what all the cool kids are using these days, isn’t it? Before you do that, just stop and think a moment about what it is you actually need, and what problems you are trying to solve by considering what I presume would be a fairly major transformation project.