Skip to content

Instantly share code, notes, and snippets.

beddari / gist:439de114c2230b4b1f043dff39bb8168
Last active March 22, 2022 11:58 — forked from yuezhu/gist:25e2e43c602a4aa2d1b897bbc47cb0cc
Build Ceph radosgw using Centos 7 container
mkdir -p /root/build
docker run --name centos --hostname centos -it -v /root/build:/root/build centos:7 /bin/bash
# inside centos container
yum install -y epel-release
yum install -y git jq wget cmake3 make gcc-c++ rpm-build rpmdevtools
yum install -y centos-release-scl
yum install -y devtoolset-8
scl enable devtoolset-8 bash
cd /root/build
beddari /
Created September 27, 2021 11:22 — forked from TimJDFletcher/
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 /
Created October 7, 2020 11:06 — forked from eqhmcow/
HFSC - linux traffic shaping's best kept secret
# 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 / 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
netbox_config: "{{ netbox_config | combine({'SECRET_KEY': _netbox_secret_key_file['content'] | b64decode}) }}"
beddari /
Created March 2, 2020 08:20 — forked from geerlingguy/
Ansible Role Test Shim Script
# Ansible role test shim.
# Usage: [OPTIONS] ./tests/
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
"key": "ctrl+v tab",
"command": "type",
"args": { "text": "\t" },
"when": "editorTextFocus"
beddari / ansible_when_truthy_test.yml
Created March 1, 2019 08:05 — forked from kcd83/ansible_when_truthy_test.yml
Test what vars evalute to true or false in Ansible 2.5
#!/usr/bin/env ansible-playbook
- name: Test truthiness
hosts: localhost
gather_facts: False
- True
- 1
beddari /
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 / recovery.txt
Created May 29, 2018 14:44 — forked from Millnert/recovery.txt
ceph recovery when FUBAR (mem / cpu looping crashing OSDs with OOM)
## Stop all OSDs
## Set OSD nodown
ceph osd set nodown
##Set OSD nobackfill
ceph osd set nobackfill