Often we need to do alternate things in every steps of a django template for loop while doing things in a loop in a django template. For example, let's say you want to create a widget similar to the following image widget - to show various job types In this example, The Job Type widget…
Category: Programming
TIL – Find the git commit that deleted a file in a git repository
The below command filters commits that deleted file using diff-filter from git log git log --diff-filter=D -- deleted_file.example It takes advantage of the flag diff-filter.
Setup Nginx Reverse Proxy to access PostgreSQL database remotely
In this tutorial, we will be discussing how we can leverage the power of Nginx to create a reverse proxy for our PostgreSQL server. This will allow us to access our PostgreSQL database from remote servers. So for example, let's say you have an app hosted in a vps and you would like to access the app db from your local computer.
Beginning Vim From Scratch
This year, I am going to explore and learn the basics of vim. Each day, I aim to learn a few vim commands and post them as a series of blog articles. Day 1 - Installation, Navigation & How to quit vim Installation check if it is already installed? `vim --version` or install it using…
How to read Data Matrix using Python in Linux
In this article, I'm going to introduce you to an interesting python module named pylibdmtx! This library is written based on the libdmtx library. You can install it in Ubuntu by using the following command: sudo apt install libdmtx0a Now that you have the library installed let's install pylibdmtx. I'm assuming you already have python…
How to download a file from a website link using Python script or, code snippet
In this article, I’m going to demonstrate some code snippets that you can utilize to download files from the Internet using Python. Before we begin, you might be wondering why go through all the hassles of writing scripts to download files when you can simply click and download it by opening it on a browser!…
How to Check Web page for SEO Using Python
Website SEO aka Search Engine Optimization is important for every modern website. However manually validating SEO criteria is quite cumbersome. It is possible to automate most of the SEO checks using python. In this article, I'm going to demonstrate some ideas using basic python code snippets. These scripts will work as a good starting point…
TIL – Renaming a Git Branch
To rename a git branch locally type the following: git branch -m <new_branch_name> Example of renaming a local git branch Let's say we had a branch `patch_stikcynavbar` and we want to fix the spelling then we just type: git checkout patch_stikcynavbar git branch -m patch_stickynavbar Example of renaming a remote git branch First, we rename…
Setup Real Time Login Alert using a Telegram Bot in Linux VPS
In this article, We are going to setup linux vps login alert based on PAM using Telegram Bot. I am assuming you already have a vps and know how to use ssh to login. 1. Create a Telegram Bot and Get the Access Token To create a Telegram bot, we will need a telegram account.…
The Term “Good Programming” – in a nutshell
Nowadays the term Programming is becoming very popular! Specially among those who are involved in any profession related to Computer Science or, Web Development & Design. Most of them do programming more or less everyday! But, not everyone who code is a good programmer! One of the biggest reason behind this is to be a…