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
@AbuAbir
AbuAbir / Good practice.md
Last active February 9, 2023 14:57
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 / Makefile
Last active November 8, 2024 13:37
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 / fedora_post_install.md
Last active July 31, 2024 20:09
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

@alexaleluia12
alexaleluia12 / flask_logging_requests.py
Last active March 19, 2024 13:49
Flask Logging (every request)
#/usr/bin/python
# http://exploreflask.com/en/latest/views.html
# https://stackoverflow.com/questions/51691730/flask-middleware-for-specific-route
# https://dev.to/rhymes/logging-flask-requests-with-colors-and-structure--7g1
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask, request, jsonify
from time import strftime
@rygorous
rygorous / random_bracket_seq.py
Created March 8, 2019 01:55
Generate a random, sequence of correctly nested parentheses
import random
def random_bracket_sequence(n):
"""Generates a balanced sequence of n +1s and n -1s corresponding to correctly nested brackets."""
# "Generating binary trees at random", Atkinson & Sack, 1992
# Generate a randomly shuffled sequence of n +1s and n -1s
# These are steps 1 and 2 of the algorithm in the paper
seq = [-1, 1]*n
random.shuffle(seq)
@wshayes
wshayes / .bumpversion.cfg
Last active May 8, 2020 19:58
Bumpversion configuration
[bumpversion]
current_version = 0.0.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}
[bumpversion:part:release]
@YumaInaura
YumaInaura / README.md
Last active November 21, 2023 05:48
Gist — Manage in one repository many gists by using git submodule

Gist — Manage in one repository many gists by using git submodule

Gist is a nice service. We can write code so easily and manage files as repository.

But bad points are …

  • Many repository
  • Gist destributes random hash to perticular gists (repositories).
  • So difficult to find or remember contents as repository.
@meanevo
meanevo / compile-openssl_102.sh
Last active March 14, 2023 11:41
Compile OpenSSL 1.0.2* from source on CentOS 7
# Make sure you have these installed
yum install -y make gcc perl pcre-devel zlib-devel
# Download/Extract source
wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxf /tmp/openssl.tgz -C /tmp
cd /tmp/openssl-*
# Optional: Patch chacha20
# https://github.com/cloudflare/sslconfig/tree/master/patches
wget https://raw.githubusercontent.com/cloudflare/sslconfig/master/patches/openssl__chacha20_poly1305_draft_and_rfc_ossl102j.patch
patch -p1 < openssl__chacha20_poly1305_draft_and_rfc_ossl102j.patch
import flask_restful
class Api(flask_restful.Api):
"""
Patch Flask-style custom error handling into the Flask-RESTful api class.
"""
def __init__(self, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
@seebk
seebk / README.md
Last active July 23, 2024 22:43
Extract embedded certificates and keys from OpenVPN config files

This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.

Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).

Instructions:

  • Make shure all the required packages are installed. For example on Ubuntu and Debian run:

    $ sudo apt-get install python3 network-manager-openvpn-gnome