Skip to content

Instantly share code, notes, and snippets.

View rnaveiras's full-sized avatar

Raúl Naveiras rnaveiras

  • London, United Kingdom
  • 03:56 (UTC)
View GitHub Profile
/*
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
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"region": "eu-west-1",
"source_ami": "",
"version": "1.0.0",
"chef_server": ""
"validation_key": "",
"environment": "",
namespace :common do
task :restart, :roles => :web do
puts "Nooooo"
end
end
namespace :workers do
task :restart, :roles => :workers do
puts "nooooo"
end
@rnaveiras
rnaveiras / rollbar.rb
Last active August 29, 2015 14:05 — forked from brianr/rollbar.rb
# put all of this in config/initializers/rollbar.rb
# from http://hawkins.io/2013/08/using-the-ruby-logger/
class NullLogger < Logger
def initialize(*args)
end
def add(*args, &block)
end
end
{
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"Effect": "Allow",
"Resource": [