Skip to content

Instantly share code, notes, and snippets.

@mattbryson
mattbryson / AWS_IAM_EB_POLICY.md
Last active September 15, 2017 11:29
AWS IAM Policy to Automate Deployments to Elastic Beanstalk

An IAM Policy to Automate Deployments to Elastic Beanstalk

Recently our automated deployments to EB started failing as AWS had changed the IAM policy requirements. After having updated the policy, I thought it might be useful to share the set up.

We use CodeShip as our CI/CD server and this is the IAM policy required to allow it to deploy to EB.

This policy sets the minimum requirements that will allow an IAM account to successfully deploy an EB app.

@mattbryson
mattbryson / recover_ready_nas.sh
Last active December 24, 2023 23:34
Recover Data from ReadyNas Duo hard drives
# Recover Data from ReadyNas Duo RAID 1 drives
#
# DISCLAIMER : This could corrupt all your data - if you are at all worried get a professional to recover the data for you
#
# The tools mentioned below have the ability to corrupt and wipe all your data
#
# #### USE AT YOUR OWN RISK ####
#
# With that out the way....
#
@mattbryson
mattbryson / vue.config.js
Created March 31, 2022 17:01
Patch to get vue-cli-plugin-i18n working in a mono repo
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
module.exports = defineConfig({
chainWebpack: (config) => {
// Fix vue-cli-plugin-i18n broken path to the locales folder in a mono repo
config.module
.rule('i18n-resource')
.include.clear().add(path.resolve(__dirname, 'src/locales'));
@mattbryson
mattbryson / vue.config.js
Created March 31, 2022 17:39
Configuring web pack for the vue i18n package in a Vue CLI 5 project (vue 3) without the i18n plugin
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
module.exports = defineConfig({
chainWebpack: (config) => {
// Manually configure webpack for vue i18n without using the vue-cli-plugin-i18n as it doesnt fully work in vue 3
// dont forget to install `vue-i18n@9` and `@intlify/vue-i18n-loader`
@mattbryson
mattbryson / makefile
Last active November 2, 2022 21:21
SAM Lambda Function make file to support node_modules in Layers
##
# Custom SAM Build function to support ES modules in Lambda Layers
#
# SAM deploy does not support symlinks in Lambda Functions, it tries to follow them at deploy time
# This means you cant build a function with a symlink to the node_modules of a layer - which you need to do to support ES modules
# @see https://github.com/vibe/aws-esm-modules-layer-support
#
# This works by packaging the function code as SAM does using `npm pack`, but then we insert a symlink to the layers node_modules
# And then create a zip *including* the symlink to the layer.
#