Skip to content

Instantly share code, notes, and snippets.

View ryan-blunden's full-sized avatar

Ryan Blunden ryan-blunden

  • Brisbane, Australia
View GitHub Profile
@ryan-blunden
ryan-blunden / discord-openapi.yaml
Created October 27, 2024 23:49
sample-discord-openapi.yaml
openapi: "3.1.0"
info:
title: "Discord HTTP API (Preview)"
description: "Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details."
termsOfService: "https://discord.com/developers/docs/policies-and-agreements/developer-terms-of-service"
license:
name: "MIT"
identifier: "MIT"
version: "10"
externalDocs:
@ryan-blunden
ryan-blunden / pybites-intro.py
Created November 30, 2021 11:58
Pybites commuity intro message fun
from dataclasses import dataclass
import random
pybites_init_questions = [
'If you were to build a chatbot what would it do'
]
@dataclass
class PybitesIntro:
@ryan-blunden
ryan-blunden / doppler-pem-test.sh
Last active September 13, 2021 12:26
Doppler PEM Test Alpine
#!/usr/bin/env sh
apk add --update openssl
echo '\n[info]: Verify private key by extracting public key\n'
openssl rsa -in ./secrets/tls.key -pubout
tail -f /dev/null # Pretend to be a long-running process
@ryan-blunden
ryan-blunden / gist:4f37dad2e46face5a0f03c1e1e1fe436
Created August 12, 2021 04:11
mandalorion-gifs-secrets-template.yaml
projects:
- name: mandaloriongifs-python
description: Mandalorion GIFS generator using the Flask framework
environments:
- slug: dev
name: Development
configs:
- slug: dev
secrets:
dev:
@ryan-blunden
ryan-blunden / secrets_getsecretvalue.js
Created July 22, 2021 07:39
The secrets_getsecretvalue.js file demonstrates how to retrieve a secret from AWS Secrets Manager.
/**
* From https://docs.aws.amazon.com/code-samples/latest/catalog/javascript-secrets-secrets_getsecretvalue.js.html
*
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* This file is licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License. A copy of
* the License is located at
*
* http://aws.amazon.com/apache2.0/
@ryan-blunden
ryan-blunden / README.md
Created July 9, 2021 08:50
Doppler Cloudflare Pages Secrets Sync

Doppler Cloudflare Pages Secrets Sync Script

NOTE: This script is a work in progress

Bash script to sync secrets from Doppler to Cloudflare Pages using the Pages Update Project API.

Usage

The following enviroment variables must be set or else you will be prompted when running the script:

@ryan-blunden
ryan-blunden / config.py
Created May 7, 2021 11:48
Python class for App Configuration
import os
from typing import get_type_hints, Union
from dotenv import load_dotenv
load_dotenv()
class AppConfigError(Exception):
pass
def _parse_bool(val: Union[str, bool]) -> bool: # pylint: disable=E1136
@ryan-blunden
ryan-blunden / carbon-config.json
Created April 26, 2021 10:45
carbon-config.json
{
"paddingVertical": "0px",
"paddingHorizontal": "0px",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"backgroundColor": "rgba(255,255,255,1)",
"dropShadow": false,
"dropShadowOffsetY": "0px",
"dropShadowBlurRadius": "85px",
@ryan-blunden
ryan-blunden / create_doppler_service_token.sh
Created April 16, 2021 01:20
Crate a Doppler Service Token from the Command Line
#!/usr/bin/env bash
# Requires a CLI token
DOPPLER_TOKEN="$(doppler configure get token --plain)" \
DOPPLER_PROJECT="$(doppler configure get project --plain)" \
DOPPLER_CONFIG="$(doppler configure get config --plain)" \
\
SERVICE_TOKEN=$(curl -sS --request POST \
--url https://api.doppler.com/v3/configs/config/tokens \
@ryan-blunden
ryan-blunden / .gitignore
Last active April 12, 2021 07:13
AWS SAM template automated embedding of environment variables using the Doppler CLI
template-deployment.yaml