Skip to content

Instantly share code, notes, and snippets.

View anveo's full-sized avatar
🤘

Brian Racer anveo

🤘
View GitHub Profile

Sends Cloudwatch Event notifications to Slack

What is this?

AWS have released a new featue called CloudWatch Events, which lets you configure events fired by cloudwatch and direct them to SNS, Lambda functions, etc. Here's the blog post

Motivational image:

Here's the motivational image:

Slack image

@anveo
anveo / rw_ro_access.sql
Created November 26, 2018 18:13 — forked from checco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;
@anveo
anveo / vagrant-port-forwarding.md
Created June 2, 2016 19:00 — forked from karlhorky/vagrant-port-forwarding.md
Vagrant Port Forwarding on OS X Yosemite

Vagrant Port Forwarding (8080 -> 80, 8443 -> 443) with pf on OSX Mavericks/Yosemite

This guide is a fork from this gist.

Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

1. Create the anchor file

Create an anchor file under /etc/pf.anchors/com.vagrant with your redirection rule like:

rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
@anveo
anveo / gist:7309977
Last active December 27, 2015 10:19 — forked from ivanvanderbyl/gist:4222308
Upgrade postgresql 9.2 to 9.3
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3
sudo su -l postgres
psql -d template1 -p 5433
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
service postgresql stop
/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.2/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.2/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.2/main/postgresql.conf"
@anveo
anveo / gist:639702
Created October 22, 2010 00:46 — forked from salbito/gist:639680
def new
@survey = Survey.find params[:survey_id]
@questions = @survey.questions(:include => :answers).map{|q| q.answers.build}
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @answer }
end
end