Skip to content

Instantly share code, notes, and snippets.

@robotadam
robotadam / gunicorn_config.py
Created December 5, 2022 18:13
Gunicorn saturation monitoring
"""gunicorn configuration file to export server metrics
To launch add `-c webapp/gunicorn_config.py` to the gunicorn command line.
Requires statsd to be configured for gunicorn as well, e.g.
`ENV STATSD_HOST=statsd-exporter:9125`
"""
# Python imports
import ctypes
@xandout
xandout / README.md
Last active October 17, 2024 07:54
Kubernetes DaemonSet that enables a direct shell on each Node using SSH to localhost

Getting a shell on each node

I run several K8S cluster on EKS and by default do not setup inbound SSH to the nodes. Sometimes I need to get into each node to check things or run a one-off tool.

Rather than update my terraform, rebuild the launch templates and redeploy brand new nodes, I decided to use kubernetes to access each node directly.

Alternative option

https://github.com/alexei-led/nsenter

@gabrielfsousa
gabrielfsousa / ckaexamprep.md
Last active March 11, 2023 06:59
CKA exam preparation

Preparation for CKA with Kubernetes version 1.17.1 on REDHAT 8

What i need to know for the exam ? 🏁

% Domain
08% Application Lifecycle Management
12% Installation, Configuration & Validation
19% Core Concepts
11% Networking
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@sundowndev
sundowndev / GoogleDorking.md
Last active November 3, 2025 03:27
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@lizrice
lizrice / hello_map.py
Last active July 19, 2023 08:20
eBPF hello world
#!/usr/bin/python
from bcc import BPF
from time import sleep
# This outputs a count of how many times the clone and execve syscalls have been made
# showing the use of an eBPF map (called syscall).
program = """
BPF_HASH(syscall);
@jtpaasch
jtpaasch / Assembly_cheat_sheet.md
Created April 1, 2019 12:34
Quick reminder of all the little things I forget.
@veggiemonk
veggiemonk / CKAD.md
Last active October 16, 2025 12:15
CKAD exam preparation
@douglasmiranda
douglasmiranda / ansible.md
Last active November 1, 2024 20:40
Ansible: Notes, Errors and Solutions

Ansible for Configuration Management

I'm using Ansible only for Configuration Management, the server is up and I want to configure users, install packages and configure them.

For infrastructure provisioning terraform.io is nice!

Currently, my deployment flow includes Drone.io/GitlabCI for CI/CD and Docker Swarm for orchestrating containers.