Skip to content

Instantly share code, notes, and snippets.

View adriangb's full-sized avatar

Adrian Garcia Badaracco adriangb

View GitHub Profile
@shashankrnr32
shashankrnr32 / model.py
Last active September 29, 2023 20:04
Pydantic Model with Builder pattern
"""
Github Issue Thread: https://github.com/samuelcolvin/pydantic/issues/2152#issuecomment-786713976
License : MIT
Copyright 2021 Shashank Sharma
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,
@triffid
triffid / openrc-init-pia
Last active February 15, 2024 06:48
shell script for accessing PIA wireguard
#!/sbin/openrc-run
command="/root/bin/pia-wg.sh"
CONFIGDIR="${CONFIGDIR:-/var/cache/pia-wg}"
CONFIG="${CONFIG:-/etc/pia-wg/pia-wg.conf}"
extra_started_commands="reload"
depend() {