Skip to content

Instantly share code, notes, and snippets.

View aimfireready's full-sized avatar

Gandalf the Bray aimfireready

  • Aim Fire Ready LLC
  • Bloomington, Indiana
View GitHub Profile
#!/bin/bash
#
# Add new match entry to Espanso base config file
#
# v0.1 2024-01-10 09:52:15 Init though...
# v0.2 2024-01-10 09:52:52 Added time to date header
# (C) 2024 Gandalf Farnam
# License: MIT
####################################################
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Title: ni.bat
::::::::::::::::::::::
:: Desc.: curl Ninite and run the program installer
:: Usage: ni.bat [program]
:: Source: https://gist.github.com/aimfireready/765ec65812beb9cedad50cfd97abc6ae
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
curl -o "%1.exe" https://ninite.com/%1/ninite.exe && call %1.exe
@aimfireready
aimfireready / date8601.bat
Created February 14, 2023 17:43
Output current date in standard ISO8601 format
@echo off
echo.
echo Output current date in standard ISO8601 format
echo v1.0 2023-02-14
for /F "tokens=2-4 delims=/ " %%a in ('date /t') do set today=%%c%%a%%b
echo Today = '%today%'
pause
@aimfireready
aimfireready / Init Though
Last active March 10, 2026 04:09
Initialize a new Git project and corresponding Github repo
#! /bin/bash
###########################################################
# ************************
# ** **
# ** Init Though **
# ** **
# ************************
#
# Requirements
# - Git installed and configured
@aimfireready
aimfireready / p.bat
Created January 12, 2023 16:58
Ping local machines without breaking your fingers!
::::::::::::::::::::::::::::::::
::
:: Name : Short Ping
::
:: Usage : 'p x y'
::
:: Output: 'ping 192.168.x.y'
::
:: Created: 2022-11-02
::
@aimfireready
aimfireready / sshd_config
Created October 30, 2022 22:10
Standard Issue SSH Config for Ubuntu Server
######################################################
# Standard Issue SSH Config for Ubuntu Server
# 2022-10-30 v1.0 Distilled from Gondor
#
#
######################################################
Include /etc/ssh/sshd_config.d/*.conf
Port 22
LogLevel INFO
PermitRootLogin no
@aimfireready
aimfireready / pon.sh
Created October 21, 2022 15:56
Pushover curl
####################################################
# v1.0.0
# 2022 Gandalf Farnam
# Send a Pushover notification
#
# Usage:
# - Replace $TOKEN with the shared folder token.*
# - Replace $USER with your domain.
####################################################
@aimfireready
aimfireready / motioneye-file-monitor.sh
Created October 21, 2022 14:50
Watch for new files in Motioneye directory and upload them to a shared Nextcloud folder.
# v1.0.0
# 2022 Gandalf Farnam
# Watch for new files in Motioneye directory and upload them to a shared Nextcloud folder.
#
# Specific parameters for inotifywait:
# --event create = only created files. This includes files copied to the target directory
# --exclude .*thumb$ = any files except thumbnails
# -r including subdirectories
#
# Specific parameters for curl:
@aimfireready
aimfireready / clone-groups
Created October 11, 2022 18:47
Copy bash groups from model user to target user
# This script will take the groups of the current user.
# Usage: 'clone-groups wesley'
$targetUser=$1
target=$(for i in $(groups);do echo "$i,";done)
#Remove final character to remove the extra ',' at the end of the string
target=${target%?}
unspaced=$(echo $target | sed 's/ //g')
@aimfireready
aimfireready / mem.sh
Last active November 13, 2020 15:58
Display Total Amount of Physical RAM on Ubuntu
printf "Total RAM: %.0fGB\n" $(expr $(cat /proc/meminfo | sed -n 's/MemTotal: //p' | sed -n 's/kB//p') / 1000000)