Warning
This document is a work in progress.
| // SPDX-License-Identifier: Unlicense | |
| /* compile_command: gcc -Wall -Wextra -shared -O2 -ggdb3 -o no_madv_guard.so no_madv_guard.c */ | |
| /* deny madvise(MADV_GUARD_INSTALL) - rr (rr-project.org) does not support it yet */ | |
| #include <errno.h> | |
| #include <stddef.h> | |
| #include <stdlib.h> | |
| #include <linux/audit.h> | |
| #include <linux/bpf.h> | |
| #include <linux/filter.h> | |
| #include <linux/seccomp.h> |
| #!/bin/sh | |
| set -x | |
| TAR="${1:-tar}" # allow pointing at a different tar version for convenience | |
| cat > info.sh <<EOF | |
| #!/bin/sh | |
| printf '%s.%d\n' "\$TAR_ARCHIVE" "\$TAR_VOLUME" >&\$TAR_FD | |
| EOF | |
| chmod +x info.sh |
| #!/usr/bin/python3 | |
| import sys | |
| import os | |
| import tty | |
| import termios | |
| import re | |
| import struct | |
| import fcntl | |
| stdin = sys.stdin.fileno() |
| import json | |
| def flatten_data(pairs): | |
| for i, (k, v) in enumerate(pairs): | |
| if not isinstance(v, list) or len(v) != 1 or not isinstance(v[0], dict): | |
| continue | |
| kk, vv = next(iter(v[0].items())) | |
| if kk == "data": | |
| pairs[i] = (k, vv) |
| # SPDX-License-Identifier: Unlicense | |
| # netbox add-on to set up superuser/staff state & groups from keycloak | |
| # | |
| # necessary setup in keycloak: | |
| # Clients -(netbox client)-> Roles-> create superuser; assign users/groups/... to that role | |
| # Clients -(netbox client)-> Roles-> create staff; assign users/groups/... to that role | |
| # Clients -(netbox client)-> Client scopes -(the "dedicated" one)-> Add Mapper, -> | |
| # by configuration, Group Membership, Token Claim Name = "groups", full group path = off | |
| # (for the last one, alternatively, groups can be mapped through roles, if the indirection is nedeed) | |
| # |
| // ==UserScript== | |
| // @name Zammad ticket items expand-by-default | |
| // @match https://requests.cccv.de/* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| let seen_before = new Set(); | |
| function direct_text(parent) { |
| /* compile: gcc -o creds creds.c -lcap */ | |
| #define _GNU_SOURCE 1 | |
| #include <stdarg.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <unistd.h> |
| #!/bin/sh | |
| KEYNAME="$1" | |
| PUBKEYFILE="$2" | |
| echo "public-key peer $KEYNAME" | |
| echo "public-key-code begin" | |
| < $PUBKEYFILE ssh-keygen -e -f /dev/stdin -m PKCS8 | openssl pkey -pubin -outform DER | hexdump -e '37/1 "%02X" "\n"' | |
| echo "public-key-code end" |
| #!/bin/sh | |
| # shell escaping "demo-sheet" | |
| # "args" just prints argv[] | |
| filename="/tmp/some file" | |
| echo 'foo echo some file contents' > "$filename" | |
| set -x | |
| args $(echo foo echo wrong) |