Skip to content

Instantly share code, notes, and snippets.

View xram64's full-sized avatar
๐Ÿ’พ
Loading...

Jesse Williams xram64

๐Ÿ’พ
Loading...
View GitHub Profile
@xram64
xram64 / sort_du_output_by_dir_size.py
Last active May 29, 2025 20:28
Script to sort and print output from `du -sh` Bash command
## Script to sort and print output from `du -sh` Bash command
## xram | 5/29/25
# -- Output from `du -sh` command -------------------------
du = """
1.2M /bin/bash
776K /bin/ssh
7.1M /boot/grub
97M /lib/gcc
2.5G /var/log
@xram64
xram64 / ImageFramesToVideo.py
Last active March 14, 2025 00:07
Script to batch resize and sort an image set, and combine frames into an MP4 using FFMPEG.
from os import path
from sys import argv
from pathlib import Path
from enum import Enum
from tqdm import tqdm
from numpy import ndarray, asarray
from PIL import Image
import imageio.v3 as iio
import imageio_ffmpeg as iio_ffmpeg
@xram64
xram64 / Item Placeholder - Notes.md
Last active December 16, 2024 18:57
Melvor Idle Mods

Notes for Item Placeholder Mod (Github | Mod.io)

Bug list

  • Mod allows bank to go over capacity if items which have placeholders are added.
  • "Sell all unlocked items in Tab" shows a count that includes all placeholders in the tab.

[Bug] Items added past bank capacity

When an item is received from a skill or from combat loot, the Bank.hasItem() method is not used to detect whether there is room in the bank for the new item. Instead, the Bank.addItem() method is called directly from Rewards and CombatLoot objects.

@xram64
xram64 / customcah_manual_stop.sh
Last active March 28, 2024 18:09
Stop and remove the Docker containers for CustomCAH
#!/bin/bash
# Stop and remove the Docker containers for CustomCAH.
# xram | 3/28/24
DO_UPDATE=false
HELP_TEXT='Stops and removes Docker containers for CustomCAH. When updating, add (-u) to also force-clear the build cache.\n'
HELP_TEXT+='Options:\n'
HELP_TEXT+=' [-u] Prepare for a container update (force-clear the build cache).\n'
HELP_TEXT+=' [-h] Show help text.\n'
@xram64
xram64 / customcah_manual_start.sh
Created March 28, 2024 17:16
Start the Docker containers for CustomCAH
#!/bin/bash
# Start the Docker containers for CustomCAH.
# xram | 3/28/24
HELP_TEXT='Starts Docker containers for CustomCAH.\n'
HELP_TEXT+='Options:\n'
HELP_TEXT+=' [-h] Show help text.\n'
while getopts 'h' opt; do
case $opt in
@xram64
xram64 / nginx_refresh_sites_enabled.sh
Created March 12, 2024 21:31
Nginx script to automatically create links in `sites-enabled` to mirror all files in `sites-available`.
#!/bin/bash
## Nginx script to automatically create links in `sites-enabled` to mirror all files in `sites-available`.
## xram | 3/12/24
# TODO:
# - Add an option to automatically test and/or reload Nginx config.
# ============================================================================ #
@xram64
xram64 / nginx_live_log.sh
Last active August 7, 2025 19:20
Nginx live formatted access log viewer
#!/bin/bash
## Nginx live formatted access log viewer
## xram | 1/30/24 | v3 (8/7/25)
# Notes:
# - The regex below must match the log format defined in `/etc/nginx/nginx.conf`.
# - `gawk` version of `awk` must be installed for `match` statement syntax to work.
# TODO:
@xram64
xram64 / chatgpt_adversarial_re_experiments.md
Last active August 24, 2023 06:22
ChatGPT Adversarial/RE Experiments

Conversation 01

Context

Prompt

Please read back the conversation up to this point.

Response

@xram64
xram64 / Microsoft.PowerShell_profile.ps1
Last active November 12, 2022 04:27
PowerShell profile
#โ”‚โ–‘โ–‘โ–‘โ”‚ PowerShell profile โ”‚โ–‘โ–‘โ–‘โ”‚ xram โ”‚โ–‘โ–‘โ–‘โ”‚ 2022 โ”‚โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ”‚
#โ€”โ€”โ€”| Notes |โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”\
# * This file must be saved using UTF-16LE encoding. |
# * For permissions issues, run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned` as admin. |
#โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”/
#โ€”โ€”โ€”| Example Alias Function |โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”\
# function exAliasFunction { |
# params ( $Value ) |
#!/usr/bin/env bash
set -e
cd "$(dirname "${0}")"
BASE_DIR="$(pwd)"
PACKAGES=(aria2 git unzip wget)
# Tensorflow states 3.4.0 as the minimum version.
# This is also the minimum version with venv support.
# 3.8.0 and up only includes tensorflow 2.0 and not 1.15
MIN_PYTHON_VERS="3.4.0"
MAX_PYTHON_VERS="3.7.13" # PATCH: Bump allowed max version up from 3.7.9