Skip to content

Instantly share code, notes, and snippets.

View chidimo's full-sized avatar
💭
Building awesome apps, one line at a time

Orji Chidi Matthew chidimo

💭
Building awesome apps, one line at a time
View GitHub Profile
@nguyenkims
nguyenkims / log.py
Last active February 13, 2024 07:59
Basic example on how setup a Python logger
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = "my_app.log"
def get_console_handler():
console_handler = logging.StreamHandler(sys.stdout)
console_handler.setFormatter(FORMATTER)
@TheCodedSelf
TheCodedSelf / author-amend.sh
Created February 12, 2017 17:19
Change all commits with author email "bruce.wayne@wayneenterprises.com" to "batman@justiceleague.com"
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="bruce.wayne@wayneenterprises.com"
CORRECT_NAME="The Dark Knight"
CORRECT_EMAIL="batman@justiceleague.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@incredimike
incredimike / variousCountryListFormats.js
Last active April 30, 2024 11:10
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//