Skip to content

Instantly share code, notes, and snippets.

@archisgore
archisgore / aws-cdk-s3-notification-from-existing-bucket.ts
Last active Jun 17, 2021
AWS CDK add notification from existing S3 bucket to SQS queue
View aws-cdk-s3-notification-from-existing-bucket.ts
import * as cr from '@aws-cdk/custom-resources';
import * as logs from '@aws-cdk/aws-logs';
import * as s3 from '@aws-cdk/aws-s3';
import * as sqs from '@aws-cdk/aws-sqs';
import * as iam from '@aws-cdk/aws-iam';
import {Construct} from '@aws-cdk/core';
// You can drop this construct anywhere, and in your stack, invoke it like this:
// const s3ToSQSNotification = new S3NotificationToSQSCustomResource(this, 's3ToSQSNotification', existingBucket, queue);
@johanneswuerbach
johanneswuerbach / rails-vagrant-provision.sh
Last active Jun 29, 2020
Provision a vagrant box with ruby stable (using rvm), postgres, redis and node (using nvm)
View rails-vagrant-provision.sh
#!/usr/bin/env bash
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8
sudo apt-get update
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev
# postgres
@dstroot
dstroot / install_postgresql.sh
Created Jun 13, 2012
Install PostgreSQL on Amazon AMI
View install_postgresql.sh
#!/bin/bash
###############################################
# To use:
# https://raw.github.com/gist/2776351/???
# chmod 777 install_postgresql.sh
# ./install_postgresql.sh
###############################################
echo "*****************************************"
echo " Installing PostgreSQL"
echo "*****************************************"