Skip to content

Instantly share code, notes, and snippets.

View TJuberg's full-sized avatar

Thomas Juberg TJuberg

  • Bane NOR SF
  • Trondheim, Norway
View GitHub Profile
@TJuberg
TJuberg / gist:0969bbb3e04b7be6a6fe0f6005fc4f98
Created March 15, 2024 11:12 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@TJuberg
TJuberg / export-awx-inventory.py
Created March 11, 2024 18:40 — forked from afreller-1wa/export-awx-inventory.py
Updated python script to export ansible inventory from awx | ansible tower server.
#!/usr/bin/python3
import requests
import argparse
import sys
# add terms to this list which will be ignored for ini file generation.
# eg. every host var that contains ther term remote_tower will be ignored
exclude_host_vars = [ 'remote_tower']
parser = argparse.ArgumentParser(description='Convert Ansible AWX/Tower Inventory to standard inventory')
@TJuberg
TJuberg / ipa-import-dns-zone.sh
Created March 3, 2023 12:27 — forked from lucashalbert/ipa-import-dns-zone.sh
Script to import an existing BIND DNS zone to IPA
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 10/14/2019
# Last Edited: 10/14/2019
# Version: 2019.10.14
# Description: Parse a BIND DNS zone (minus the SOA) and import directly to IPA
@TJuberg
TJuberg / resize_disk.sh
Created October 21, 2022 23:24 — forked from CHERTS/resize_disk.sh
Resize LVM disk and partitions
#!/bin/bash
#
# Program: Resize LVM disk and partition <resize_disk.sh>
#
# Author: Mikhail Grigorev <sleuthhound at gmail dot com>
#
# Current Version: 1.0.1
#
# License:
@TJuberg
TJuberg / zabbix_selinux_centos8_config.txt
Created October 21, 2022 23:23 — forked from CHERTS/zabbix_selinux_centos8_config.txt
Zabbix on CentOS 8 with SELinux
If you're running the Zabbix on CentOS 8 with SELinux enabled on it, then you must do all command on this section.
Install SELinux utilities using the dnf command below.
dnf install policycoreutils checkpolicy setroubleshoot-server
Once the installation is complete, create a new directory '~/zabbix-linux' and go into it.
mkdir -p ~/zabbix-selinux
cd ~/zabbix-selinux/

Using Other Window Managers with Plasma 5.21 and systemd Startup

KDE Plasma on X offers the option to use a differnt window manager than the default KWin. This way one can use many of the integrations KDE offers, but with for example the i3 window manager to have proper tiling support. This only works on X, not on Wayland.

With Plasma 5.21 it is now possible to "boot" KDE using systemd user services; that is, KDE Plasma provides a bunch of unit files that get started atfer you login in your graphical user session. Inidividual components, such as KWin, have individual unit files, and dependencies are specified using the usual systemd relationships between units. Among other things this allows for better ressource control using automatically created CGroups.

More details here: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/47

Sadly this breaks the way one could change the window manager, that was used until now. I noticed af

@TJuberg
TJuberg / qip_provision_ip.py
Created March 3, 2020 21:20 — forked from ryancurrah/qip_provision_ip.py
Allocate an IP Address using VitalQIP SOAP API
#!/usr/bin/env python
import argparse
import re
import uuid
import sys
from xml.dom import minidom
from xml.parsers.expat import ExpatError
try:

Keybase proof

I hereby claim:

  • I am tjuberg on github.
  • I am tjuberg (https://keybase.io/tjuberg) on keybase.
  • I have a public key whose fingerprint is FFE7 2ABB C8E8 E651 009C 3188 097E EE16 30DD 6113

To claim this, I am signing this object:

@TJuberg
TJuberg / Ergodox-ez-configurator-characters-map-norwegian-qwerty.txt
Created December 20, 2018 23:29
Keyboard map for the Ergodox ez to create the various non 0-9,a-z characters for the norwegian qwerty keymap.
Created using the instructions here: https://git.io/vxWH1
+ <- -
\ <- =
å <- [
¨ <- ]
' <- \
ø <- ;
æ <- '
, <- ,
@TJuberg
TJuberg / sorted_json.rb
Created January 18, 2018 12:38 — forked from halkeye/sorted_json.rb
Puppet module for outputting json in a sorted consistent way
#
# sorted_json.rb
# Puppet module for outputting json in a sorted consistent way. I use it for creating config files with puppet
require 'json'
def sorted_json(json)
if (json.kind_of? String)
return json.to_json
elsif (json.kind_of? Array)