Skip to content

Instantly share code, notes, and snippets.

View Rud5G's full-sized avatar
🏡
Working remotely

Rudger Rud5G

🏡
Working remotely
View GitHub Profile
@Rud5G
Rud5G / manually-remove-resource-from-amplify-project.md
Created February 28, 2023 14:53 — forked from josefaidt/manually-remove-resource-from-amplify-project.md
Instructions for surgically removing non-existent resource from local Amplify project

Let's say we've removed a Lambda Layer from the Lambda Console and are no longer able to perform operations using the Amplify CLI.

An error occurred fetching the latest layer version metadata for ""

> amplify remove function
? Choose the resource you would want to remove 10263layer58c94806 (layer)
When you delete a layer version, you can no longer configure functions to use it.
However, any function that already uses the layer version continues to have access to it.
✖ Loading layer data from the cloud...
#!/usr/bin/env node
const { existsSync: exists, promises: fs } = require('fs');
const { spawn } = require('child_process');
const path = require('path');
const c = require('chalk');
const dotenv = require('dotenv');
const nodemon = require('nodemon');
// set default node_env
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
@Rud5G
Rud5G / post-checkout
Created February 28, 2023 14:51 — forked from josefaidt/post-checkout
Git post-checkout hook to change AWS Amplify environments upon branch checkout
#!/bin/bash
# .git/hooks/post-checkout
# Utility to change AWS Amplify environments on branch checkout
# helper to get path to aws-exports.js
function get_aws_exports_path {
local AMPLIFY_PROJECT_CONFIG_PATH="amplify/.config/project-config.json"
local AMPLIFY_EXPORTS_PATH=$(jq -r '.javascript.config.SourceDir' $AMPLIFY_PROJECT_CONFIG_PATH)
if [[ "$AMPLIFY_EXPORTS_PATH" == */ ]]
const fn = new lambda.NodejsFunction(this, 'MyFunction', {
entry: fileURLToPath(new URL('./handler.ts', import.meta.url)),
functionName: `my-function`,
bundling: {
minify: true, // minify code, defaults to false
sourceMap: true, // include source map, defaults to false
sourceMapMode: lambda.SourceMapMode.INLINE, // defaults to SourceMapMode.DEFAULT
target: 'esnext',
define: {
'import.meta.vitest': 'undefined',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
spinazie
boerenkool
pompoen, avocado, sla, broccoli, bloemkool, courgette, aubergine, wortels, spruitjes, radijs, zoete aardappel, tomaat en venkel
kip, kalkoen, rundvlees, lam, varkensvlees, zalm, makreel, kabeljauw, mosselen, garnalen, krab, sardientjes
volkorenmeel, brijne rijst, volkorenpasta, quinoa, gierst, volkoren spelt, volkoren gerst, havermout, teff en boekweit
amandelen, walnoten, cashewnoten, pecannoten, pinda’s, paranoten, sesamzaad, pompoenpitten, zonnebloempitten en macademia’s.
@Rud5G
Rud5G / Suiker Varianten
Created August 22, 2022 08:49
C12H22O11
Ahornsiroop
Appelsapconcentraat
Appelstroop
Basterdsuiker
Bruine basterdsuiker
Bruine kandijsuiker
Bruine rietsuiker
Bruine suiker
Dextrose
Druivensapconcentraat
@Rud5G
Rud5G / IAMCredentials.json
Last active July 24, 2022 19:07 — forked from ServerlessBot/IAMCredentials.json
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
#!/bin/bash
set -eu
# see: https://gist.github.com/Rud5G/71058242650001f6a5e4eeb4003daaa3
if ! test -f "$(pwd)/bin/magento";
then
echo "Usage $0"
echo ""