Skip to content

Instantly share code, notes, and snippets.

#!/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
#!/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 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
"""
Compress directory to zip
Usage:
python dir2zip.py <directory-path>
"""
import sys
import os
import shutil
from datetime import datetime
#!/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.
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 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
@gitcrtn
gitcrtn / install_hotas_driver.sh
Last active March 16, 2020 00:10
Remote Flight Stick for WebGL Game
#!/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
"""
dump UPnP actions
Requirements:
- upnpclient
- pyyaml
- click
Usage:
python dump_upnp_actions.py -d <output_dir>
@gitcrtn
gitcrtn / install_pebble_face.py
Last active January 13, 2020 01:07
Install Pebble face from Termux
"""
Install Pebble face from Termux
Requires:
- libpebble2
Usage:
python2 install_pebble_face.py <pbw path>
"""
import sys