Skip to content

Instantly share code, notes, and snippets.

View jeremysells's full-sized avatar

Jeremy Sells jeremysells

View GitHub Profile
@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 / popos_install_notes.md
Last active December 3, 2020 07:01
Popos install notes
@jeremysells
jeremysells / raspberry-pi-headless-setup-notes.md
Created November 7, 2020 22:40
raspberry-pi-headless-setup-notes
@jeremysells
jeremysells / nvidia_docker_gpu_notes.md
Created July 15, 2021 22:24
NVIDIA GPU for Docker 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 / 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 / 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"