Template service:
/etc/systemd/system/[email protected]
[Unit]
Description=manages the NAME service, instance %i
PartOf=NAME.target
[Service]
Type=simple
User=root
# in /etc/systemd/system/at.slice on debian | |
[Slice] | |
# optional: maximum memory usage of this slice, prevents system oom situations if a container balloons due to changes | |
#MemoryMax=20G | |
# if the cpu is 100% maxed out, at.slice processes don't get any cpu at all. They only get cpu if there is otherwise idle capacity | |
CPUWeight=idle | |
# for more options see man systemd.resource-control (or https://manpages.debian.org/bookworm/systemd/systemd.resource-control.5.en.html I guess) |
# The following is a guide for debian 12 (bookworm), it should work on all modern distros and the concepts will apply to any OS of your choosing | |
# What this will do is create a dual-stack (so ipv4 and ipv6) docker network you can add to your containers and add NAT for this network so any requests are mapped to a random IP from the specified range | |
# NOTE: Due to how linux does SNAT (source: http://blog.asiantuntijakaveri.fi/2017/03/linux-snat-with-per-connection-source.html) the outgoing ip SNAT picks is "sticky", linux hashes the source ip and uses that to pick the outgoing IP, in the usual /64 setup it seems to switch between 2 outgoing ips | |
# The blog post links a kernel patch to change this, but I don't want to get into patching the kernel (here, or at all to be honest). | |
# I have thought of a workaround to try, adding many SNAT rules with a sub-set of the ip range for each source port (as those should be random), then you'd get ~40k (rough untested guesstimate) ips per container, but I don't kno |
public struct DeterministicObjectSpawnState { | |
public byte PrefabIndex; | |
public Vector3 Position; | |
public Quaternion Rotation; | |
// ... | |
} | |
public class DeterministicObject : MonoBehaviour { | |
public void Init(DeterministicObjectSpawnState state) { | |
// ... do something ... | |
} |
aapt add $PATH_TO_APK $FILES | |
zipalign -c -v 4 $PATH_TO_APK | |
apksigner sign --ks $PATH_TO_KEYSTORE $PATH_TO_APK |
Template service:
/etc/systemd/system/[email protected]
[Unit]
Description=manages the NAME service, instance %i
PartOf=NAME.target
[Service]
Type=simple
User=root
set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 | |
signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 filename.exe |
server { | |
listen 443 ssl; | |
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; | |
server_name example.com; | |
root /var/www/example/httpdocs/; | |
include /etc/nginx/vhost-common.conf; | |
index index.html index.html index.php; | |
client_max_body_size 100m; |
/** | |
* @name URLTOLOAD | |
* @label Url to Load | |
* @type text | |
* @description The web address/url from where to extract text | |
*/ | |
var URLTOLOAD = "https://api.pretzel.rocks/api/v1/playing/YOUR ID HERE?limit=1"; | |
/** |
server{ | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
allow 1.2.3.4; # whitelist server | |
deny all; | |
location / { | |
return 403; | |
} | |
location ~/i/(?<rdomain>[a-zA-Z0-9-\.]+)/ { |
#!/bin/bash | |
######################## | |
######## CONFIG ######## | |
######################## | |
databases=("database1" "database2" "database3") | |
mysql_host="localhost" | |
mysql_user="asdf" | |
mysql_password="pass" | |
storage_dir="/backups" | |
name="mysql" |