Skip to content

Instantly share code, notes, and snippets.

@babs
babs / init-salt-standalone.sh
Created March 3, 2023 09:50
Initialize salt standalone
#/bin/bash
. /etc/os-release
curl -fsSL -o $target/usr/share/keyrings/salt-archive-keyring.gpg https://repo.saltproject.io/salt/py3/${ID}/${VERSION_ID}/amd64/latest/salt-archive-keyring.gpg
cat > $target/etc/apt/sources.list.d/salt-latest.list <<EOF
deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg] http://repo.saltproject.io/salt/py3/${ID}/${VERSION_ID}/amd64/latest ${VERSION_CODENAME} main
EOF
apt update
apt install git python3-yaml salt-minion
@babs
babs / phpipam-enhancer.user.js
Last active October 11, 2022 11:42
Tampermonkey script to enhance phpipam subnet view by adding http and https links to ips and hostnames
// ==UserScript==
// @name phpipam-enhancer
// @namespace https://github.com/babs/phpipam-enhancer.user.js
// @version 0.7
// @downloadURL https://github.com/babs/phpipam-enhancer.user.js/raw/main/phpipam-enhancer.user.js
// @updateURL https://github.com/babs/phpipam-enhancer.user.js/raw/main/phpipam-enhancer.user.js
// @description Enhance phpipam subnet view by adding http and https links to ips and hostnames
// @author Damien Degois
// @match http*://*/subnets/*
// @match http*://*/tools/search/*
@babs
babs / gist:96474e1b3b3b02641f169f06a0c2a4fe
Created September 28, 2017 21:30 — forked from christianclinton/gist:faa1aef119a0919aeb2e
RabbitMQ Password Hash - Python
#!/bin/env/python
import hashlib
import binascii
# Utility methods for generating and comparing RabbitMQ user password hashes.
#
# Rabbit Password Hash Algorithm:
#
# Generate a random 32 bit salt:
# CA D5 08 9B
#!/bin/bash
# Replaces classes in Android Package Files
# (c) Sebastian Fischer, CC-BY
# Can be used to rebuild an App with a modified version of a used library,
# as required for closed works that link to an LGPL library.
# Depends on: https://code.google.com/p/dex2jar/