Skip to content

Instantly share code, notes, and snippets.

View jtmoon79's full-sized avatar
💭
😇

James Thomas Moon jtmoon79

💭
😇
View GitHub Profile
@jtmoon79
jtmoon79 / python-embedded-for-Win10.md
Last active May 13, 2024 14:32
fully configuring embedded Python on Windows 10

Update: use PowerShell script PythonEmbed4Win.ps1.

The instructions in this gist have some subtle problems and this gist will not be updated.

About


@jtmoon79
jtmoon79 / openssh-latest-build-install.md
Last active April 19, 2024 06:36
OpenSSH: build and install the latest version
@jtmoon79
jtmoon79 / wireguard-site-to-site.sh
Last active April 12, 2024 14:37
Wireguard Site to Site generator
#!/usr/bin/env bash
#
# https://gist.github.com/jtmoon79/c951f81f621bb87ddb60836245aca4ff
#
# Script to generate a site-to-site Wireguard IPv4 VPN tunnel
# configuration files, and commands for systemd services.
# This script only covers a narrow scope of possible networking arrangements.
# It may not perfectly fit the user's needs, but it may provide the user with
# a working example that they can modify for their needs.
#
@jtmoon79
jtmoon79 / rename-paystatements-from-paperlessemployee.sh
Created September 13, 2023 18:43
Rename PDF files downloaded from paperlessemployee.com
#!/usr/bin/env bash
#
# rename pdf files from paperlessemployee.com
#
set -euo pipefail
if [[ ${#} -ne 1 ]] && [[ ${#} -ne 2 ]]; then
echo "usage:
$(basename "${0}") SelectedPayStatements.pdf [Agency Name]
@jtmoon79
jtmoon79 / network-certificate-authority-and-host-certificate-creation-instructions.md
Last active January 6, 2023 05:42
Network Certificate Authority and Host Certificate creation instructions
@jtmoon79
jtmoon79 / wireguard-client-to-site.sh
Last active December 6, 2022 02:09
Wireguard Client To Site generator
#!/usr/bin/env bash
#
# https://gist.github.com/jtmoon79/217e55272c55631ba6025c9f890b3dde
#
# Script to generate a client-to-site Wireguard IPv4 VPN tunnel
# configuration files, and commands for systemd services.
# This script only covers a narrow scope of possible networking arrangements.
# It may not perfectly fit the user's needs, but it may provide the user with
# a working example that they can modify for their needs.
#
@jtmoon79
jtmoon79 / glances-start.sh
Last active October 26, 2022 02:33
start glances, single instance, user glances
#!/usr/bin/env bash
#
# run single instance of glances on the system as user glances.
# follows from https://gist.github.com/jtmoon79/1b5a806b3e71874542c21b1578156a42
# designed for a Debian-based Linux
#
# place this file at /var/lib/glances/glances-start.sh
# chmod +x /var/lib/glances/glances-start.sh
# should look like:
# ls -l /var/lib/glances/glances-start.sh
@jtmoon79
jtmoon79 / glances-install.sh
Last active October 26, 2022 02:23
install glances system monitor on a Debian system
#!/usr/bin/env bash
#
# install glances system monitor onto a Debian-based System under user "glances"
# https://github.com/nicolargo/glances
#
# This creates user "glances" (which glances presumes to do) but for the purpose of install the program glances (and the
# required libraries) under permissions of user glances. This way,
# - glances programs are slightly better contained under user glances permissions
# - glances (and related programs) are not added to shared $PATH directories
#
@jtmoon79
jtmoon79 / venv-create.sh
Last active July 20, 2022 22:46
Python virtualenv create
#!/usr/bin/env bash
#
# helper to quickly create a Python virtualenv
# latest at https://github.com/jtmoon79/dotfiles/blob/master/utilities/venv-create.sh
set -eu
# XXX: not very portable
source /etc/os-release
@jtmoon79
jtmoon79 / set-datetime-of-pics-vids.ps1
Last active July 8, 2022 22:59
set filesystem datetime of jpg and mp4 files
#!powershell
<#
.SYNOPSIS
Use exiftool to set file system datetimes values to those found within embedded media
tags of .mp4 and .jpg files.
.DESCRIPTION
Use exiftool (https://exiftool.org/) to set file system datetime attributes
FileModifyDate, FileAccessDate, FileCreateDate.