Skip to content

Instantly share code, notes, and snippets.

View Alexander01998's full-sized avatar

Alexander01998 Alexander01998

View GitHub Profile
@Alexander01998
Alexander01998 / move_hacks_data.py
Created May 1, 2024 18:21
Utility script to move the list of hacks included in each Wurst update to a central data folder
# Place in root folder of WurstClient.net
# Also, make sure you have ruamel.yaml installed: `pip install ruamel.yaml`
import os
from io import StringIO
from ruamel.yaml import YAML
yaml = YAML()
yaml.preserve_quotes = True
@Alexander01998
Alexander01998 / dalle3.py
Created December 8, 2023 15:10
A basic python script for generating images with the DALL-E 3 API.
import os
import requests
import base64
import datetime
# --- Configuration variables ---
# A text description of the desired image. The maximum length is 4000 characters.
prompt = """
a fish riding a bicycle, photograph
@Alexander01998
Alexander01998 / jpg2webp-mass-converter.cmd
Created December 10, 2022 00:15
A batch script that converts all .jpg images in a folder to .webp at 100% quality. Just place it in the folder and double-click. Only works if you have cwebp installed: https://developers.google.com/speed/webp/docs/precompiled
@echo off
rem Set the number of files to be converted
for /f "delims=" %%i in ('dir /b /a-d /s *.jpg ^| find /c /v ""') do set "numFiles=%%i"
echo Converting %numFiles% file(s)...
rem Convert each .jpg file in the current directory to .webp
setlocal enabledelayedexpansion
set cnt=0
@Alexander01998
Alexander01998 / fabric_loader_dependencies.json
Created February 17, 2022 20:19
Place this in your .minecraft/config folder.
{
"version": 1,
"overrides": {
"fabric": {
"depends": {
"minecraft": "1.19-Deep.Dark.Experimental.Snapshot.1"
}
}
}
}

Contributor License Agreement

The following terms are used throughout this agreement:

  • You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.

  • Project - is an umbrella term that refers to any and all Wurst-Imperium open source projects.

  • Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.

  • Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with Wurst-Imperium, contributors or maintainers.

@Alexander01998
Alexander01998 / Code.gs
Created September 6, 2015 07:11
Counter for all Downloads of all Releases in one Repository
var root = DriveApp.getFolderById("FOLDER ID HERE");
// The ID of the folder where you placed the script
var filename = "badge.svg";
// The SVG file holding the badge.
function update()
{
root.getFilesByName(filename)
.next()
@Alexander01998
Alexander01998 / stacktrace-to-string.java
Created May 11, 2015 12:34
Converts a stack trace to a String.
StringWriter traceWriter = new StringWriter();
e.printStackTrace(new PrintWriter(traceWriter));
String trace = traceWriter.toString();