Skip to content

Instantly share code, notes, and snippets.

View kevinkarwaski's full-sized avatar

Kevin Karwaski kevinkarwaski

View GitHub Profile
---
AWSTemplateFormatVersion: '2010-09-09'
Description: My example codepipeline template
# ------------------------- #
# CloudFormation Parameters #
# ------------------------- #
Parameters:
@kevinkarwaski
kevinkarwaski / install-brew.sh
Last active September 13, 2023 21:34
Install Brew and set up for Standard OSX User
#!/usr/bin/env bash
# This script installs brew and chowns the right directories needed to run
# brew as a standard user. Your user should be the owner of /usr/local which
# gets set during the installation of brew. The global homebrew cache directory
# group should be set to 'staff' which is not set during a brew install. This
# script fixes that.
# To begin, you MUST execute this script with your user account while it has
# admin privileges. Once the script completes, you can change your
name: Terragrunt Plan All (dry run)
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@kevinkarwaski
kevinkarwaski / codebuild-buildspec-react-example.yml
Created September 26, 2019 13:55
Example CodeBuild buildspec file
version: 0.2
phases:
install:
runtime-versions:
nodejs: 10
commands:
- echo Installing app dependencies...
- yarn install
build:
AWSTemplateFormatVersion: "2010-09-09"
Description: My example codebuild template for pull requests
Parameters:
VPCStackName:
Type: AWS::SSM::Parameter::Value<String>
Default: /cloudformation/parameters/vpc/stackname
Description: The name of the parent VPC networking stack that you created. Necessary
to locate and reference resources created by that stack.
@kevinkarwaski
kevinkarwaski / multi_env_knife_config
Created February 18, 2012 19:06
Knife config for Multiple Chef Environments
#
# This is an example of a knife.rb configuration that uses yml and a
# simple env var (CHEF_ENV) to manage multiple hosted Chef environments.
#
# Example usage:
# export CHEF_ENV=evnironment_01
# knife status
#
# Based on: http://blog.blankpad.net/2010/09/28/multiple-knife-environments---the-return/
#
name: Apply/Increment Tag
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
name: Terragrunt Apply All (deploy)
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
name: Lint and Validate Terraform Code
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
AWSTemplateFormatVersion: '2010-09-09'
Description: Deploy a service on AWS Fargate, hosted in a private subnet.
Parameters:
ENV:
Description: Name of the environment
Type: AWS::SSM::Parameter::Value<String>
Default: /cloudformation/parameters/env