
- Details
- Written by: Jason Ross
If you're used to developing on Windows, you've almost certainly used IIS
to serve web pages, applications, APIs etc. This was always my experience and, like so many other Windows products, it spoils you by doing a lot of the administration automatically. Moving to a Linux-based job was a bit of a shock - I asked which web server we were using and was told "nginx
" a "reverse proxy", with no further explanation. So I started looking through the documentation, and found that nginx
is a whole world of fun, which can solve most of your web-based requirements and more.

- Details
- Written by: Jason Ross
Sometimes you really need to know your machine's public IP address, so you can use it in your scripts or applications. Not just the IP address on the local network - that's easy unless you need the IPv6 version - but the one that the rest of the internet sees. How can you find this?
You could just go to one of the many web sites you find by searching "What is my IP address", but then you need to scrape the data from the page. You could try tracing through the route your requests take to a particular site, but that's just ridiculously hard and prone to errors. There is actually a really simple way that will do the job nicely - let's take a look at that.

- Details
- Written by: Jason Ross
Once you've got more than a few years' experience as an engineer, people generally expect you to start mentoring others. How should you approach this?

- Details
- Written by: Jason Ross
If you've read my article Infra-Red Imaging With The Grid-EYE AMG8833 Sensor, you'll have read how easy it is to connect the sensor to a Raspberry Pi and to start getting Infra-Red images. The software that I'm using to display the images, from https://github.com/makerportal/AMG8833_IR_cam, gets the job done but it's quite slow. How slow? Well, on a Raspberry Pi 3 it displays 3 or 4 frames per second at best, although the sensor handles 10 frames per second. I know it's provided as a demo to get you going with the sensor, but faster is always better!
Read more: Infra-Red Imaging With The Grid-EYE AMG8833 Sensor - Part 2

- Details
- Written by: Jason Ross
If you're using ssh
and authenticating your connections with certificates, you can use a different certificate for each connection. This is very useful if you want to keep everything separate, but it won't be long before you try to log into a machine using:
ssh user@<ip address>
and you get an error like:
Received disconnect from <ip address> port 22:2: Too many authentication failures
Disconnected from <ip address> port 22
How can you fix this?

- Details
- Written by: Jason Ross
When you develop with Python, you normally use PyPI as the source for your package dependencies whether they're third party or your own. Poetry is a great way to handle this administrative burden - at least it's better than using the regular pip
and requirements.txt
method.
But what if you don't want everything to come from PyPI? What if you want to implement your own private package index on your own network? What if you want to mix and match the sources on a package-by-package basis, so you can run development packages against your system?
Don't worry, it's pretty straightforward. Let's dive in...

- Details
- Written by: Jason Ross
Resource leaks are a problem that will sneak up on you during the execution of your program. Like their more famous relative, memory leaks, they're caused when you allocate something and then don't release it when you've finished with it.
Sometimes their effect is obvious. Your system might start and then crash immediately. That's good, because you're obviously calling the guilty code a lot, and that means you have a better idea where to look for the problem. Things get more complicated when the resource is only used occasionally.