Skip to content

Instantly share code, notes, and snippets.

View asikkema's full-sized avatar

Albert Sikkema asikkema

View GitHub Profile

Keybase proof

I hereby claim:

  • I am asikkema on github.
  • I am asikkema (https://keybase.io/asikkema) on keybase.
  • I have a public key whose fingerprint is 530D D9A0 3B0A 4C9C 76BD 6B7F BFB3 243A 932E A661

To claim this, I am signing this object:

@asikkema
asikkema / policy_template.json
Created May 19, 2016 13:41
aws s3 bucket policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::bucketname/*",
{
"Comment": "A new record set for the zone.",
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "bucketname.",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "Z1BKCTXD74EZPE",
@asikkema
asikkema / deploy_feature.sh
Created May 19, 2016 13:37
Deploy feature branch to AWS S3 in newly created bucket with website hosting permissions
#!/bin/bash
# codeship exposes the current git branch in $CI_BRANCH. If not available use git to find it.
# codeship specific, not required.
branch=$CI_BRANCH
if [ -z "$CI_BRANCH" ]; then
echo "NO CI_BRANCH env, getting from git."
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
fi