Skip to content

Instantly share code, notes, and snippets.

View jeremysells's full-sized avatar

Jeremy Sells jeremysells

View GitHub Profile
@jeremysells
jeremysells / backup-dd.sh
Last active January 15, 2022 06:38
My backup commands
#!/usr/bin/env bash
echo "License: MIT please read https://opensource.org/licenses/MIT"
echo ""
sleep 5
sudo bash -c "dd if=/dev/nvme0n1 | gzip > /media/name/hdd/hdd-disk.gz"
@jeremysells
jeremysells / deprecated_decorator.py
Created November 19, 2021 02:11
deprecated_decorator.py
import logging
logger = logging.getLogger(__name__)
def deprecated(notes: str = ""):
# https://stackoverflow.com/questions/2536307/decorators-in-the-python-standard-lib-deprecated-specifically
# https://stackoverflow.com/questions/5929107/decorators-with-parameters
if notes != "":
notes = f" " + notes
@jeremysells
jeremysells / linux_setup_notes.md
Last active July 16, 2021 03:46
Notes on how to setup Linux.md

Linux Setup notes

https://github.com/pyenv/pyenv

apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git

@jeremysells
jeremysells / nvidia_docker_gpu_notes.md
Created July 15, 2021 22:24
NVIDIA GPU for Docker Notes
@jeremysells
jeremysells / raspberry-pi-headless-setup-notes.md
Created November 7, 2020 22:40
raspberry-pi-headless-setup-notes
@jeremysells
jeremysells / popos_install_notes.md
Last active December 3, 2020 07:01
Popos install notes
@jeremysells
jeremysells / exception_error_handler.php
Created October 5, 2019 13:21
php exception error handler
<?php
declare(strict_types=1);
error_reporting(E_ALL);
set_error_handler(function ($severity, $message, $file, $line) {
if (!(error_reporting() & $severity)) {
// This error code is not included in error_reporting
return;
@jeremysells
jeremysells / bluetooth-audio-fix.sh
Created September 21, 2019 18:19
Xubuntu a2dp/audio sink wont connect blueman.bluez.errors.DBusFailedError: Protocol not available
# Some commands I use to fix bluetooth audio issues.
# As is where is
sudo killall pulseaudio
sleep 10
pulseaudio --start
@jeremysells
jeremysells / XFCE_date_format.md
Created August 2, 2019 22:29
XFCE date format
@jeremysells
jeremysells / Terraform-DigitalOcean-Kubernetes-Helm-Dashboard.tf
Last active June 8, 2023 12:43
Terraform-DigitalOcean-Kubernetes-Helm-Dashboard.tf
# This was a test, use as is where is (MIT License)
# Test of Terraforming a Kubernetes cluster on Digital Ocean with Helm and a basic setup (dashboard and ingress)
# I was also push a container in via local Helm that had an image stored in Gitlabs Docker Registry
# You need to have the following tools installed (Terraform, Helm, Kubectl)
# run `terraform init`, then `terraform apply`
# Goto the Digital Ocean dashboard and download the kubeconfig to `/.kube/config`
# To access the proxy run `kubectl proxy` and then goto
# `http://localhost:8001/api/v1/namespaces/kube-system/services/https:dashboard-kubernetes-dashboard:https/proxy/
#
# To get the token, use something like: