git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#! /usr/bin/env ruby | |
require 'sophos/sg/rest' | |
require "resolv" | |
client = Sophos::SG::REST::Client.new( | |
'https://$RESTAPIUSER:$TOKEN@$URL:$PORT/api/', | |
fingerprint: '$CERTHASH') | |
typelist = ['host', 'group', 'network', 'range'] |
#! /bin/bash | |
# | |
# starts a new gnome terminal with a random profile selected | |
# | |
eval "PROFILES=( $(for p in $(dconf list /org/gnome/terminal/legacy/profiles:/ | sed '/^:/!d'); do dconf read /org/gnome/terminal/legacy/profiles:/${p}visible-name; done | grep -vi transparent) )" | |
gnome-terminal --window-with-profile "${PROFILES[$((RANDOM%${#PROFILES[@]}))]}" & |
#! /usr/bin/perl -w | |
use strict; | |
use warnings; | |
use Astaro::ConfdPlRPC; | |
use Data::Dumper; | |
use Try::Tiny; | |
my $restartall = 0; |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#! /bin/sh | |
clog -f /var/log/filter.log | sed 's/ \+/,/g' | awk 'BEGIN { FS = "," } ; {print "iface:"$5" action:"$7" dir:"$8" proto:"$17" src:"$19" dst:"$20" sport:"$21" dport:"$22}' |
## list connections | |
nmcli c | |
## get the password of a specific connection | |
## where XXX is the NAME or UUID from the list above | |
nmcli --show-secrets c show XXX | grep psk |
#--------------------------------------------------------------------- | |
# Global settings | |
#--------------------------------------------------------------------- | |
global | |
# to have these messages end up in /var/log/haproxy.log you will | |
# need to: | |
# | |
# 1) configure syslog to accept network log events. This is done | |
# by adding the '-r' option to the SYSLOGD_OPTIONS in | |
# /etc/sysconfig/syslog |
# service samba-ad-dc stop
# mkdir sambabackup-20220213-offline
# samba-tool domain backup offline --targetdir=/root/sambabackup-20220213-offline
# mv /var/lib/samba /var/lib/samba.bakup
# samba-tool domain backup restore --newservername=DC01 --backup-file=/root/sambabackup-20220213-offline/samba-backup-2022-02-13T19-38-42.702607.tar.bz2 --targetdir=/var/lib/samba
# vim /etc/samba/smb.conf # set new "netbios name"