This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "sdl2demo" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies.sdl2] | |
version = "0.35.2" | |
default-features = false | |
features = ["image"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Compress directory to zip | |
Usage: | |
python dir2zip.py <directory-path> | |
""" | |
import sys | |
import os | |
import shutil | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Required: Python 2.7, git | |
# prepare venv | |
python2 -m pip install virtualenv | |
python2 -m virtualenv venv | |
. venv/bin/activate | |
# prepare required modules | |
pip install cython==0.20 numpy==1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git clone https://github.com/walterschell/tflight4.git | |
cd tflight4 | |
make | |
sudo cp hid-tflight4.ko /lib/modules/$(shell uname -r)/kernel/drivers/hid/ | |
sudo insmod /lib/modules/$(shell uname -r)/kernel/drivers/hid/hid-tflight4.ko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
dump UPnP actions | |
Requirements: | |
- upnpclient | |
- pyyaml | |
- click | |
Usage: | |
python dump_upnp_actions.py -d <output_dir> |