Skip to content

Instantly share code, notes, and snippets.

View slash-cyberpunk's full-sized avatar

Vladislav Shishkov slash-cyberpunk

View GitHub Profile
@slash-cyberpunk
slash-cyberpunk / statsd_mapping.conf
Last active July 18, 2022 10:12
Config for stasd_exporter v0.22.7 and airflow 2.3.3
mappings:
- match: "airflow.dag_processing.last_duration.*"
help: "Milliseconds taken to load the given DAG file"
observer_type: summary
name: "airflow_dag_processing_last_duration"
labels:
dag_file: "$1"
- match: "airflow.dagrun.duration.*.*"
help: "Milliseconds taken for a DagRun to reach 'type' state"
observer_type: summary
@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active April 22, 2024 11:24
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@kekru
kekru / 1-Enable Docker Remote API with TLS client verification.md
Last active January 11, 2024 18:21
Docker Remote API with client verification via daemon.json

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@jrbing
jrbing / ansible_jq_example.sh
Created October 16, 2017 20:58
Examples of using the Ansible setup module with jq
# List all keys
ansible -m setup hostname | sed '1 s/^.*$/{/' | jq '.ansible_facts | keys'
# Get the contents of a specific key
ansible -m setup hostname | sed '1 s/^.*$/{/' | jq '.ansible_facts.ansible_default_ipv4'
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2024 16:53
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'