Skip to content

Instantly share code, notes, and snippets.

View joe-speedboat's full-sized avatar
🙃
AiHoi!

Chris Rüttimann joe-speedboat

🙃
AiHoi!
View GitHub Profile
@joe-speedboat
joe-speedboat / ansible-summary.md
Created January 19, 2018 14:22 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@joe-speedboat
joe-speedboat / ad_utils.py
Created March 1, 2018 09:42 — forked from dangtrinhnt/ad_utils.py
Get Active Directory group members using python
#! /bin/env python
#
# USAGE
# $ python ad_utils.py "My Group Name"
#
# Author:
# Trinh Nguyen
# dangtrinhnt@gmail.com
# www.dangtrinh.com
@joe-speedboat
joe-speedboat / ansible-role-test.sh
Created March 5, 2018 20:22 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)
@joe-speedboat
joe-speedboat / postgres-cheatsheet.md
Created April 20, 2018 07:38 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@joe-speedboat
joe-speedboat / postfix
Last active March 7, 2023 14:56 — forked from TinLe/postfix
postfix grok patterns for graylog 3.x
# Syslog stuff
COMPONENT ([\w._\/%-]+)
COMPID postfix\/%{COMPONENT:component}(?:\[%{NUMBER:pid}\])?
POSTFIX (?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:logsource} %{COMPID}:
# Milter
HELO (?:\[%{IP:helo}\]|%{HOST:helo}|%{DATA:helo})
MILTERCONNECT %{QUEUEID:qid}: milter-reject: CONNECT from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto}
MILTERUNKNOWN %{QUEUEID:qid}: milter-reject: UNKNOWN from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto}
@joe-speedboat
joe-speedboat / nginx.conf
Last active October 27, 2019 11:49 — forked from 6aditya8/nginx.conf
Nginx SSL/TLS configuration for getting "A+" in Qualys SSL Labs test
# forked from: https://gist.github.com/6aditya8/277ce867451922cfe9f41d93c5316850
# Configuration options are limited to SSL/TLS
# Enable SSL session caching for improving performance by avoiding the costly session negotiation process where possible
# SSL Labs doesn't assume that SNI is available to the client, so it only tests the default virtual server
# setting this globally to make it work across all the nginx virtual servers (including the default virtual server)
ssl_session_cache shared:ssl_session_cache:10m;
ssl_session_timeout 10m;
server {
@joe-speedboat
joe-speedboat / script-template.sh
Created December 18, 2020 06:56 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@joe-speedboat
joe-speedboat / guide.md
Created September 22, 2021 11:39 — forked from cclloyd/guide.md
Set up OPNSense with FreeIPA Authentication.

Using FreeIPA Authentication with OPNSense

Step 1

Go to your IPA admin page and create a new user named opnsense. Log in once on any computer joined to the FreeIPA realm and set their password (since the one you provide upon account creation will be expired), then logout.

Step 2

@joe-speedboat
joe-speedboat / open-source-sso.md
Created October 8, 2021 05:07 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
@joe-speedboat
joe-speedboat / nginx.conf
Created March 18, 2022 05:29 — forked from jhazelwo-charter/nginx.conf
NGINX FreeIPA authentication
worker_processes 4;
pid /app/run/nginx.pid;
error_log /app/log/error.log;
events {
worker_connections 768;
}
http {