Skip to content

Instantly share code, notes, and snippets.

Avatar

Miguel Afonso mafonso

View GitHub Profile
View docker-compose.yml
version: '2.2'
services:
apm-server:
image: docker.elastic.co/apm/apm-server:7.10.1
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
@mafonso
mafonso / docker-compose.yml
Created Jan 9, 2021
Metrics Dashboard Stack
View docker-compose.yml
version: "2"
services:
grafana:
image: grafana/grafana
container_name: grafana
restart: always
ports:
- 3000:3000
links:
- influxdb
View docker-compose.yml
version: '2.2'
services:
apm-server:
image: docker.elastic.co/apm/apm-server:7.7.1
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
View preseed.cfg
#### Contents of the preconfiguration file (for xenial)
### Localization
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string uk
d-i keyboard-configuration/layout select English (UK)
d-i keyboard-configuration/variant select English (UK)
d-i keyboard-configuration/xkb-keymap select uk
d-i keyboard-configuration/modelcode string pc105
d-i netcfg/choose_interface select auto
@mafonso
mafonso / ssl frontend
Created Jun 18, 2018
HAProxy examples
View ssl frontend
frontend app1_ssl
bind *:443 ssl crt /etc/haproxy/certs.d/example.com.crt crt /etc/haproxy/certs.d/ no-sslv3
option http-server-close
option forwardfor
reqadd X-Forwarded-Proto:\ https
reqadd X-Forwarded-Port:\ 443
# set HTTP Strict Transport Security (HTST) header
rspadd Strict-Transport-Security:\ max-age=15768000
@mafonso
mafonso / Gziped serde
Created Jun 15, 2018
ALB Logs Athena
View Gziped serde
CREATE EXTERNAL TABLE IF NOT EXISTS alb_logs (
type string,
time string,
elb string,
client_ip string,
client_port int,
target_ip string,
target_port int,
request_processing_time double,
target_processing_time double,
View terraform-error.txt
Error applying plan:
1 error(s) occurred:
* module.postgres.aws_db_instance.instance: aws_db_instance.instance: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.
Please include the following information in your report:
Terraform Version: 0.9.2
Resource ID: aws_db_instance.instance
View gist:43a9ebdd78c2975c05790f4d9f249c23
On Vault:
$ vault auth-enable aws-ec2
Successfully enabled 'aws-ec2' at 'aws-ec2'!
View consul-template-debug.txt
2016/12/06 14:31:58.477298 [INFO] consul-template v0.16.0
2016/12/06 14:31:58.477321 [INFO] (runner) creating new runner (dry: false, once: false)
2016/12/06 14:31:58.477615 [DEBUG] (runner) final config (tokens suppressed):
{
"Path": "/usr/local/consul-template/config/nginx.hcl",
"Consul": "172.17.0.1:8500",
"Token": "",
"ReloadSignal": 1,
"DumpSignal": 3,
View keybase.md

Keybase proof

I hereby claim:

  • I am mafonso on github.
  • I am mafonso (https://keybase.io/mafonso) on keybase.
  • I have a public key whose fingerprint is F54B 0FC9 3669 51F1 8E73 27FD 9838 2820 11FD 662C

To claim this, I am signing this object:

You can’t perform that action at this time.