Categories
django python

Adding Time taken to respond to a request in the header of a Django Rest Framework Response

Ever wanted to add the time taken for a response to your API, so the client knows how long the server took to send a response? I first noticed this cool feature on AWX, a management platform for ansible playbooks. Their response headers looked like this: So I checked out their source code and copied […]

Categories
GNU/Linux Security Server ubuntu

Fail2Ban Custom filters and Testing Regex’s against existing Logs

Fail2ban is a tool that can automatically ban malicious bots trying to get into your server. Provided you set up filters and the ip address is logged you can use fail2ban with any application. fail2ban is built with python2.7 Create a filter, using a regular expression: In /etc/fail2ban/filter.d/my-custom-filter.conf: [Definition] failregex = ^www.example.com -.* “POST \/user\/register […]

Categories
ansible Continuous Integration git jenkins

Getting Jenkins to deploy with ansible using SSH Agent Forwarding

Your CI/CD tool needs access to code and server, for linting, testing and deploying. Setup up access on the various devices in a secure manner can be very time consuming. It is important to make use of available technology to make our lives easier. Jenkins needs access You will have created credentials for Jenkins – […]

Categories
Finance

Linked Investment Platform (LISP) Fee Comparisons in South Africa

This post gives an overview and comparison of Living Annuity Platforms in South African. What are LISPs? A LISP lets the owner choose where to invest the money within the account. The money will be deposited into a living annuity platform, which is usually a website or portal that you can use to view and manage […]

Categories
Hardware

How to fix a Brother DCP-J105 Print head not printing Black and other Tricks

Ever replaced the ink cartidge on a Brother and it stops printing that colour? I had that problem after not using it for a while and the Brother DCP-J105 would no longer print black. I now have the solution of How to fix a Brother DCP-J105 not printing black. After a few weeks of trying, […]