Skip to content

Instantly share code, notes, and snippets.

myxal /
Last active Jan 10, 2022
addon.d scripts to grow /system after installation (choose 1)
# /system/addon.d/
. /tmp/backuptool.functions
case "$1" in
# Stub
myxal /
Last active Mar 7, 2020
Test 6in4 tunnel within single physical network
ip -6 route del fc00::/7 dev tun0
ip link del dum0
ip tunnel del tun0
sysctl -w net.ipv6.conf.all.forwarding=0
myxal / migrators.lua
Created Mar 4, 2020
Worldmigrators, shard linking, in Don't Starve Together
View migrators.lua
# Here you'll find various code snippets for dealing with world migrators.
# Original source, and more info:
1) Join a server
(We are in master now, shard_id is 1)
2) c_spawn("cave_entrance")
(Cave entrance will be id 11, automatically, since there were 10 cave entrances by default on generation)
3) Stand near the entrance, as c_find picks the closest thing
4) c_find("cave_entrance_open").components.worldmigrator:SetDestinationWorld(shard_id,true)
(This shard id will be the second slave)
myxal / ip-route-TODO
Last active Mar 7, 2020
IPv6 home gateway firewall rules
View ip-route-TODO
# See
# - not everything from there actually works (from and to don't work with blackhole)
# ip route add blackhole ::ffff:0:0/96
myxal /
Created Oct 24, 2019
Custom functions for DST - Skin chests
function MAPSELECT(value, key, selection) {
if (value.length != key.length){
throw("lenghts of value and key must be equal")
output = ""
for (i=0;i<value.length;i++) {
if (key.charAt(i) == selection) {
output = output.concat(value.charAt(i))