Skip to content

Instantly share code, notes, and snippets.

Avatar

Hunter T. StrangeRanger

View GitHub Profile
View Commit Types.md
@StrangeRanger
StrangeRanger / prettierrc.yml
Last active Jun 7, 2021
Configuration file for the formatting tool known as Prettier.
View prettierrc.yml
#version: "2"
tabWidth: 4
printWidth: 100
useTabs: false
overrides:
- files:
- "*.yaml"
- "*.yml"
options:
tabWidth: 2
@StrangeRanger
StrangeRanger / spinning-waiting-stick
Last active Aug 7, 2022
spinning-waiting-stick.sh
View spinning-waiting-stick
#!/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 Jun 7, 2022
Java _clang-format configuration file (works for 'clang-format version 14.x.x')
View _clang-format
---
Language: Java
# BasedOnStyle: Chromium
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive
@StrangeRanger
StrangeRanger / _clang-format
Last active Mar 28, 2022
C/C++ _clang-format configuration file (works for 'clang-format version 14.x.x')
View _clang-format
---
Language: Cpp
# BasedOnStyle: Chromium
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive
@StrangeRanger
StrangeRanger / currency_converter.py
Last active Jul 21, 2022
currency_converter.py
View 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)
#
@StrangeRanger
StrangeRanger / rock_paper_scissors.py
Last active Mar 7, 2022
rock_paper_scissors.py
View 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)
View 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 Mar 7, 2022
morse_code_converter.py
View 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.