Skip to content

Instantly share code, notes, and snippets.

View rnaveiras's full-sized avatar

Raúl Naveiras rnaveiras

  • London, United Kingdom
  • 10:22 (UTC +01:00)
View GitHub Profile
# Default policies — the single, environment-independent source of truth.
#
# Controls are referenced by framework handle (the keys under `controls:` in
# seeds/_references.yaml); tags by their (type, tag) natural key, which is unique
# by the DB index type_tag_idx on tag(type, tag).
#
# Requirement forms:
# - a-3 required, no threshold -> {required: true, requiredValue: 0}
# - f-20: 6 threshold -> {required: true, requiredValue: 6}
# - e-13: {bare: true} no requiredValue key -> {required: true}
# editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
command_timeout = 200
# Main format matching Oh My Posh zen layout
# Left side: directory, git branch, git status
# Right side: execution time
# LOCAL ONLY - gitignored (.gitignore:15). Points every app service at a
# restored RDS snapshot over the bastion SSH tunnel instead of postgres-dev.
#
# Start with (auto-discovery picks this file up):
#
# mise run sso:credentials && docker compose up --build
#
# NOT `mise run start` — it passes `-f compose.yaml`, which disables
# auto-discovery and silently ignores this file.
#
# editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
command_timeout = 200
# Main format matching Oh My Posh zen layout
# Left side: directory, git branch, git status
# Right side: execution time
/*
Script to publish EmergingThreatPublished events to the events SNS topic.
This script is designed to manually trigger an EmergingThreatPublished event,
which will cause downstream subscribers (e.g., notification services) to process
the event as if the threat had just been published through the normal flow.
Required:
For non-local environments, you must have AWS credentials configured
@rnaveiras
rnaveiras / monzo-alertmanager-config.yaml
Created August 13, 2019 15:30 — forked from milesbxf/monzo-alertmanager-config.yaml
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)
##

Keybase proof

I hereby claim:

  • I am rnaveiras on github.
  • I am rnaveiras (https://keybase.io/rnaveiras) on keybase.
  • I have a public key ASA87mNTRBuWRgmAjmZ26fNJHPxUI0i-d0wLbpGdMYUEvAo

To claim this, I am signing this object:

@rnaveiras
rnaveiras / Makefile
Last active August 2, 2018 14:56 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
require 'aws-sdk'
AWS.config(:credential_provider => AWS::Core::CredentialProviders::SharedCredentialFileProvider.new)
aws = AWS.regions['eu-west-1']
lc = aws.auto_scaling.launch_configurations
launch_config = lc.create('staging-loadbalancer', 'ami-XXXXX', 'm1.small', {
detailed_instance_monitoring: true,
#!/usr/bin/python
# largely taken from python examples
# http://docs.python.org/library/email-examples.html
import os
import sys
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart