Skip to content

Instantly share code, notes, and snippets.

View Alexander01998's full-sized avatar

Alexander01998 Alexander01998

View GitHub Profile
@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();
@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()

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 / 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"
}
}
}
}
@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 / 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 / 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 / README.md
Last active July 23, 2024 12:21
A registry mod to convert images between JPG and PNG formats. Only tested on Windows 10. USE AT YOUR OWN RISK!

convert to jpg screenshot convert to png screenshot

To install this registry mod, simply download the image_converters.reg file and double-click to run it. You will need admin permissions.

WARNING: Editing the Windows Registry can cause serious problems if not done correctly. Always back up your data and remember that this is just some random script on GitHub with absolutely no warranty.

(For those new to GitHub, you can download files by clicking the "Raw" button and then pressing CTRL+S to save.)