Skip to content

Instantly share code, notes, and snippets.

View h8rt3rmin8r's full-sized avatar

h8rt3rmin8r h8rt3rmin8r

View GitHub Profile
@h8rt3rmin8r
h8rt3rmin8r / save.hg.json
Created February 24, 2023 21:51
JSON Schema for decoded save file data from No Man's Sky (merged schema from various game versions using genson)
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"Version": {
"type": "integer"
},
"Platform": {
"type": "string"
},
@h8rt3rmin8r
h8rt3rmin8r / borderlands3-dps.sh
Last active January 29, 2021 03:34
Calculate damage-per-second on guns found in Borderlands 3
#! /usr/bin/env bash
#>-------------------------------------------------------------------------------
#>
#> [ bl3-dps ]
#>
#> Calculate damage-per-second on guns found in Borderlands 3
#>
#> This is an interactive script (no direct inputs are required). Outputs
#> are saved into a local CSV file. Over time, this output file can serve
#> as a personal DPS database.
@h8rt3rmin8r
h8rt3rmin8r / ics2json.sh
Last active February 23, 2024 14:13
Convert an .ics calendar file into JSON syntax
#! /usr/bin/env bash
#>------------------------------------------------------------------------------
#>
#> [ ics2json ]
#>
#> ABOUT:
#>
#> Convert an .ics calendar file into JSON syntax
#>
#> If input data is passed as a file reference, output data is written to
@h8rt3rmin8r
h8rt3rmin8r / unicode.bash
Created November 16, 2020 13:45
Bash unicode library (to be sourced)
#!/usr/bin/env bash
######################################################################
# #
# UNICODE AND SYMBOLIC REFERENCE VARIABLES #
# Source: https://pastebin.com/raw/6AM0F6ze #
# #
#--------------------------------------------------------------------#
# Source detection
# Reference: https://stackoverflow.com/a/2684300
@h8rt3rmin8r
h8rt3rmin8r / wfox-parallel.sh
Created November 15, 2020 09:53
Download all links in a referenced input file using GNU parallel
#! /usr/bin/env bash
#>------------------------------------------------------------------------------
#>
#> [ wfox-parallel ]
#>
#> Download all links in a referenced input file using GNU parallel
#>
#> Outputs will be situated into a new directory hierarchy that mirrors the
#> origin website URL path for each file. File exif data will be retained
#> if the 'xattr' package is installed on the local machine.
@h8rt3rmin8r
h8rt3rmin8r / csslinks.sh
Last active November 5, 2020 10:52
Extract URLs from an input CSS document
@h8rt3rmin8r
h8rt3rmin8r / print-line.sh
Created October 31, 2020 21:45
Print an eighty-character line to the terminal
#! /usr/bin/env bash
#>------------------------------------------------------------------------------
#>
#> [ print-line ]
#>
#> Print an eighty-character line to the terminal.
#>
#> No inputs are required when invoking this script.
#>
#> Printed lines will default to being constructed with dashes (-) but can
@h8rt3rmin8r
h8rt3rmin8r / root-test.sh
Created October 31, 2020 21:36
Run a quick test for access to "sudo"
#!/usr/bin/env bash
#>------------------------------------------------------------------------------
#>
#> [ root-test ]
#>
#> Run a quick test for access to "sudo"
#>
#> No inputs are required when invoking this function. Outputs are printed
#> to STDOUT as either "PASS" or "FAIL" and corresponding exit codes are
#> emitted.
@h8rt3rmin8r
h8rt3rmin8r / nvidia-visual-profiler.sh
Created October 14, 2020 20:40
Launch Nvidia Visual Profiler via Open JDK
#! /usr/bin/env bash
#
# [ nvidia-visual-profiler ]
#
# Launch Nvidia Visual Profiler via Open JDK
# Created on 20201014 by h8rt3rmin8r (161803398@email.tg)
#
# Reference:
#
# # Install CUDA on Ubuntu 20 (linuxconfig.org)
@h8rt3rmin8r
h8rt3rmin8r / nvidia-packages-list.sh
Created October 14, 2020 20:32
List all installed packages related to Nvidia and CUDA (outputs are formatted as JSON)
#! /usr/bin/env bash
#
# [ nvidia-packages-list ]
#
# List all installed packages related to Nvidia and CUDA
# Created on 20201014 by h8rt3rmin8r (161803398@email.tg)
#
soft_check=$(which jq &>/dev/null; echo $?)