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
version: "3.8" | |
services: | |
minecraft: | |
image: itzg/minecraft-server | |
ports: | |
- 25565:25565 | |
restart: unless-stopped | |
environment: | |
EULA: "TRUE" | |
OPS: CaseyFulton |
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 | |
branch=$(git branch | grep \* | cut -d ' ' -f2) | |
[[ "roar" == "$branch" ]] || branch=fixed | |
# Delete output files. | |
rm build/config/${branch}/* | |
robo parameters:copy-from-dist-all |
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 names = require("./names.json"); | |
const numberOfConspirators = 4; | |
// Randomise names - comment out for repeatable results. | |
names.sort(function() { | |
return 0.5 - Math.random(); | |
}); | |
console.log( | |
JSON.stringify( |
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
[Unit] | |
Description=Reverse SSH tunnel to scratch. | |
After=network-online.target | |
Before=multi-user.target | |
DefaultDependencies=no | |
[Service] | |
Restart=always | |
RestartSec=10 | |
ExecStart=/usr/bin/ssh \ |
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 | |
# Number of days from expiry to throw warning. | |
warnPeriod=7 | |
domainsFile="$( cd "$(dirname "$0")" ; pwd -P )/domains.txt" | |
if [ ! -f "$domainsFile" ]; then | |
>&2 echo "Missing domains.txt file." | |
exit 1 |
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 | |
# Slack bot token to use for auth. | |
token=xoxb-1234567890-ABCDEFGHIJK1234567890 | |
# Channel ID or user ID to post to. | |
channel=U12345678 | |
# Name of bot user to post message as. | |
username=warnbot | |
# Emoji to use as icon for message. | |
emoji=":warning:" |
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/sh | |
COOKIE_JAR=$(mktemp) | |
: ${CERTBOT_DOMAIN?"Missing CERTBOT_DOMAIN env var."} | |
: ${CERTBOT_VALIDATION?"Missing CERTBOT_VALIDATION env var."} | |
: ${ZUVER_EMAIL?"Missing ZUVER_EMAIL env var."} | |
: ${ZUVER_PASSWORD?"Missing ZUVER_PASSWORD env var."} | |
: ${ZUVER_DOMAIN_HASH?"Missing ZUVER_DOMAIN_HASH env var."} | |
DOMAIN_PREFIX="_acme-challenge" |
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
<?php | |
$clientId = getenv('clientId') ?? $_GET['clientId'] ?? null; | |
$clientSecret = getenv('clientSecret') ?? $_GET['clientSecret'] ?? null; | |
if ($clientId === null || $clientSecret === null) { | |
error('auth failure', "Need clientId and clientSecret env vars or parameters.\n"); | |
} | |
$releaseName = getenv('release') ?? $argv[1] ?? $_GET['r'] ?? $_GET['release'] ?? null; | |
if ($releaseName === null) { |
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 | |
PORTS="22 80 443" | |
DEFAULT_DNS=$(nmcli device show $DEFAULT_INTERFACE | grep IP4\.DNS | awk '{print $2}' | head -n 1) | |
DEBUG=1 | |
function debug { | |
if [ $DEBUG -eq 1 ]; then | |
echo $1 | |
fi |
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 | |
# Remove proxy config from system environment. | |
sed -r -i.old '/https?_proxy/d' /etc/environment | |
# Remove proxy config from APT. | |
sed -i.old '/proxy/d' /etc/apt/apt.conf | |
# Stop CNTLM. | |
systemctl stop cntlm.service |
NewerOlder