curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
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
#!/usr/bin/env bash | |
DATABASE_URL="postgres://MyPostgresUser:MyPostgresPassword@192.168.0.1:5432/MyPostgresDB" | |
# `cut` is used to cut out the separators (:, @, /) that come matched with the groups. | |
DATABASE_USER=$(echo $DATABASE_URL | grep -oP "postgres://\K(.+?):" | cut -d: -f1) | |
DATABASE_PASSWORD=$(echo $DATABASE_URL | grep -oP "postgres://.*:\K(.+?)@" | cut -d@ -f1) | |
DATABASE_HOST=$(echo $DATABASE_URL | grep -oP "postgres://.*@\K(.+?):" | cut -d: -f1) | |
DATABASE_PORT=$(echo $DATABASE_URL | grep -oP "postgres://.*@.*:\K(\d+)/" | cut -d/ -f1) |
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
const ldap = require('ldapjs'); | |
const fs = require('fs'); | |
const axios = require("axios"); | |
const https = require("https"); | |
const querystring = require('querystring'); | |
const server = ldap.createServer(); | |
const authenticate = async (req, res, next) => { | |
if (req.dn.toString() !== 'cn=keycloak' || |
Download the latest ugw3
package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb
.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
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
############################ | |
# chroot demo # | |
############################ | |
pwd # outside container | |
mkdir newroot | |
mkdir -p newroot/{bin,dev,lib,libexec,sbin} | |
# copy bins |
From an appropriate location:
mkdir replica-set
mkdir -p replica-set/rs0-0 replica-set/rs0-1
mongod --port 27018 --dbpath replica-set/rs0-0 --replSet rs0 --smallfiles --oplogSize 128 &
mongod --port 27019 --dbpath replica-set/rs0-1 --replSet rs0 --smallfiles --oplogSize 128 &
mongo localhost:27018
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
require = function a(b, c, d) { | |
function e(g, h) { | |
if (!c[g]) { | |
if (!b[g]) { | |
var i = "function" == typeof require && require; | |
if (!h && i) return i(g, !0); | |
if (f) return f(g, !0); | |
var j = new Error("Cannot find module '" + g + "'"); | |
throw j.code = "MODULE_NOT_FOUND", j | |
} |
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
#!/usr/bin/env bash | |
# phase one: core install | |
# Pro tip: edit the script and use this repository instead to try out the | |
# codename "Awesome Ocelot" project - which should be even faster than the | |
# bare 6.2 core: https://github.com/NamelessCoder/TYPO3.CMS.git | |
# Live demo of "Awesome Ocelot" is at http://staging.namelesscoder.net | |
git clone https://github.com/TYPO3/TYPO3.CMS.git --depth 1 |