Skip to content

Instantly share code, notes, and snippets.

@hexparrot
hexparrot / populate_qube.sh
Created June 4, 2021 05:35
Easily recreate template qube upon new distro release
#!/bin/bash
# Currently known-working with Fedora 33
#brave
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/
rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
dnf install -y brave-browser
@hexparrot
hexparrot / finder.py
Created March 12, 2021 17:59
Valheim Coord Finder
#!/usr/bin/env python3
from collections import namedtuple, defaultdict
Coord = namedtuple('Coord', 'x y z')
def byte_to_coord(bytestr, start_pos):
x = slice(start_pos+0, start_pos+4)
z = slice(start_pos+4, start_pos+8)
y = slice(start_pos+8, start_pos+12)
@hexparrot
hexparrot / mtga_opening_hand.py
Created May 10, 2019 00:02
MTG:A Opening Hand Land Simulator
#!/usr/bin/env python3
__author__ = "Will Dizon"
__license__ = "Public Domain"
__version__ = "0.0.1"
__email__ = "[email protected]"
import numpy as np
from scipy.stats import hypergeom
from collections import Counter
@hexparrot
hexparrot / node-posix-bsd93.sh
Last active December 17, 2015 17:04
Building node-posix on FreeBSD 9.3
#!/bin/sh
test_command() {
eval $1
RET=$?
echo ""
if [ $RET -eq 0 ]; then
echo "COMMAND OK: $1"
else
echo "COMMAND FAILED: $1"
@hexparrot
hexparrot / fwtest.js
Created November 12, 2015 18:40
Fireworm broadcasts events twice
var fireworm = require('fireworm')
var path = require('path')
var fs = require('fs')
var mkdirSync = function (path) {
try {
fs.mkdirSync(path);
} catch(e) {
if ( e.code != 'EEXIST' ) throw e;
}
@hexparrot
hexparrot / install_mineos-node
Last active February 10, 2020 15:45
Downloads, installs and configures components required for the MineOS Web User Interface on rpm based systems using systemd.
#!/bin/sh
# update repositories
#yum update
# download the necessary prerequisite components for mineos
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum -y install screen git wget java-1.8.0-openjdk-headless.x86_64 openssl openssl-devel
yum -y groupinstall "Development tools"
yum -y install nodejs
@hexparrot
hexparrot / install_mineos-node
Last active August 30, 2018 17:11
Downloads, installs and configures components required for the MineOS Web User Interface on pacman based systems using systemd.
#!/bin/sh
# download the necessary prerequisite components for mineos
pacman -S --noconfirm git rsync rdiff-backup screen jre8-openjdk-headless nodejs npm base-devel
# download the most recent mineos web-ui files from github
mkdir -p /usr/games
cd /usr/games
git clone https://github.com/hexparrot/mineos-node.git minecraft
cd minecraft
@hexparrot
hexparrot / install_mineos-node
Last active October 4, 2020 03:55
Downloads, installs and configures components required for the MineOS Web User Interface on apt-get based systems using systemd.
#!/bin/sh
# update repositories
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get update
# download the necessary prerequisite components for mineos
apt-get -y install -y nodejs git rdiff-backup screen build-essential openjdk-8-jre-headless
# download the most recent mineos web-ui files from github
@hexparrot
hexparrot / install_mineos-node
Last active June 18, 2022 14:44
Downloads, installs and configures components required for the MineOS Web User Interface on apt-get based systems.
#!/bin/sh
# update repositories
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get update
# download the necessary prerequisite components for mineos
apt-get -y install nodejs supervisor git rdiff-backup screen build-essential default-jre-headless
# download the most recent mineos web-ui files from github
@hexparrot
hexparrot / install_mineos
Last active August 29, 2015 14:04 — forked from hexparrot/install_mineos
Downloads, installs and configures components required for the MineOS Web User Interface on zypper-based systems.
#!/bin/sh
# download the necessary prerequisite components for mineos
zypper -n remove patterns-openSUSE-minimal_base-conflicts
zypper -n install screen
zypper -n install openssl
zypper -n install libopenssl-devel
zypper -n install git
zypper -n install java-1_7_0-openjdk-headless
zypper -n install python-xml