Skip to content

Instantly share code, notes, and snippets.

View aaroncoffey's full-sized avatar

Aaron Coffey aaroncoffey

View GitHub Profile
@vguhesan
vguhesan / humanize.md
Last active October 25, 2023 03:39
Python Humanize timedelta without Arrow or Humanize library

Python Humanize timedelta without Arrow or Humanize library

Given 2 dates that are formatted from a string to arrow type.

>>> from datetime import datetime 
>>> start = datetime.now()
>>> end = datetime.now()
>>> diff = end - start
@hdml
hdml / custom_ssl_unifi_controller.md
Last active June 9, 2024 16:57
Installing a custom SSL cert on a Unifi Controller

##Installing a custom SSL cert on Unifi Controller

Requirements:

  • Domain certificate (*.crt)
  • Certificate key (*.key)
  • Intermediate certificate from CA (*.crt, *.pem)
  • Permissions to restart the unifi service
  • Debian or Ubuntu Unifi Controller installation
@kings-gambit
kings-gambit / zen.py
Created February 13, 2017 22:31
Zen
import random
import StringIO
import sys
import time
text_color = [
'\033[90m', # GREY
'\033[91m', # RED
'\033[97m', # WHITE
'\033[92m', # GREEN