Skip to content

Instantly share code, notes, and snippets.

View StrangeRanger's full-sized avatar

Hunter T. StrangeRanger

View GitHub Profile
@StrangeRanger
StrangeRanger / PrivateBin-setup.bash
Last active July 23, 2025 20:01
An easy way to install PrivateBin in a secure method, seperating files that can be publicly accessible and one's that can't. (status: personal)
#!/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 July 23, 2025 20:01
C# _clang-format configuration file (works for 'clang-format version 18.x.x') (status: personal)
---
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 July 23, 2025 20:11
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. (status: finished)
#!/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.
#
@StrangeRanger
StrangeRanger / if-statements.bash
Last active July 23, 2025 20:11
Shows the difference between different tests statements, and how they behave when working with different kinds of variables. (status: finished)
#!/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 July 23, 2025 20:02
Outlines standardized commit types for all repositories, along with extended types for script/tool-focused repos. (status: personal)

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 July 23, 2025 20:04
Examples of how to implement a spinning stick in the terminal, when waiting for a process to finish. (status: finished)
#!/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 July 23, 2025 20:05
Using the API (https://api.exchangeratesapi.io/latest), this script converts one currency into another. (status: unsupported)
#!/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 July 23, 2025 20:06
A randomized rock paper scissors game for the purpose of observing probability. (status: finished)
#!/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 July 23, 2025 20:07
Digitally flip a coin x number of times and prints the number of times the outcome was heads and tails. (status: finished)
#!/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)
#
########################################################################################
@StrangeRanger
StrangeRanger / morse_code_converter.py
Last active July 23, 2025 20:07
Convert morse code to English and vise versa. (status: finished)
#!/usr/bin/env python3
#
# Convert morse code to English and vise versa.
#
# Notes:
# The script can only convert one way. If you mix morse code and English in your
# phrase/string, you will be asked to re-enter it.
#
# Version: v1.0.4
# License: MIT License