Skip to content

Instantly share code, notes, and snippets.

View rlsit's full-sized avatar

Rosa-Luxemburg-Stiftung Gesellschaftsanalyse und politische Bildung e. V. rlsit

View GitHub Profile
#! /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/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']