Skip to content

Instantly share code, notes, and snippets.

View rubenwardy's full-sized avatar

rubenwardy rubenwardy

View GitHub Profile
@rubenwardy
rubenwardy / mod_debug.lua
Last active January 3, 2022 08:56
Craft recipe checker for Minetest
-- Written by rubenwardy, WTFPL
-- To use:
-- * Save as mod_debug.lua in builtin/game
-- * add dofile(gamepath.."mod_debug.lua") to the last line of builtin/game/init.lua
-- OR
-- * Install as a mod. Needs to be run before any other mod.
local mod = {}
mod.recipes = {}
mod.aliases = {}
Test(ModOrderResolverRedundantTests) {
std::vector<ModConfig> mods;
mods.push_back({
"modB",
"rubenwardy",
"",
std::vector<std::string>{"modC"}
});
mods.push_back({
#include "DropShadow.hpp"
#include <cassert>
#include <cmath>
#include <memory>
using namespace sfext;
namespace {
std::unique_ptr<sf::Shader> shadowShader;
(gdb) thread apply all bt
Thread 34 (Thread 0x7fffe3fe7700 (LWP 4588)):
#0 0x00007ffff781ccf5 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1 0x0000555558b06b0b in ()
#2 0x0000555558ad9100 in ()
#3 0x0000555558d50400 in ()
#4 0x00000327f38604a2 in ()
#5 0x000024d200000101 in ()
#6 0x7fffffffffffffff in ()

Keybase proof

I hereby claim:

  • I am rubenwardy on github.
  • I am rubenwardy (https://keybase.io/rubenwardy) on keybase.
  • I have a public key ASBExTr0_r9rJ7-9Tt46Dt6-SzPEiwihDVWqfz-wI3Gp0wo

To claim this, I am signing this object:

@rubenwardy
rubenwardy / sol_JSON.cpp
Last active March 2, 2020 00:38
Sol3 Read/parse JSON from file or string
#include <json/json.h>
#include <fstream>
#include <sstream>
namespace {
sol::object json_to_lua(Json::Value value, sol::this_state state) {
switch (value.type()) {
case Json::nullValue:
return sol::nil;
@rubenwardy
rubenwardy / init_cmake.py
Last active January 22, 2020 14:33
Create CMakeLists
#!/usr/bin/python
# I recommend that you install it and run it:
# $ sudo cp init_cmake.py /usr/bin
# $ init_cmake
import os
print("Initialise CMAKE by rubenwardy")
PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs
get_git_as() {
if info=$(git diff --shortstat); then
echo $info
fi
}
__prompt_command() {
@rubenwardy
rubenwardy / gist:cd5e5528ec60c80270a85b9252b215a2
Last active July 12, 2018 13:58
Minetest Developer Meeting 12/Aug/2017
Meeting 12/Aug/2017