Skip to content

Instantly share code, notes, and snippets.

View bjorg's full-sized avatar

Steve Bjorg bjorg

  • San Diego, CA
View GitHub Profile
@bjorg
bjorg / websockets-cloudformation.json
Created June 18, 2020 18:26
CloudFormation JSON for API Gateway WebSocket
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"Secrets": {
"Type": "String",
"Description": "Secret Keys (ARNs)",
"Default": ""
},
"XRayTracing": {
"Type": "String",
@bjorg
bjorg / template-websocket.yml
Created July 7, 2020 16:34
I think I'm running into a CloudFormation bug with AWS::ApiGatewayV2::Stage RouteSettings. The following template fails with this error message when RouteSettings is included, otherwise it succeeds. Am I doing it wrong?
AWSTemplateFormatVersion: '2010-09-09'
Resources:
ModuleWebSocketStage:
Type: AWS::ApiGatewayV2::Stage
Properties:
ApiId: !Ref ModuleWebSocket
StageName: LATEST
DeploymentId: !Ref ModuleWebSocketDeployment7DE845992A5611C1BEBFBCD7A01DB8B8
@bjorg
bjorg / ArgumentAssertException.cs
Last active February 15, 2022 00:08
ArgumentAssertException Utility class to validate arguments
namespace System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
public class ArgumentAssertException : ArgumentException {
//--- Class Methods ---
public static void Assert(
[DoesNotReturnIf(false)] bool expression,
@bjorg
bjorg / pull-all.sh
Created May 13, 2024 18:01
Script for running 'git pull' in every folder
#!/bin/bash
# Default to the current directory if no directory is provided
REPO_DIR="${1:-.}"
# Check if the directory exists
if [ ! -d "$REPO_DIR" ]; then
echo "Directory does not exist: $REPO_DIR"
exit 1
fi