Skip to content

Instantly share code, notes, and snippets.

@Ricket
Ricket / _ls
Created February 6, 2024 20:04
E2EE folder structure and docker setup
additions/
-> config/
-> Discord-Integration.toml
-> ftbbackups.cfg
-> mods/
-> bedtimeban
-> dcintegration
-> tellme
crash-reports/
heapdumps/
@Ricket
Ricket / crash-2024-01-28_03.46.54-server.txt
Created January 28, 2024 05:24
E2EE 1.26.0 crash 2023-01-27
---- Minecraft Crash Report ----
// Lolis deobfuscated this stacktrace using MCP's stable-39 mappings.
// Oh - I know what I did wrong!
Time: 2024-01-28 03:46:54 GMT
Description: Ticking block entity
java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
at java.util.LinkedList$ListItr.next(LinkedList.java:888)
@Ricket
Ricket / crash-2023-02-28_02.32.27-server.txt
Last active February 28, 2023 03:18
Astra sorcery server crash + corruption
---- Minecraft Crash Report ----
// My bad.
Time: 2/28/23 2:32 AM
Description: Exception in server tick loop
java.lang.NullPointerException: Exception in server tick loop
at hellfirepvp.astralsorcery.common.crystal.CrystalCalculations.calculate(CrystalCalculations.java:36) ~[astralsorcery:1.16.4-1.14.1] {re:classloading}
at hellfirepvp.astralsorcery.common.crystal.CrystalCalculations.getThroughputMultiplier(CrystalCalculations.java:103) ~[astralsorcery:1.16.4-1.14.1] {re:classloading}
at hellfirepvp.astralsorcery.common.starlight.network.TransmissionChain.recBuildChain(TransmissionChain.java:108) ~[astralsorcery:1.16.4-1.14.1] {re:classloading}
@Ricket
Ricket / reduce-to-daily.py
Created December 5, 2022 05:53
Minecraft backups: prune the backups to just one file per play session (i.e. find groups of consecutive backups and delete all but the newest)
from datetime import datetime, timedelta
from dateutil import tz
from functools import reduce
import os
from pprint import pprint
import re
import sys
if sys.version_info < (3,7):
sys.exit('Python 3.7 guarantees ordered dicts, which this script relies on')
+--------+------------+--------------+----------+
| Dim ID | Chunk | Block pos | Entities |
+--------+------------+--------------+----------+
| 0 | 0, -172 | 0, -2752 | 0 |
| 0 | 0, -173 | 0, -2768 | 0 |
| 0 | 0, -174 | 0, -2784 | 0 |
| 0 | 0, -175 | 0, -2800 | 0 |
| 0 | 0, -176 | 0, -2816 | 0 |
| 0 | 0, -178 | 0, -2848 | 0 |
| 0 | 0, -179 | 0, -2864 | 0 |
+---------------------------------------------------+--------+------------------------------------------+----------------+---------+
| World 'overworld' (dim: 0) |
| Loaded chunks: 2951 |
| All currently loaded entities: |
+---------------------------------------------------+--------+------------------------------------------+----------------+---------+
| Name | Health | Location | Chunk | Region |
+---------------------------------------------------+--------+------------------------------------------+----------------+---------+
| Alpine Buck | 20.00 | x = 2525.80, y = 82.00, z
+----------------------------------------------------------+--------+------------------------------------------+----------------+---------+
| World 'overworld' (dim: 0) |
| Loaded chunks: 9654 |
| All currently loaded entities: |
+----------------------------------------------------------+--------+------------------------------------------+----------------+---------+
| Name | Health | Location | Chunk | Region |
+----------------------------------------------------------+--------+------------------------------------------+----------------+---------+
| Alpine Buck
//10.10.10.10.example.com/ 1
//contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/:_authToken=heider 1
//google.com/ 1
//registry.blah.com/ 1
//registry.blah.com/foo:_authToken=whatev 1
//registry.blah.com/foo:_password= 1
//registry.blah.com/foo:username=barbaz 1
//registry.blah.edu/foo/bar/baz:_authToken=recurseNoLevel 1
//registry.blah.eu/ 1
//registry.blah.foo/ 1
@Ricket
Ricket / GuessTheNumber.py
Created October 25, 2018 03:39
Guess-the-number script for teaching programming
print('I am thinking of a number between 1 and 20...')
import random
secret_number = random.randint(1, 20)
tries = 0
winner = False
while tries < 6 and not winner:
@Ricket
Ricket / gist:78bcd681db86bcbb134558428c4c6cb4
Created September 25, 2018 16:54
git diff -- use jq to pretty-print the json before diffing it
echo "*.json diff=json" >> ~/.gitattributes
git config --global core.attributesfile ~/.gitattributes
git config --global diff.json.textconv "jq '.' \$1"