Skip to content

Instantly share code, notes, and snippets.

import sys
from mceditlib.findadapter import findAdapter
level_dat = sys.argv[1]
adapter = findAdapter(level_dat, readonly=False, resume=None)
adapter.metadata.allowCommands = 1
adapter.syncToDisk()
#!/usr/bin/env python2
"""
Show chest item IDs for /give command
Requires:
Python 2.7
mceditlib
Usage:
1. Set SAVE_DIR to your saves directory path.
"""
Compress directory to zip
Usage:
python dir2zip.py <directory-path>
"""
import sys
import os
import shutil
from datetime import datetime
#!/usr/bin/env bash
# Requirements:
# - WSL2 on Windows 10
# - Ubuntu 20.04
# - Docker 19.03.11+
# Install minikube
wget https://github.com/kubernetes/minikube/releases/download/v1.12.0-beta.0/minikube-linux-amd64
chmod +x ./minikube-linux-amd64
#!/usr/bin/env python3
"""
Mac Tool Menu
Usage:
python3 mac_tool_menu.py conf.yaml
Example of conf.yaml:
tool_name: command line string
aaa: date
#!/usr/bin/env zsh
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer sdl2_gfx sdl2_net
brew link sdl2
echo 'export LIBRARY_PATH=“$LIBRARY_PATH:/opt/homebrew/lib”' >> ~/.zshrc
@gitcrtn
gitcrtn / Cargo.toml
Last active July 3, 2022 15:12
A cross compiler of rust-sdl2 project for GameShell and Raspberry Pi
[package]
name = "sdl2demo"
version = "0.1.0"
edition = "2021"
[dependencies.sdl2]
version = "0.35.2"
default-features = false
features = ["image"]
@gitcrtn
gitcrtn / MapUpdater.java
Created July 18, 2016 09:11
Bukkit Plugin for Automated Updating of Maps in Item Frames
// MapUpdater plugin
// 2016.07.18
// @Carotene
// Usage:
// /updatemap <maps_name> <radius>
// /updatemap <maps_name> <radius> <x> <y> <z>
// - <maps_name> is just for messaging.
// - <radius> is the search range of the maps in item frames.
@gitcrtn
gitcrtn / Cargo.toml
Last active August 4, 2022 00:10
Bitmap font generator
[package]
name = "font-img-gen"
version = "0.1.0"
edition = "2021"
[dependencies]
image = "0.24.2"
imageproc = "0.23.0"
rustop = "1.1.2"
rusttype = "0.9.2"
@gitcrtn
gitcrtn / Cargo.toml
Created August 4, 2022 15:34
Character codes finder for Font Awesome 5
[package]
name = "find-fa"
version = "0.1.0"
edition = "2021"
[dependencies]
lazy_static = "1.4.0"
textwrap = "0.15.0"