Skip to content

Instantly share code, notes, and snippets.

View StrangeRanger's full-sized avatar

Hunter T. StrangeRanger

View GitHub Profile
@StrangeRanger
StrangeRanger / matrix_phone_keywords.py
Last active June 7, 2021 18:58
THIS SCRIPT HAS NO USEFUL PRUPOSE. It is a script that was written up for a scenario at a SkillsUSA programming competition. It was supposed to connect any of 10 specified keywords to a randomized phone number. If the randomized keyword is one of the 10 knowns keywords, the call is excepted, but if the keyword did not match any of the known keyw…
import random
import string
accepted_keywords = [
"(nothing)",
"abc",
"deft",
"ghi",
"jkl",
"mno",
@StrangeRanger
StrangeRanger / rock_paper_scissors.py
Last active March 7, 2022 19:51
rock_paper_scissors.py
#!/usr/bin/env python3
#
# Reason For Creation: The creation of this little script was due to the fact that 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
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
@StrangeRanger
StrangeRanger / heads_or_tails.py
Last active March 7, 2022 19:51
heads_or_tails.py
#!/usr/bin/env python3
#
# Version: v1.0.3
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
#
########################################################################################
"""
Digitally flip a coin x number of times and prints the number of times the outcome was
heads and tails.
@StrangeRanger
StrangeRanger / morse_code_converter.py
Last active March 7, 2022 19:51
morse_code_converter.py
#!/usr/bin/env python3
#
# Version: v1.0.4
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
#
########################################################################################
"""
Convert morse code to English and vise versa.
@StrangeRanger
StrangeRanger / number_factoring.py
Last active March 7, 2022 19:52
number_factoring.py
#!/usr/bin/env python3
#
# Version: v1.1.3
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
#
########################################################################################
"""
Take a user provided integer and find all of the possible factors for that
number.
@StrangeRanger
StrangeRanger / currency_converter.py
Last active July 21, 2022 11:43
currency_converter.py
#!/usr/bin/env python3
#
# Prerequisites:
# Install globally: `python3 -m pip install requests`
# Install locally via pipenv: `pipenv install requests`
#
# Version: v1.0.3
# License: MIT License
# Copyright (c) 2020-2021 Hunter T. (StrangeRanger)
#
#!/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 / spinning-waiting-stick
Last active April 6, 2023 18:33
spinning-waiting-stick.sh
#!/usr/bin/env bash
#
# Provides two different methods that can be used to display a spinning stick that will
# continue to spin until a specific process is finished running.
#
# NOTE: 'method_two' is notiblely faster than 'method_one'. Despite this, it does not
# speak for the method's actual speed. That is dependent on how you use and
# implement the methods. For the case of the examples that I provided, 'method_one'
# is slower because I have it check if the incremented number is greater than or
# equal to the specified stopping number, for every iteration of the for loop.
@StrangeRanger
StrangeRanger / _clang-format
Last active July 4, 2023 12:44
Java _clang-format configuration file (works for 'clang-format version 14.x.x')
---
Language: Java
# BasedOnStyle: Chromium
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left # Maybe: Previously None
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive
@StrangeRanger
StrangeRanger / Commit Types.md
Last active April 13, 2024 18:52
Commit Types.md (To be rewritten)

Commit Types

This version of Commit Types is tailored for repositories focused on individual scripts or tools, each with its own unique lifecycle and versioning. This system acknowledges that each tool evolves independently, allowing for precise version control on a per-tool basis. This approach aims to significantly enhance clarity and facilitate a more intuitive understanding of each tool's development history by providing a structured framework for commit messages. It ultimately seeks to streamline project management and improve the usability of repositories that function as a comprehensive toolkit or an extensive library of scripts, ensuring that contributors and users alike can easily track progress and updates for individual tools.

| Commit Type | Title | Description