View notification_block.txt
Filter Rules | |
============== | |
Works for: | |
- AdblockPlus | |
- ublock origin | |
- ?? | |
Group by: Repository |
View init_prevent_lava_placement.lua
minetest.register_privilege( "lava", "Can place lava at any depth.") | |
local LAVA_PLACE_DEPTH = -50 | |
function override_on_place(item_name) | |
local def = minetest.registered_items[item_name] | |
local old_on_place = def.on_place | |
def.on_place = function(itemstack, placer, pointed_thing) | |
if pointed_thing.type ~= "node" then |
View pr_apply.sh
#!/bin/bash | |
url=$(git remote -v get-url upstream 2>&1) | |
if [[ $url == fatal* ]]; then | |
url=$(git remote -v get-url origin 2>&1) | |
fi | |
if [[ $url == fatal* ]]; then | |
echo "Can neither find 'upstream' nor 'origin' git remote." | |
exit 1 |
View neuron.cpp
/* | |
Example structure | |
┌─── NeuralLayer 1 ────┐ | |
│ Inputs (source data) │ | |
│ Outputs (1) │ | |
└─────vvvvvvvvvvvv─────┘ | |
┌─── NeuralLayer 2 ────┐ | |
│ Inputs = Outputs (1) │ | |
│ Outputs (2) │ | |
└─────vvvvvvvvvvvv─────┘ |
View init_22_ascii_biome.lua
-- Minetest Lua mod to have a rudimentary display of the biomes in your world | |
-- CC0, Written by Krock/SmallJoker 2019 | |
-- Sample image: https://krock-works.uk.to/u/ethereal_cc57167_ASCII_map.png | |
local STEPSIZE = 32 | |
local X_RADIUS = 1000 | |
local Z_RADIUS = 1000 | |
local CHARACTERS = { | |
"x", ".", "+", "@", "#", | |
"▨", "□", "■", |
View vectortest.cpp
// g++ vectortest.cpp | |
/* | |
emplace_back: 553305 ticks | |
push_back: 665359 ticks | |
resize: 437487 ticks | |
*/ | |
// g++ -O3 -ffast-math vectortest.cpp | |
/* | |
emplace_back: 165961 ticks | |
push_back: 165695 ticks |
View profile-20180726T164916_technic.txt
Values below show absolute/relative times spend per server step by the instrumented function. | |
A total of 8885 samples were taken | |
instrumentation | min µs | max µs | avg µs | min % | max % | avg % | |
-------------------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------ | |
mesecons: | 1 | 161770 | 86 | 0.0 | 99.1 | 3.3 | |
- globalstep[1] ..................................... | 1 | 161768 | 84 | 0.0 | 99.0 | 2.5 | |
- on_placenode[1] ................................... | 17 | 25 | 21 | 2.5 | 6.3 | 4.8 | |
- on_dignode[1] ..................................... | 13 | 49 | 21 | 0.6 | 10.3 | 6.2 |
View network_sqrt_log2.cpp
#include <cmath> | |
#include <cstdint> | |
#include <cstring> | |
#include <iostream> | |
#include <iomanip> | |
#include <chrono> | |
#include <cassert> | |
typedef uint8_t u8; | |
typedef int8_t s8; |
View MT-replace-deprecated.sh
#!/bin/bash | |
# License: CC0 | |
# How to use: | |
# 1) Open the terminal in the target mod directory | |
# 2) Call the script | |
files=$(find . -name "*.lua") | |
ref_call() |
View Data_RW.cs
/* | |
Code to serialize and deserialize a world | |
Copyright (C) 2015 Krock/SmallJoker <mk939@ymail.com> | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. |
NewerOlder