Skip to content

Instantly share code, notes, and snippets.

View glektarssza's full-sized avatar
🐍
Hisssssss!

G'lek Tarssza glektarssza

🐍
Hisssssss!
View GitHub Profile
@glektarssza
glektarssza / all-scopes.txt
Last active September 22, 2025 08:37
GitHub OAuth Scope List
"repo","repo:status","repo_deployment","public_repo","repo:invite","security_events","admin:repo_hook","write:repo_hook","read:repo_hook","admin:org","write:org","read:org","admin:public_key","write:public_key","read:public_key","gist","notifications","user","read:user","user:email","user:follow","project","read:project","read:project","write:packages","read:packages","delete:packages","admin:gpg_key","write:gpg_key","read:gpg_key","codespace","workflow","read:audit_log"
@glektarssza
glektarssza / show_settings.lua
Last active September 17, 2025 03:25
Factorio - Warp Drive Machine Helper Scripts
-- Some constants
local re = "${(%w+)}"
local color_fmt = "[color=${c}]${v}[/color]"
local player = game.player
local printing_entity = player
--- @type PrintSettings
local print_settings = {
sound = defines.print_sound.never,
skip = defines.print_skip.never,
game_state = false,
@glektarssza
glektarssza / dump-8bit-colors.sh
Created September 12, 2025 16:02
Dump the full range of 8-bit terminal colors in a nice table format!
#!/usr/bin/env bash
# Dump the full range of 8-bit colors available in the terminal!
# RAINBOWS!
function dump_8bit_colors() {
# -- Forward declare variables!
local FG;
for i in {0..255}; do
FG="15";
if [[ $(( ("$i" - 16) % 36 )) -eq 0 ]]; then
@glektarssza
glektarssza / get_script_dir.sh
Created September 10, 2025 14:26
Get Script Directory
# Useful one liner to get the script directory from almost any location.
declare SCRIPT_DIR;
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)";
# Useful one liner to get the script directory from almost any location.
declare SCRIPT_DIR;
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)";
# Multi-line solution to get the script directory from any location.
declare SCRIPT_SOURCE SCRIPT_DIR;
@glektarssza
glektarssza / gtnh-mod-dupe-checker.ps1
Created September 7, 2025 21:45
GTNH Mod Duplication Checker Script
git status --porcelain | Select-String -Raw -Pattern '^\?\?' | ForEach-Object { return (($_ -split '^\s*(\?\?)\s+')[1] -split "-", 2)[0]; } | ForEach-Object { return Get-ChildItem -File -Filter "$((Split-Path $_)[-1])*" ".minecraft/mods"; } | Select-Object -Unique | Group-Object -Property { Write-Debug "Inspecting mod file `"$_`"..."; return ([System.Text.RegularExpressions.Regex]::new("(.+?)((\d+\.?){1,3}\d+)[^\d]*").Matches($_.BaseName).Groups[1]); } | Where-Object -Property Count -GE 2 | Select-Object -Property Name, @{Label = "Group"; Expression = { return $_.Group | ForEach-Object { return @{File = $_; Version = [System.Text.RegularExpressions.Regex]::new("(.+?)((\d+\.?){1,3}\d+)[^\d]*").Matches($_).Groups[2] }; } } } | Format-Table -Property @{Label="Mod Name"; Expression={$_.Name.Trim("-")}}, @{Label = "Files"; Expression = { return $_.Group | Join-String -Separator "`n" -Property { return $_.File.BaseName; } } }, @{Label = "Versions"; Expression = { return $_.Group | Join-String -Separator "`n" -Prope
@glektarssza
glektarssza / discord-timer-anti-experiment.userscript.js
Last active September 5, 2025 22:47
Remove Discord Voice Channel Activity Timer Experiment Tampermonkey Userscript
// ==UserScript==
// @name Remove Discord Voice Channel Activity Timer Experiment
// @namespace http://glektarssza.com/
// @version 0.0.1
// @description Removes the experiment that adds timers to Discord voice channels indicating how long they've been active for.
// @author G'lek Tarssza
// @copyright 2025 G'lek Tarssza
// @match https://discord.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant none
@glektarssza
glektarssza / glfw-style-updater.user.js
Last active July 17, 2025 15:39
GLFW Style Updater Tampermonkey Script
// ==UserScript==
// @name GLFW Documentation Style Updater
// @namespace http://glektarssza.com/
// @version 0.1.1
// @description Update the styling on `https://glfw.org` to make it less retina-destroying.
// @license MIT
// @author G'lek Tarssza
// @homepage https://glektarssza.com
// @website https://glektarssza.com
// @source https://gist.github.com/glektarssza/e2a4af934377782e482f624595a3ed13/raw
@glektarssza
glektarssza / InGameInfo.xml
Created June 25, 2025 20:11
Custom GTNH IGI Config
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<config>
<lines at="topleft">
<line>
<str>{pingicon}{gold}{username} {white}FPS: </str>
<op>
<str>ge</str>
<var>fps</var>
<num>60</num>
<num>45</num>
@glektarssza
glektarssza / ffmpeg-loudnorm.sh
Created June 13, 2025 21:22
ffmpeg two pass loudnorm application
#!/usr/bin/env bash
declare FFMPEG_OUTPUT INPUT OUTPUT;
while [[ -n "$1" ]]; do
case "$1" in
--help|-h)
echo "ffmpeg-loudnorm.sh [--help|-h] [--version] <INPUT> [OUTPUT]";
printf "\n";
echo "=== Arguments ===";
@glektarssza
glektarssza / Install-Fonts.ps1
Created June 3, 2025 06:04
Install Windows Fonts without Elevated Permissions
<#
.SYNOPSIS
Install fonts.
.DESCRIPTION
Install the fonts to the system.
.PARAMETER Path
The paths to the font files to install.