Skip to content

Instantly share code, notes, and snippets.

View lbussy's full-sized avatar
🍾
Writing Wsprry Pi v2

Lee Bussy lbussy

🍾
Writing Wsprry Pi v2
View GitHub Profile
@lbussy
lbussy / Makefile
Last active April 20, 2025 12:40
Generic C and C++ Makefile
# -----------------------------------------------------------------------------
# MIT License
#
# Copyright (c) 2025 Lee C. Bussy (@lbussy)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@lbussy
lbussy / _Clean_Whitespace.md
Last active March 23, 2025 12:54
Clear whitespace from the end of lines and blank lines

Clean Whitespace

Overview

whitespace_clean is a Bash script designed to remove extraneous whitespace from source code and text files. It helps maintain clean, readable files by stripping trailing whitespace from supported file types.

Features

  • Processes files recursively or in a single directory
  • Supports dry-run mode to preview changes
@lbussy
lbussy / SSH_Copy.md
Last active March 23, 2025 12:54
Manage your shared SSH keys and .ssh config file
@lbussy
lbussy / Debug Print.md
Last active December 30, 2024 17:26
A framework for providing valuable debug printing during Bash developement, without having to remove it all manually when you are done.

Debug Script Example

This script demonstrates how to implement debug functionality to a Bash script in a simple, extensible manner. It provides a mechanism to enable and pass debug information throughout the script, allowing developers to trace function calls and view debug messages during execution.

How is this different than just dropping echo everywhere?

Git Functions Documentation

Overview

This script interacts with Git repositories to perform various functions such as cloning, downloading files, and updating file ownership and permissions.

Usage

To use the script, run it as follows:

Filetype Classification Script Documentation

Overview

This script, filetype.sh, is designed to classify files based on their types and extensions. It recursively examines files and directories, determines their types using the file command, and classifies them into human-readable categories.

Features

  • File Type Classification: Using an associative array (FILETYPE_MAP), the script classifies files based on their extensions.
@lbussy
lbussy / README.md
Last active December 12, 2024 13:51
Systemd .service File Generator

Systemd .service File Generator

This script automates the creation or updating of systemd service unit files. It validates user inputs, generates or modifies the service files, validates them, and enables them to start with the system.


Header

  • Purpose: Generate or update systemd service files.
  • Author: Lee Bussy
@lbussy
lbussy / ac600_rasp_32bit.md
Created December 9, 2024 20:40
Sharing: TP-Link AC600 Nano on Raspbian Bookworm 32-Bit

I figured this out, and I wanted to share how to do it.

  1. Kernel headers are not (yet?) available on 32-bit v8. To get past this:
echo "arm_64bit=0" | sudo tee -a /boot/firmware/config.txt > /dev/null
  1. Reboot
  2. Either:
@lbussy
lbussy / Bash Alias Installer.md
Last active April 19, 2025 13:56
Bash Aliases & RPi Setup

Bash Aliases & RPi Setup

Install

curl -fsSL https://gist.githubusercontent.com/lbussy/23c05d8dc8c24d8d8edddf1d381f1c8b/raw/install_aliases.sh | bash

Overview

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