Skip to content

Instantly share code, notes, and snippets.

View skipperTux's full-sized avatar

Christoph Roeper skipperTux

View GitHub Profile
@skipperTux
skipperTux / wg-nmcli
Last active April 25, 2024 10:17
Bash script for managing WireGuard connections using NetworkManager CLI
#!/usr/bin/env bash
set -o nounset
set -o pipefail
#set -o xtrace
# http://www.tldp.org/LDP/abs/html/exitcodes.html
# user-defined exit codes range 64 - 113 (in addition to 0, for success)
readonly SUCCESS=0
readonly E_NO_CONNECTION_PROFILE=64
@skipperTux
skipperTux / mysql-backup.php
Created April 5, 2020 07:32
PHP script for MySQL backup-dump with backup rotation (all-inkl.com)
<?php
### BEGIN CONFIGURATION ###
$backup_root = "/www/htdocs/{kas_user}/backup";
$database = [
"{database1}" => "{password1}",
"{database2}" => "{password2}"
];
$rotateDays = 14;
@skipperTux
skipperTux / BackupDatabaseCopy_Parameterized.sql
Last active February 6, 2017 11:58
(T-SQL) SQL Server parameterized scripts for backup a production database and restore into a test database
DECLARE
@TrailingPathDelimiter nchar(1) = N'\\',
@BackupExtension nchar(4) = N'.bak',
@Separator nchar(1) = N'_';
DECLARE
@DbName nvarchar(max),
@BackupPath nvarchar(max);
-- ** NO CHANGES BEFORE THIS LINE **
@skipperTux
skipperTux / PKGBUILD
Created March 17, 2014 17:37
xkeyboard-config.PKGBUILD
# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xkeyboard-config
pkgver=2.11
pkgrel=2
pkgdesc="X keyboard configuration files"
arch=(any)
license=('custom')