Skip to content

Instantly share code, notes, and snippets.

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAqewtjUA1niTgzcZC0FNfaaE2Et3LC2iyVRgkVvb0pjbQvhUf
PTmqIKPurMA4EFlXCh14UM31AR8AGRh4yiQCca0qzHqjs5OL6h8F140K0VXR4J8R
uuZUhoA2U1SiLEuJuWZUbXQq+uWW3OKCx2aCTMXOKomYnVuJ4p8b8NTTXWcPsHJ+
NyGzUfSARFybmv302cw9Nn6M+fcCjaWdaet4htcTMJI675bBI8iZ14grWud90cPl
0qk4sdxThAgqoGvDbE5FdHKF3XKUGSPhUyoa3s914K6R3W4/TjNV6yC8cKDffHIV
B/SWDzzZR5WTjbfETc1Dku+5c6kBbLxJ505iYQIDAQABAoIBAAq+lGLKHJnTWyOn
1bG2k+Hp/7FRtPUTubMHw8R7+RxJewmJ7F/Cta86rmzd+q2N+KL7GhCB9WwMucTc
d0bQ4BawDHTBjHhebApxy7zFflmeQ5cgd86Joe6fTNAYGekTHbJLdis1nUIgIln1
OK/DG5ofJ9oouS26DA34YZvo2TSepUVtV/GGUheX5gGCR1/bwNEW021hG+h53f5Z
@coffeejoshua
coffeejoshua / gist:439637f3261d729d061915d9503407fd
Created December 26, 2017 17:54
bash exit cleanup function
#!/usr/bin/env bash
# bash exit cleanup snippet
# By default, the shell will continue on errors (sometimes to your detriment)
# To learn about exit status, visit http://tldp.org/LDP/abs/html/exit-status.html
# To learn about the set builtin, visit https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# To learn about traps, visit http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
# We use set -e to exit immediately if a command exits with a non-zero status.
@coffeejoshua
coffeejoshua / backpacking.md
Last active July 26, 2023 16:18
Backpacking Checklist

Backpacking Checklist

Shelter and sleep system

  • Tent, Footprint, Rain cover/fly and stakes (in one pack)
  • Sleeping Bag
  • Sleeping Pad
  • Sleeping Pillow

Water Treatment

@coffeejoshua
coffeejoshua / rpi_bullseye_setup.sh
Last active January 31, 2022 05:27
Raspberry PI Bullseye new user, xrdp and group permissions setup
# In raspberry pi VERSION="11 (bullseye)", you need to make a new user instead of using "pi" user for xrdp.
# Install xrdp
sudo apt-get install raspberrypi-ui-mods xinit xserver-xorg
sudo reboot
sudo apt install xrdp
# Check on xrdp status
systemctl show -p SubState --value xrdp
@coffeejoshua
coffeejoshua / .vimrc
Last active February 11, 2022 02:37
My Solarized and more modern vimrc
" ONE TIME SETUP
" Write this file to ~/.vimrc, if it doesn't exist, create it
" You might need to install extras (ex: get syntax highlighting on raspberry pi)
" sudo apt-get install vim-gui-common
" sudo apt-get install vim-runtime
" On Ubuntu, you might need to use "sudo update-alternatives --config editor" to change to vi
" For more, visit github: simonista
REM Restart the network interface "Ethernet" as a workaround for Intel's bad driver
@echo off
echo "Disable Ethernet adapter as a workaround"
netsh interface set interface "Ethernet" disable
echo "... and enable it again"
netsh interface set interface "Ethernet" enable
echo "done"
@coffeejoshua
coffeejoshua / nvidia_fix.cmd
Created March 12, 2022 17:32
Nvidia Fixup
RunDll32 "C:\Program Files\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage Ansel
RunDll32 "C:\Program Files\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetryContainer
@coffeejoshua
coffeejoshua / pylogging.py
Last active December 21, 2022 02:51
An example logger for Python3
#!/usr/bin/env python3
# Adapted from https://docs.python.org/2/howto/logging-cookbook.html
'''
pylogging.py - Template to add logging to something in Python3
Logging level accepts strings or a numeral value:
CRITICAL 50
ERROR 40
@coffeejoshua
coffeejoshua / alaska.md
Last active June 23, 2022 20:38
alaska.md

Alaska Cruise Checklist

Travel Docs

  • Passport or check if other ID like license is enough
  • antigen COVID-19 test within 2 days prior to embarkation
  • OR PCR COVID-19 test within 3 days prior to embarkation
  • OR At-home medically observed antigen tests (prob not worth the hassle)
  • OR another test per holland's faq
  • Proof of Vaccine card -- make sure it has all 3 including the booster on it to get into Canada
@coffeejoshua
coffeejoshua / day-bag_hike.md
Last active June 23, 2022 20:34
Hiking checklist for generic one day out and back

Day-bag hiking checklist

Wearing

  • Short shirt
  • Light shorts
  • Backpacking socks
  • Boots or trail shoes
  • Glassess with ear grips