Skip to content

Instantly share code, notes, and snippets.

View lbussy's full-sized avatar
🍾
Just released Keg Cop 1.2!

Lee Bussy lbussy

🍾
Just released Keg Cop 1.2!
View GitHub Profile
@lbussy
lbussy / .bash_aliases
Last active October 28, 2023 12:59
Bash Aliases
# Add to ~/.bash_aliases
#
# Random helpers
alias cd..='cd ..' # Get rid of command not found error
alias diff='colordiff' # Colorize diff output
alias ping='ping -c 3' # Stop pings after three
# Do system update/upgrade and cleanup in one shot
alias update='sudo apt --fix-broken install -y && sudo apt update && sudo apt upgrade -y && sudo apt autoremove --purge -y && sudo apt clean && sudo apt autoclean -y'
alias upgrade='update'
@lbussy
lbussy / README.md
Created May 13, 2023 13:24
JQuery-based File Upload Functions

File Upload

This demo file will allow uploading to a capable endpoint (in this case /api/v1/fs/upload/). It is styled with Bootstrap as an example of the integration.

@lbussy
lbussy / log_tail.php
Last active March 20, 2023 16:05
Single File PHP Log file Tail/View
<!--
PHP Log Tail
by Lee C. Bussy
A single-page log file viewer with "tail -f" capabilities.
Pass the name of the log file to be viewed as a URL parameter:
log_tail.php?logFile=my.log
For safety and to prevent breakouts, the path to the log file
@lbussy
lbussy / I2C_LCD_driver.py
Created September 4, 2021 13:01
Enable and Test I2C LCD Displays on the Raspberry Pi
# -*- coding: utf-8 -*-
# Saved from:
# https://www.circuitbasics.com/raspberry-pi-i2c-lcd-set-up-and-programming/
# Original code found at:
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
@lbussy
lbussy / README.md
Last active August 6, 2021 11:20
Change Git to Use SSH

Change Git to Use SSH

Here's how to change git to use SSH.

The below scripts will automate the repo changes needed.

@lbussy
lbussy / get_git_branches.md
Last active August 6, 2021 11:21
Git Fetch Does Not Get Origin Branches

Get all Git Branches

When you git fetch sometimes you may not see all origin branches when you issue the command git branch -a or git branch -r.

This happens sometimes, if you change the remote repository with:

git remote set-url origin https://github.com/{owner}/{repository}

When this happens, exit .git/config and look for a hard-coded branch name in the origin:

@lbussy
lbussy / README.md
Last active November 8, 2020 15:29
PWM Generator for Raspberry Pi

Raspberry Pi PWM

This Python3 script was created to generate a square wave pattern from the GPIO of the Raspberry Pi. This signal was used to inject a signal into an electronics project, but could be used as the basis for any PWM needs.

pic_6_1

The script is configured to output the signal

@lbussy
lbussy / README.md
Last active November 7, 2020 19:45
Check Temp Throttling on RPi

Check Temperature Throttling on the Raspberry Pi

This small Python script will display any temperature throttling messages on the Raspberry Pi.

@lbussy
lbussy / README.md
Last active November 8, 2020 16:06
Disable IPv6 on Raspberry Pi
@lbussy
lbussy / README.md
Last active March 17, 2024 21:00
External Button Shutdown for Raspberry Pi

Shutdown Raspberry Pi with a Single Button

There are two methods:

  1. Scripted Method
  2. Boot Overlay Method (also below as "tl;dr")

tl;dr Version

Add the following to your /boot/config.txt and reboot: