Skip to content

Instantly share code, notes, and snippets.

View lykinsbd's full-sized avatar
🧑‍💻
Happy Automating!

Brett Lykins lykinsbd

🧑‍💻
Happy Automating!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lykinsbd on github.
  • I am lykinsbd (https://keybase.io/lykinsbd) on keybase.
  • I have a public key ASBQhLHc9LMYRMHdlkiYcsccwpsBo1LMdO1hf5oHar60XAo

To claim this, I am signing this object:

@lykinsbd
lykinsbd / selfsigned.py
Last active July 15, 2019 18:25 — forked from bloodearnest/selfsigned.py
Create a self-signed x509 certificate with python cryptography library
# Copyright 2019 Simon Davy, Brett Lykins
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@lykinsbd
lykinsbd / terminal command
Created February 19, 2020 01:55 — forked from korjjj/terminal command
GNS3 preferences terminal command
if tmux has-session -t gns3; then if ! tmux find-window %d; then tmux new-window -n %d "telnet %h %p"; fi; else xterm -e tmux new-session -s gns3 -n %d "telnet %h %p"; fi
@lykinsbd
lykinsbd / pep634-messing.py
Created April 22, 2022 18:35
If Elif vs Match Case in Python 3.10
def convert_timeframe_match_case(timeframe: str) -> tuple[date, date]:
"""Convert a provided relative timeframe, i.e. 'Last Week' into a from_date and to_date datetime `Date` object.
Args:
timeframe (str): A string for a relative timeframe from among the below:
["Yesterday", "This Week", "Last Week", "This Month", "Last Month", "Year to Date"]
Returns:
tuple[Date, Date]: from_date and to_date for a given timeframe