I hereby claim:
- I am ergosteur on github.
- I am ergosteur (https://keybase.io/ergosteur) on keybase.
- I have a public key ASAR_ZUzksDv7ylw4SoC_asfXSg4ANOZe0O4IN6McdwpxQo
To claim this, I am signing this object:
#!/bin/bash | |
# Script name: gaminit | |
# | |
# This script sets the GAMCFGDIR environment variable to the directory where the script is located, | |
# appended with a domain name provided as an argument. If the specified domain subdirectory does not exist, | |
# it prompts the user to confirm if they want the directory to be created. | |
# | |
# Does NOT WORK with standard gam, as only GAMADV-XTD3 supports the GAMCFGDIR environment variable!! | |
# | |
# If a 'gam' executable is found in the same directory as the script, it adds the directory to the PATH. |
#!/bin/bash | |
# Check if backup directory is provided | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <backup_directory>" | |
exit 1 | |
fi | |
backup_dir=$1 |
<# | |
.SYNOPSIS | |
Script to get the height and width of video files and add them to the Get-ChildItem object array. | |
.DESCRIPTION | |
Run the script similar to how Get-ChildItem would be used. Parameters Path, Filter and Recurse are accepted. | |
Can also filter based on MaxHeight. | |
Depends on ffprobe being in path in oreder to get video dimensions. | |
Returns an array of type System.IO.FileSystemInfo. | |
Example usage: |
#!/bin/bash | |
# | |
# dockerized-ffmpeg-drop-in | |
# version 0.3 | |
# https://gist.github.com/ergosteur | |
# ** Partially AI-generated code via ChatGPT | |
# | |
# | |
# This is a shell script to use dockerized ffmpeg (linuxserver/ffmpeg) as a drop-in replacement for the 'ffmpeg' command |
<# | |
.SYNOPSIS | |
This script installs and enables the OpenSSH server service on Windows 10 and 11 client machines. | |
.DESCRIPTION | |
This script installs the OpenSSH server service on Windows 10 and 11 client machines, allows it through Windows Firewall, and sets it to start automatically. It also includes an optional section to restrict incoming connections to only RFC1918 IPv4 addresses when a parameter is passed to the script. | |
.PARAMETER RestrictToRFC1918 | |
When specified, restricts incoming connections to the OpenSSH server to only RFC1918 IPv4 addresses. |
I hereby claim:
To claim this, I am signing this object:
@echo off | |
setlocal enabledelayedexpansion | |
:prompt_drive | |
set /P "drive=Please enter the drive letter to mount in WSL: " | |
:: Validate drive letter | |
if not "!drive:~1!"=="" ( | |
echo Invalid input. Please enter a single letter. | |
goto prompt_drive |
<# | |
.SYNOPSIS | |
Continuously pings a given IP or hostname, making a beep for every ping reply and displaying a character for every reply or timeout. | |
.DESCRIPTION | |
This script continuously pings a given IP or hostname. For every ping reply, it makes a beep sound | |
(unless the -NoBeep switch is used) and displays a character. For every request timed out, it also | |
displays a character. The characters used depend on the version of PowerShell being used and whether | |
the -NoUnicode switch is used: if using PowerShell 6 or newer and -NoUnicode is not used, a green | |
circle character is displayed for ping replies and a red circle character for timeouts; otherwise, |
/** | |
* Processes emails in a given label in Gmail. | |
* Can mark emails as read and/or archive them based on the specified action. | |
* Only processes emails older than the specified number of days. | |
* Can log the subject of each email it processes if verbose mode is enabled. | |
* | |
* @param {string} labelName - The name of the label to process emails in. | |
* @param {number} days - The number of days old an email must be to be processed. | |
* @param {number} action - The action to perform on each email (0 = none, 1 = mark as read, 2 = archive, 3 = mark as read and archive). | |
* @param {boolean} verboseMode - Whether or not to log the subject of each email processed. |
# Script to parse cisco IOS running-config.txt to csv file | |
# Work in progress | |
# Depends on cisco-config-parser (https://github.com/arezazadeh/cisco_config_parser) | |
# install with pip install --user cisco-config-parser | |
# only tested on Python 3.11 on Windows 10 | |
# issues so far: | |
# - does not handle "add" lines for additional allowed vlans - ie two lines of allowed vlans. I believe this is an upstream issue in the cisco_config_parser library | |
# | |
# this script adds a column header "id" at the end of the line. | |
# the id field can be used to map the imported data to existing interfaces (for example created by device templates) |