Skip to content

Instantly share code, notes, and snippets.

View rubenwardy's full-sized avatar

rubenwardy rubenwardy

View GitHub Profile
@rubenwardy
rubenwardy / distro_mtg.md
Last active April 17, 2024 17:01
Distro Minetest Game status

Minetest Game removal status

Distros

  • ✅︎ Fedora: removed for client, kept for server
  • ✅︎ Arch: removed
  • ❌ openSUSE: kept (TODO: file issue)
  • ✅︎ openSUSE games repo: removed
  • ✅︎ Gentoo: removed and renamed to games-engines/minetest
  • ✅︎ Void Linux: removed
@rubenwardy
rubenwardy / nbe_compile.sh
Last active October 31, 2022 02:27
One line install script for The-NodeBox-Generator.
sudo apt-get install git-core build-essential libirrlicht-dev cmake libpng12-dev libbz2-dev libjpeg8-dev libgl1-mesa-dev && git clone http://github.com/rubenwardy/nodeboxeditor && cd nodenoxeditor && cmake . && make -j2 && ./bin/nodeboxeditor
Date Opened Closed New Contributors
2011-08-01 1 0 1
2011-09-01 9 5 7
2011-10-01 3 0 2
2011-11-01 5 1 3
2011-12-01 6 0 5
2012-01-01 6 5 3
2012-02-01 4 6 3
2012-03-01 4 9 3
2012-04-01 4 6 4
-- Store a counter that increments each time a player joins
local file = minetest.get_worldpath().."/counter"
local f = io.open(file, "r")
if f==nil then
counter = 0
else
counter = tonumber(f:read("*all"))
f:close()
end
#include <fstream>
#include <scripting/ModException.hpp>
#include <sanity.hpp>
#include "LuaSecurity.hpp"
using namespace scripting;
namespace {
void copyAll(sol::environment &env, const sol::global_table &globals,
@rubenwardy
rubenwardy / mt_serverlist_points.py
Last active March 9, 2022 00:56
Server list point checker
#!/usr/bin/python3
# list all servers and their points:
# $ python mt_serverlist_points.py
#
# lists all penalties being applied:
# $ python mt_serverlist_points.py pen
#
# penalty -8 uptime for VanessaE's Nostalgia Server/digitalaudioconcepts.com
# penalty -8 uptime for VanessaE's Basic minetest_game server/digitalaudioconcepts.com
@rubenwardy
rubenwardy / runserver.sh
Last active March 9, 2022 00:55
Auto-restart, log per season, email on crash
#!/bin/bash
cd ~/.minetest
mkdir -p logs_ctf
function mailme() {
echo "To: rw@rubenwardy.com" > mail.txt
echo "Subject: CTF server crashed" >> mail.txt
echo "From: minetest@rubenwardy.com" >> mail.txt
echo "" >> mail.txt
@rubenwardy
rubenwardy / init.lua
Created November 27, 2013 13:17
Minetest OS Mapgen
-- OS MAP READER
-- by rubenwardy
-- incomplete
-- CC BY SA
-- =================
osmapgen = {
_api = "http://maps.googleapis.com/maps/api/elevation/json?",
url = {},
data = {}
function wrapRegisterCall(name, func)
for key, v in pairs(minetest["registered_" .. name .. "s"]) do
func(key, v)
end
local old = minetest["register_" .. name]
minetest["register_" .. name] = function(name, def)
func(name, def)
old(name, def)
end
-- Run a series of functions as a pipeline - each returning the next's arguments.
--
-- The first function will be ran immediately
--
-- @param interval Time between pipelines
-- @param funcs A list of functions, each one of the form function(...)
-- where ... is returned by the previous function.
-- @param params Optional, a list of arguments to pass to the first function
local function pipeline(interval, funcs, params)
if funcs[1] ~= nil then