Skip to content

Instantly share code, notes, and snippets.

@coffeejoshua
coffeejoshua / bash_logger.sh
Created May 4, 2023 19:17
Bash Logging Snip
#!/bin/bash
# bash_logger.sh
LOGFILE=log_output.txt
#######################################
# Log to the terminal and a file.
# Globals:
# LOGFILE
@coffeejoshua
coffeejoshua / otc_drug.md
Created July 19, 2022 21:50
OTC Drug Chart

For cold or flu, take these over the counter drugs on a schedule until feeling better or see a doctor

Take the Mucus relief and a pain reliever of your choice. If things are bad, take both pain relievers for a short time.

Drug Brand Name Symptoms Notes Schedule
Guaifenesin Mucinex Congested, Cold, Allergies Super effective, need to drink extra water 1 pill 400 mg evry 4 hours

AND

@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
@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 / 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 / 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
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 / .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
@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 / 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