Skip to content

Instantly share code, notes, and snippets.

@werty1st
werty1st / README.md
Created October 16, 2023 11:56 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@werty1st
werty1st / tag_image_without_download.sh
Created October 7, 2020 15:26
tag docker image without downloading it (private gitlab registry)
AUTHURL="https://gitlab.de"
REGISTRY_NAME="https://reg.gitlab.de"
CONTENT_TYPE="application/vnd.docker.distribution.manifest.v2+json"
REPOSITORY="myrepo/ts1"
TAG_OLD="test"
TAG_NEW="latest"
USERNAME="test-tag-latest"
PASSWORD="sdfsdfdsfsdfsdf"
@werty1st
werty1st / docker-compose.update.yml
Last active March 7, 2023 12:54
shedule docker-compose updates
version: '3.2'
services:
ofelia:
image: mcuadros/ofelia:latest
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
@werty1st
werty1st / docker wait nfs systemd
Created July 30, 2019 22:01
docker wait nfs systemd
UPDATE / SOLUTION FOR ANYONE HAVING THIS PROBLEM
1.) Make sure your NFS mount in /etc/fstab does NOT have the "bg" background field
and
2.) Create: /etc/systemd/system/docker.service.d/override.conf
with:
[Unit]
After=nfs.mount
and then
systemctl daemon-reload
#!/bin/bash
REPRODIR=/opt/app_build_repo
TARGET=/srv/www/htdocs/versions
FOUND_NEW=false
msg=""
cd $REPRODIR #change to git repo
@werty1st
werty1st / app.js
Created January 23, 2019 13:32 — forked from goloroden/app.js
Async constructors for JavaScript
// In JavaScript, constructors can only be synchronous right now. This makes sense
// from the point of view that a constructor is a function that returns a newly
// initialized object.
//
// On the other hand, it would sometimes be very handy, if one could have async
// constructors, e.g. when a class represents a database connection, and it is
// desired to establish the connection when you create a new instance.
//
// I know that there have been discussions on this on StackOverflow & co., but
// the so-far mentioned counter arguments (such as: doesn't work as expected
@werty1st
werty1st / caddy-upstart-install.sh
Created November 20, 2018 17:50 — forked from HairAndBeardGuy/caddy-upstart-install.sh
Install Caddy Server on Ubuntu 14.04 with Upstart
apt install curl
curl https://getcaddy.com | bash -s cors,expires,filemanager,git,hugo,ipfilter,jsonp,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
mkdir /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy
chmod 0770 /etc/ssl/caddy

Keybase proof

I hereby claim:

  • I am werty1st on github.
  • I am werty1st (https://keybase.io/werty1st) on keybase.
  • I have a public key ASBukSzTVrg_-qiJVzK8Ts3jh_43uauoYXg4cB3PJSBK4go

To claim this, I am signing this object:

@werty1st
werty1st / run.php
Created June 18, 2018 15:55 — forked from dktapps/run.php
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@werty1st
werty1st / Origin to Upstream
Created April 9, 2018 08:56 — forked from javigomez/Origin to Upstream
Git command to rename the origin to upstream when you just forked a project
git remote rename origin upstream
git add remote origin git@github.com:user/fork.git