Skip to content

Instantly share code, notes, and snippets.

@beddari
beddari / OIDC.jpg
Created June 10, 2025 10:52 — forked from arax/OIDC.jpg
OpenStack with OpenID Connect and OAuth 2.0
OIDC.jpg
@beddari
beddari / OIDC.jpg
Created June 10, 2025 10:52 — forked from samsu/OIDC.jpg
OpenStack with OpenID Connect and OAuth 2.0
OIDC.jpg
@beddari
beddari / GNUPG_agent_forwarding.md
Created September 27, 2021 11:22 — forked from TimJDFletcher/GNUPG_agent_forwarding.md
GnuPG agent forwarding

Forward GnuPG agent from macOS to Linux

On the remote machine

Run gpg once as your to create the directory structure

gpg --list-keys

For headless systemd based hosts

@beddari
beddari / hfsc-shape.sh
Created October 7, 2020 11:06 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@beddari
beddari / nope.yaml
Created September 1, 2020 11:07
Role authors, don't do this in your role
# If you specify a variable for users to set outside your role
# DO NOT overwrite it later.
#
# Due to precedence rules the combined value here will
# never be set in some cases, e.g when using include_role
#
- name: Set netbox_config.SECRET_KEY to generated SECRET_KEY
set_fact:
netbox_config: "{{ netbox_config | combine({'SECRET_KEY': _netbox_secret_key_file['content'] | b64decode}) }}"
{
"key": "ctrl+v tab",
"command": "type",
"args": { "text": "\t" },
"when": "editorTextFocus"
}
https://hackmd.io/qbggcyozQr6M1mfy3GcHIA#
@beddari
beddari / convert_filenames.py
Created October 17, 2018 06:33
ascii filenames
#!/usr/bin/env python
# convert unicode filenames to pure ascii
import os
import sys
import glob
import unicodedata
EXT = u'*.*'
@beddari
beddari / format_list.py
Created December 2, 2017 18:19
Ansible list formatting filter_plugin
def format_list(list_, pattern):
return [pattern % s for s in list_]
class FilterModule(object):
def filters(self):
return {
'format_list': format_list,
}
@beddari
beddari / learning.yaml
Last active October 30, 2017 09:14
Ansible THW
---
- name: test
hosts: localhost
connection: local
gather_facts: False
tasks:
# Test each key in a hash for existence, works fine ... I'll accept doing this!
- name: do something based on the existence of nested dict key nested.config.hash.key
debug: msg="{{ nested.config.hash.key }}"