Skip to content

Instantly share code, notes, and snippets.

View BrutalSimplicity's full-sized avatar
💭
Simplicity is hard

Kory Taborn BrutalSimplicity

💭
Simplicity is hard
View GitHub Profile
@BrutalSimplicity
BrutalSimplicity / config
Created May 9, 2023 23:38 — forked from justinpawela/config
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region

CUE for DevOps

Overview

This is a tutorial that uses a toy infrastructure project to highlight some of CUE's features and show how it can be used to simplify and manage infrastructure. Go to Tutorial if you want to skip the introductory stuff.

What is CUE?

From cuelang.org:

@BrutalSimplicity
BrutalSimplicity / GNU-Make.md
Created December 26, 2022 17:44 — forked from rueycheng/GNU-Make.md
GNU Make cheatsheet
@BrutalSimplicity
BrutalSimplicity / Dockerfile
Created September 1, 2022 20:20
Dockerfile with asdf + docker install bits
FROM debian:latest
# Install basic dev packages
RUN apt-get clean && apt-get update && apt-get -y install --no-install-recommends \
apt-utils \
openssh-client \
git \
gnupg2 \
dirmngr \
iproute2 \
@BrutalSimplicity
BrutalSimplicity / delete_endpoint.py
Created August 19, 2022 21:03
hook/test example
import boto3
def hook(config_file, **kwargs):
events = boto3.client('events')
delete_endpoint(events, config_file, kwargs)
def delete_endpoint(, config_file, **kwargs):
# move work here
...
@BrutalSimplicity
BrutalSimplicity / example.ts
Created March 9, 2022 16:15
Request every data point for all customers
const query: Query = {
select: properties,
where: {
match: { and: { type: createIriValue('abound', 'Customer'), name: 'Abound Dev Customer' } },
},
relation: 'owns',
sites: {
select: spaceProps,
where: { match: { and: { type: createIriValue('brick', 'Site') } } },
relation: 'hasPart',
@BrutalSimplicity
BrutalSimplicity / test.ts
Created February 25, 2022 23:07
SPARQL DSL Typescript Test
it('should build relationship query with node traversals', () => {
const query: Query = {
select: ['id', 'name'],
where: {
match: {
and: {
id: ['45a4d510-adb8-41d1-a34e-557ed6b88309', 'ed79b15e-f60b-4cc6-877b-c653606e68a3'],
},
},
},
@BrutalSimplicity
BrutalSimplicity / example.ts
Created February 25, 2022 23:02
Sparql Typescript DSL Example
it('should perform multi-path traversal query with criteria at multiple levels', async () => {
const actual = await query.executeQuery({
select: ['id', 'name'],
where: {
match: { and: { type: createIriValue('abound', 'Customer'), id: 'bb27d6a5-091b-4763-9246-0d9e963fd7f8' } },
},
relation: 'owns',
buildings: {
select: ['id', 'name'],
floors: [
@BrutalSimplicity
BrutalSimplicity / cloudformation.yml
Created February 16, 2022 17:48
Neptune Bastion Host Setup
AWSTemplateFormatVersion: 2010-09-09
Description: Neptune Bastion Host for Developers
Parameters:
pEnvironment:
Type: String
pPrefix:
Type: String
pVpc:
Type: String
pServiceName:
@BrutalSimplicity
BrutalSimplicity / Subfolder to git repo.md
Created August 13, 2021 04:06 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule