Skip to content

Instantly share code, notes, and snippets.

View StrangeRanger's full-sized avatar

Hunter T. StrangeRanger

View GitHub Profile
@StrangeRanger
StrangeRanger / mass-vmware-image-downloader.bash
Last active February 4, 2025 21:04
mass-vmware-image-downloader.bash
#!/usr/bin/env bash
#
# Downloads pre-built VMs from osboxes.org. Currently, the defined VMs are for VMware.
#
# Version: 1.1.0
# License: MIT License
# Copyright (c) 2025 Hunter T. (StrangeRanger)
#
########################################################################################
@StrangeRanger
StrangeRanger / PrivateBin-setup.bash
Last active December 19, 2024 22:45
An easy way to install PrivateBin in a secure method, seperating files that can be publicly accessible and one's that can't.
#!/bin/bash
#
# An easy way to install PrivateBin in a secure method, seperating files that can be
# publicly accessible and ones that shouldn't be.
#
# NOTE:
# This script requires root privileges to modify ownership of the files.
#
# Version: v1.0.0
# License: MIT License
@StrangeRanger
StrangeRanger / _clang-format
Last active November 13, 2024 21:37
C# _clang-format configuration file (works for 'clang-format version 18.x.x')
---
Language: CSharp
# BasedOnStyle: Microsoft
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
@StrangeRanger
StrangeRanger / dotnet-sdk-not-found.bash
Last active December 19, 2024 22:52
Fixes problems caused by micosoft making .NET natively available on Ubuntu 22.04. For more information, refer to https://github.com/dotnet/core/issues/7699.
#!/bin/bash
#
# Fixes problems caused by micosoft making .NET natively available on Ubuntu 22.04. For
# more information, refer to https://github.com/dotnet/core/issues/7699.
#
# NOTE:
# This script specifically install dotnet-sdk-6.0 on Ubuntu 22.04 and Linux Mint 21.
# If you are using a different version of Linux and/or dotnet-sdk, you may need to
# manually modify the script to suit your needs.
#
#!/usr/bin/env bash
#
# shellcheck disable=SC2016
#
# The point of this script is to show the difference between the different kinds of if
# and test statements, and how they behave differently when dealing with different kinds
# variables.
#
########################################################################################
####[ Setup ]###########################################################################
@StrangeRanger
StrangeRanger / Commit Types.md
Last active December 11, 2024 23:02
Commit Types.md

Commit Conventions

This document outlines standardized commit types for all repositories, along with extended types for script/tool-focused repos. The goal is to provide a clear, maintainable commit history, aid in automated changelog generation, and guide semantic versioning decisions. Use these conventions for consistent communication and streamlined project management.

Core Commit Types

The following commit types are commonly used across various projects, and form the base set that contributors should be familiar with. They remain applicable regardless of whether you’re working in a general codebase or a specialized script repository.

| Commit Type | Title | Description | Release | Include in changelog | | ----------- | ------------------------------ | -------------------------------------------------------------------------------------------

@StrangeRanger
StrangeRanger / spinning-stick.bash
Last active December 19, 2024 23:04
spinning-waiting-stick.sh
#!/usr/bin/env bash
#
# Sometimes, it's helpful to show users that a background process is running and the
# script is awaiting its completion. A common approach is to display a spinner in the
# terminal until the process finishes. This script offers two methods to implement such
# a spinner, catering to different needs and scenarios.
#
########################################################################################
####[ Global Variables ]################################################################
@StrangeRanger
StrangeRanger / currency_converter.py
Last active December 22, 2024 23:02
currency_converter.py
#!/usr/bin/env python3
#
# Using the API (https://api.exchangeratesapi.io/latest), this script converts one
# currency into another.
#
# Prerequisites:
# - requests
#
# IMPORTANT:
# This script no longer works as the API now requires an API key.
@StrangeRanger
StrangeRanger / rock_paper_scissors.py
Last active December 22, 2024 23:30
rock_paper_scissors.py
#!/usr/bin/env python3
#
# A randomized rock paper scissors game for the purpose of observing probability.
#
# Reason For Creation:
# This little script was created because a math class required us to play rock paper
# scissors against someone to observe probability. I didn't have anyone to do it with
# at the time, so I created this.
#
# Version: v1.0.2
@StrangeRanger
StrangeRanger / heads_or_tails.py
Last active December 22, 2024 23:26
heads_or_tails.py
#!/usr/bin/env python3
#
# Digitally flip a coin x number of times and prints the number of times the outcome was
# heads and tails.
#
# Version: v1.0.3
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
#
########################################################################################