Skip to content

Instantly share code, notes, and snippets.

@g3rhard
g3rhard / docker-compose.yml
Created July 31, 2019 05:55 — forked from brunosimioni/docker-compose.yml
Docker Compose to Prometheus, PushGateway and Grafana setup
version: '2.1'
networks:
monitor-net:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
@g3rhard
g3rhard / docker-compose.yaml
Created July 10, 2019 06:01
docker-compose for ipsec vpn + pihole + telegram proxy
version: '2'
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
volumes:
- /etc/localtime:/etc/localtime:ro
- /dev/rtc:/dev/rtc:ro
dns:
# hiera
uptream:
'abc_core':
'ips':
- '1.2.3.4'
- '1.2.3.5'
'port': 8080
'abc_cp_core':
'ips':
- '1.2.3.4'
@g3rhard
g3rhard / php-pools.md
Created June 5, 2019 09:00 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@g3rhard
g3rhard / Brewfile
Last active November 27, 2024 14:00
tap "armosec/kubescape"
tap "danvergara/tools"
tap "env0/terratag"
tap "fluxcd/tap"
tap "github/gh"
tap "go-task/tap"
tap "goodwithtech/r"
tap "hashicorp/tap"
tap "helm/tap"
tap "homebrew/bundle"
@g3rhard
g3rhard / playlist.m3u
Last active November 29, 2023 00:16
Create playlist file or list streams for radiorecord.ru stations
#EXTM3U
#PLAYLIST:Playlist Name
#EXTINF:-1,1970
http://air.radiorecord.ru:805/1970_64
#EXTINF:-1,1980
http://air.radiorecord.ru:805/1980_64
#EXTINF:-1,2step
http://air.radiorecord.ru:805/2step_64
#EXTINF:-1,ansh
http://air.radiorecord.ru:805/ansh_64
@g3rhard
g3rhard / README
Created November 20, 2018 09:01 — forked from alexshpilkin/README
Convert the RKN list to a Mikrotik firewall address list
Download the RKN list from https://github.com/zapret-info/z-i, massage it into
a Mikrotik script that manages a firewall address list, and put it up on a web
server. Note well that the list is gigantic---more than 80,000 entries as of
2018-04-28---so be sure to check if your router can handle it in advance (for
example, hAP Lite, with its measly 32M of memory, can’t).
On the router side, do something like
/tool fetch url="https://sheaf.site/rkn.rsc" dst-path=rkn.rsc
:import rkn.src
@g3rhard
g3rhard / new_relic_alert.sh
Created August 29, 2018 11:20 — forked from lichti/new_relic_alert.sh
Script to enable or disable newrelic alerts
#!/bin/bash
if [ ! -x /usr/bin/curl ]; then
echo "Please install curl"
exit 1
fi
if [ ! -x /usr/bin/jq ]; then
echo "Please install jq"
exit 1
@g3rhard
g3rhard / r53export.sh
Created August 27, 2018 11:24 — forked from ramsey/r53export.sh
Queries AWS Route53 for a zone name and outputs a zone file of its records
#!/bin/bash
#
# Queries AWS Route53 for a zone name and outputs a zone file of its records
#
# Usage:
#
# r53export example.com[ profile]
#
# By default, uses $AWS_PROFILE environment variable, if set.
#
@g3rhard
g3rhard / get-zone.sh
Created August 27, 2018 11:24 — forked from tibu/get-zone.sh
Download zone file in bind format from AWS Route53
#!/bin/bash
# download zone from AWS Route53
zonename=$1
hostedzoneid=$(aws route53 list-hosted-zones | jq -r ".HostedZones[] | select(.Name == \"$zonename.\") | .Id" | cut -d'/' -f3)
aws route53 list-resource-record-sets --hosted-zone-id $hostedzoneid --output json | jq -jr '.ResourceRecordSets[] | "\(.Name) \t\(.TTL) \t\(.Type) \t\(.ResourceRecords[].Value)\n"'