View 00-grow_fixed.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/sh | |
# | |
# /system/addon.d/10-resize-system.sh | |
# | |
. /tmp/backuptool.functions | |
case "$1" in | |
backup) | |
# Stub | |
;; |
View ip-route-TODO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://www.cyberciti.biz/tips/how-do-i-drop-or-block-attackers-ip-with-null-routes.html | |
# - not everything from there actually works (from and to don't work with blackhole) | |
# ip route add blackhole ::ffff:0:0/96 |
View host_net_cleanup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip -6 route del fc00::/7 dev tun0 | |
ip link del dum0 | |
ip tunnel del tun0 | |
sysctl -w net.ipv6.conf.all.forwarding=0 |
View migrators.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here you'll find various code snippets for dealing with world migrators. | |
# Original source, and more info: https://forums.kleientertainment.com/forums/topic/59174-understanding-shards-and-migration-portals/ | |
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) |
View Code.gs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
} | |
} |