This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# open-prs.sh | |
__gh=/opt/homebrew/bin/gh | |
__jq=/opt/homebrew/bin/jq | |
while IFS= read -r -d '' dir | |
do | |
dir=$(dirname "$dir") | |
cd "$dir" || continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BUCKET=abc/def | |
REGION=us-east-1 | |
PROFILE=my_profile | |
for key in "vault-root" "vault-unseal-0" "vault-unseal-1" "vault-unseal-2" "vault-unseal-3" "vault-unseal-4" | |
do | |
aws s3 cp s3://${BUCKET}/${key} . --profile "$PROFILE" --region "$REGION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Make a copy of your existing config | |
cp ~/.kube/config ~/.kube/config.bak | |
# Merge the two config files together into a new config file | |
KUBECONFIG=~/.kube/config:/path/to/new/config kubectl config view --flatten > /tmp/config | |
# TEST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
//// inspired by Stephen Toub's https://devblogs.microsoft.com/pfxteam/asynclazyt/ | |
/// <summary> | |
/// Provides support for async lazy initialization. | |
/// </summary> | |
/// <typeparam name="T">Specifies the type of element being lazily initialized.</typeparam> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using NATS.Client; | |
namespace Microsoft.Extensions.DependencyInjection | |
{ | |
/// <summary> | |
/// Provides extension methods for NATS registration with ASP.Net Core DI | |
/// </summary> | |
public static class NatsServiceCollectionExtensions |