Skip to content

Instantly share code, notes, and snippets.

View zobayer1's full-sized avatar
🚧
What should I do next?

Zobayer Hasan zobayer1

🚧
What should I do next?
View GitHub Profile
@zobayer1
zobayer1 / install_bangla_fonts.sh
Created December 4, 2025 10:45
Script for downloading Bangla fonts from OmicronLab and install in your system
#!/bin/bash
# Bangla Font Installer Script v1.0
# MIT License
# Downloads and installs Bangla fonts from OmicronLab
set -e # Exit on error
# Color codes for output
RED='\033[0;31m'
@zobayer1
zobayer1 / Makefile
Last active November 25, 2025 06:39
Generic Makefile for C++ projects with multiple cpp and h files
# Pre-compiler and Compiler flags
CXX_FLAGS := -Wall -Wextra -std=c++17 -ggdb
PRE_FLAGS := -MMD -MP
# Project directory structure
BIN := bin
SRC := src
LIB := lib
INC := include
MAINFILE := $(SRC)/main.cpp
@zobayer1
zobayer1 / gist_blur.md
Last active November 8, 2025 11:44 — forked from AbuAbir/Good practice.md
Good practice to showcase achievement

GIST and BLUR

*collected from "Zobayer Hasan", Solution Architect, TigerIT Bangladesh

Works that you can show are always lot more impressive than works that you can only talk about. So yes, your projects on GitHub should carry a good amount of weight, or consideration in a recruitment phase, granted that they are relevant to the position or field you are trying to get in, and you are able to explain / answer relevant questions. When it comes to group projects, it is a bit sketchy. But these are great for showing how honest you are. Because, trust me, interviewers are usually good enough to catch you if you try to fool them (if they can't, they're probably from a bad company, and you don't want to get in there anyway).

@zobayer1
zobayer1 / fedora_post_install.md
Last active October 30, 2025 14:04
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname

@zobayer1
zobayer1 / fedora_install_python3.md
Last active October 19, 2025 17:39
Install Python 3.6, 3.7, 3.8 in your Fedora system

Python 3.9 comes as a default with Fedora 34. However, sometimes you may wish to install older versions for development and test purposes. Apart from groupinstall command, these instructions work for CentOS and REHL systems as well.

Prerequisites

Install python development dependencies.

sudo dnf groupinstall "Development Tools"
sudo dnf install python3-devel openssl-devel zlib-devel bzip2-devel sqlite-devel libffi-devel

Note: You will need to rebuild and reinstall if you install new source or development libraries for python. Do not create or modify symlinks for python, python3, etc, as that may and will break many dependent libraries in your system.

@zobayer1
zobayer1 / pytest_parametrize.md
Last active April 30, 2025 03:20
Using pytest parametrize with indirect for multiple test functions

Using pytest.mark.parametrize with other fixtures

Introduction

When you want to run tests against multiple test parameters, but you have to use other pytest.fixture objects, you can use pytest.mark.parametrize with indirect parameter to target a fixture for extracting request.param from parametrize list.

Example

@zobayer1
zobayer1 / htpasswd.md
Created January 25, 2021 21:17
Bcrypt password generator for htpasswd with Python

Generator:

# file: gen.py

import bcrypt

def encrypt_password(username, password):
    bcrypted = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt(rounds=12)).decode("utf-8")
 return f"{username}:{bcrypted}"
@zobayer1
zobayer1 / postgres_pgadmin.compose.yaml
Created February 22, 2024 16:16
Run postgres12 and pgadmin4 with docker compose
version: "3"
services:
postgres:
image: postgres:12-alpine
restart: always
ports:
- "5432:5432"
environment:
@zobayer1
zobayer1 / loader.py
Last active December 1, 2023 16:01
Parsing environment variables in an YAML file using PyYAML library
"""A simple yaml loader
Load the content of an yaml file into a python dict. Environment variable can be specified with ${VAR_NAME}. A
default string value can be specified with ${VAR_NAME:DEFAULT}. Able to process multiple occurrences.
requirement: PyYAML
run: python loader.py
"""
import os
@zobayer1
zobayer1 / send_mail.py
Last active November 1, 2023 07:23
Send Emails from GMail using Python SMTP library
# -*- coding: utf-8 -*-
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formataddr
from typing import List
class SendMail(object):