Skip to content

Instantly share code, notes, and snippets.

View guerzon's full-sized avatar

guerzon guerzon

View GitHub Profile
@guerzon
guerzon / latency.txt
Created October 29, 2018 01:55 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@guerzon
guerzon / pam_tally_reset.txt
Created November 14, 2018 01:23
Reset pam module login counters
### On RHEL5 servers ###
1. Check the login failure count
pam_tally --user username
2. Reset the login failures
pam_tally --user username --reset
3. Retry logging in.
### On RHEL6 and RHEL7 servers ###
1. Check the login failure count
pam_tally2 --user username
#!/bin/bash
set -e
UPDATES_URL="http://updates.jenkins-ci.org/download/plugins/"
if [ $# -lt 2 ]; then
echo "USAGE: $0 plugin-list-file destination-directory"
exit 1
fi
@guerzon
guerzon / ansible references
Last active November 6, 2019 11:52
List of useful internet resources for ansible
## Important Documentation
Documentation: https://docs.ansible.com/ansible/latest/index.html
Modules: https://docs.ansible.com/ansible/latest/modules/modules_by_category.html
Community: https://docs.ansible.com/ansible/latest/community/index.html
## Other resources
Ansible for the Windows Admin: https://www.youtube.com/watch?v=ZI20Y10OKd0
@guerzon
guerzon / verify_ciphers.sh
Last active December 18, 2019 03:05
Useful script to test cipher suite support of services running SSL/TLS.
#!/usr/bin/env bash
# Usage: ./verify_ciphers.sh IP:PORT
# Credits: http://superuser.com/a/224263/204745
# OpenSSL requires the port number.
SERVER=$1
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
echo Obtaining cipher list from $(openssl version).
@guerzon
guerzon / config.toml
Created September 4, 2020 08:19
Configuration file for a Docker gitlab runner
concurrent = 10
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Docker runner"
url = "https://gitlab.localdomain.local/"
token = "tOkeNh3r3-"
Wednesday 04 November 2020 12:03:28 +0100 (0:00:00.067) 0:00:14.229 ****
redirecting (type: modules) ansible.builtin.keycloak_client to community.general.keycloak_client
Using module file /Users/workstation/.local/share/virtualenvs/ansible_project-6ES-zTZc/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/keycloak_client.py
Pipelining is enabled.
<targetserver> ESTABLISH SSH CONNECTION FOR USER: root
<targetserver> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/Users/workstation/.ansible/cp/205f67cdb9 targetserver '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<targetserver> (0, b'\n{"proposed": {"publicClient": false, "protocol": "openid-connect", "description": "awesomeapp Desktop Application OpenID client", "directAccessGrantsEnabled": true, "adminUrl": "https

podman issues

Blockers why podman cannot replace docker-ce (yet). This is to remind myself to not waste any more time trying to use podman.

Issues

rootless containers fail to start with cgroup2 (EL8)

[lester@rocky8 ~]$ podman run alpine
Hostname role IP address
kubehost1 master 192.168.133.91
kubehost2 worker 192.168.133.92
kubehost3 worker 192.168.133.93
buildatron management/local 192.168.133.128
@guerzon
guerzon / deploy-awx.sh
Created June 23, 2022 09:19
Deploy the AWX Kubernetes Operator
## awx namespace
export NAMESPACE=awx
kubectl create ns $NAMESPACE
## secrets
cat <<EOF > awx-secrets.yml
---
apiVersion: v1
kind: Secret