Skip to content

Instantly share code, notes, and snippets.

Avatar

guerzon

View GitHub Profile
View keycloak_client_output.log
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
@guerzon
guerzon / config.toml
Created Sep 4, 2020
Configuration file for a Docker gitlab runner
View config.toml
concurrent = 10
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Docker runner"
url = "https://gitlab.localdomain.local/"
token = "tOkeNh3r3-"
@guerzon
guerzon / openssl_commands.sh
Last active Apr 30, 2021
Useful OpenSSL comands for testing, troubleshooting, and information gathering
View openssl_commands.sh
# Test an SSL connection
openssl s_client -connect <IP>:<PORT>
# Test if SSLv3 is supported
# Expected result if TLSv1.0 is not supported: ssl handshake failure
openssl s_client -connect <IP>:<PORT> -ssl3
# Test if TLSv1.0 is supported
# Expected result if TLSv1.0 is not supported: ssl handshake failure
@guerzon
guerzon / verify_ciphers.sh
Last active Dec 18, 2019
Useful script to test cipher suite support of services running SSL/TLS.
View verify_ciphers.sh
#!/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 / ansible references
Last active Nov 6, 2019
List of useful internet resources for ansible
View ansible references
## 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
View install_jenkins_plugin.sh
#!/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 / pam_tally_reset.txt
Created Nov 14, 2018
Reset pam module login counters
View pam_tally_reset.txt
### 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
@guerzon
guerzon / latency.txt
Created Oct 29, 2018 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
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