docker inspect --format "{{json .State.Health }}" <container name> | jq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Imagine you are reading data from a source and sending it to somewhere else. | |
| This is a good use-case for generator send method. We can keep writing as we | |
| keep reading them without going in and out of respective context managers. | |
| """ | |
| from typing import Generator | |
| def read_data(file_name: str) -> Generator[str, None, None]: | |
| with open(file_name, "r") as input_file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| postgres: | |
| image: postgres:12-alpine | |
| restart: always | |
| ports: | |
| - "5432:5432" | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## | |
| ## Cleanup your old Kernels after booting up the latest kernel. | |
| ## Source: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/#sect-clean-up-old-kernels | |
| ## | |
| old_kernels=($(dnf repoquery --installonly --latest-limit=-1 -q)) | |
| if [ "${#old_kernels[@]}" -eq 0 ]; then | |
| echo "No old kernels found" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """PostgreSQL Connect | |
| A simple python snippet for connecting to PostgreSQL database using psycopg2 library. | |
| Installl psycopg2: | |
| sudo dnf install python3-devel postgresql-devel | |
| pip install psycopg2 | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- 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): |
*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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """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 |
NewerOlder