Skip to content

Instantly share code, notes, and snippets.

View guerzon's full-sized avatar

guerzon guerzon

View GitHub Profile
@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 / 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
#!/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 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
@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