Skip to content

Instantly share code, notes, and snippets.

View Th0rgal's full-sized avatar
πŸ•ΆοΈ

Thomas Marchand Th0rgal

πŸ•ΆοΈ
View GitHub Profile
@Th0rgal
Th0rgal / minecraft_server_jar_downloader_api_guide.md
Last active December 28, 2025 17:33
The Ultimate Minecraft Server Jar Downloader Script (Paper, Spigot, Vanilla, etc) - Updated 2026

πŸš€ Ultimate Minecraft Server Jar Downloader & API Guide

Stop manually hunting for jar files. Whether you run a hosting company, a private SMP, or develop plugins, you need a reliable way to get the latest server software.

This guide provides scripts and endpoints to automatically fetch the latest builds of Paper, Spigot, Purpur, Vanilla, and Bedrock using the mcserverjars.com infrastructure.


⚑ Why use a centralized API?

  • Automation: Great for Docker containers, startup scripts, and panels (Pterodactyl).
@Th0rgal
Th0rgal / brain-damage-prevention.txt
Last active June 14, 2025 06:58
System prompt which stops AI from rotting your brain with "Great question!"
Tone & Length
- Keep a warm, natural voice in casual or advice chats; a few sentences often suffice.
- Answer simple questions briefly; give detailed, example-rich replies to complex ones.
Formatting Rules
- In chit-chat: no markdown and no lists.
- Use markdown bullets only when the user explicitly asks for a list or ranking; keep each bullet 1–2 sentences.
- For reports, documents, or technical writing, write in paragraphs with inline lists (β€œx, y, and z”); avoid bullets, numbering, and bold overuse.
- Never use em dashes (β€”). Instead of dashes for parenthetical thoughts, use commas, periods to split sentences, or parentheses.
@Th0rgal
Th0rgal / felt_to_hex.rs
Created August 2, 2023 13:33
An efficient function to convert a FieldElement in a fixed size hexadecimal representation
pub fn to_hex(felt: FieldElement) -> String {
let bytes = felt.to_bytes_be();
let mut result = String::with_capacity(bytes.len() * 2 + 2);
result.push_str("0x");
for byte in bytes {
write!(&mut result, "{:02x}", byte).unwrap();
}
result
}
You are an experienced data scientist used to working with matplotlib in a jupyter notebook environment. I want to generate a Python code snippet using the `matplotlib` and `numpy` libraries to visualize specific data from our StarknetID MongoDB database. I need your help to create a chart that showcase data in a meaningful and human friendly way.
Here's a bit of context: we're a decentralized naming service similar to ENS, and we use this database to store information about domain sales. Each document in our "sales" collection contains the following fields:
"domain": the name of the domain that was sold
"type": the type of the sale (can be "purchase" or "renewal")
"price": the price paid by the buyer in ether wei
"timestamp": the time when the sale happened, represented in seconds
"duration": the duration of the domain rent, in seconds
"auto": a boolean indicating whether the domain was purchased automatically (true if the user activated the automatic renewal feature)
rapp-multicall v0.1.0 (/app/rapp-multicall)
β”œβ”€β”€ heapless v0.7.16
β”‚ β”œβ”€β”€ hash32 v0.2.1
β”‚ β”‚ └── byteorder v1.4.3
β”‚ └── stable_deref_trait v1.2.0
β”‚ [build-dependencies]
β”‚ └── rustc_version v0.4.0
β”‚ └── semver v1.0.17
β”œβ”€β”€ nanos_sdk v0.2.0 (https://github.com/yogh333/ledger-nanos-sdk.git?branch=feat/libcall_support#6ab1660c)
β”‚ β”œβ”€β”€ num-traits v0.2.15
pragma solidity ^0.4.0;
contract ECops {
uint256 constant n = 0x30644E72E131A029B85045B68181585D97816A916871CA8D3C208C16D87CFD47;
uint256 constant a = 0;
uint256 constant b = 3;
// Returns the inverse in the field of modulo n
function inverse(uint256 num) public pure returns(uint256 invNum) {
uint256 t = 0;
# [input trace:]
# p.x
# p.y
# p.infinity
# q.x
# q.y
# q.infinity
# [appended trace:]
# coef -> coef * (trace[ap - 3] - trace[ap - 6]) - (trace[ap - 2] - trace[ap - 5]) = 0
%lang starknet
from starkware.cairo.common.math import assert_nn
from starkware.cairo.common.cairo_builtins import HashBuiltin
struct Call {
to: felt,
selector: felt,
data_offset: felt,
data_len: felt,
}
Error at pc=0:0:
Got an exception while executing a hint.
Cairo traceback (most recent call last):
Unknown location (pc=0:2)
Traceback (most recent call last):
File "<hint0>", line 9, in <module>
File "protostar/migrator/cheatcodes/migrator_declare_cheatcode.py", line 118, in _declare
File "asyncio/runners.py", line 44, in run
File "asyncio/base_events.py", line 647, in run_until_complete
from starknet_py.net.gateway_client import GatewayClient
from starknet_py.net import AccountClient
from starknet_py.contract import Contract
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starkware.starknet.definitions.general_config import StarknetChainId
from starkware.starknet.public.abi import get_selector_from_name
import asyncio
abi = [
{