Skip to content

Instantly share code, notes, and snippets.

@BrianKopp
BrianKopp / User.rs
Created June 7, 2020 13:50
Rust User Model
struct User {
id: Option<String>,
first_name: String,
last_name: String,
}
@BrianKopp
BrianKopp / Cargo_add_rusoto.toml
Last active June 7, 2020 13:14
Rust Dynamo Rusoto
[dependencies]
rusoto_core = "0.44.0"
rusoto_dynamodb = "0.44.0"
@BrianKopp
BrianKopp / An Example Prometheus Operator Values.md
Last active October 14, 2019 15:35
Prometheus-Operator setup

Example Prometheus Operator Values.yaml

@BrianKopp
BrianKopp / A k8s custom external metrics gist.md
Last active August 5, 2019 03:05
Explains how to scale k8s deployment based on custom external metric

Kubernetes External Metric

This gist contains files used to scale a kubernetes deployment based on some other arbitrary/external metric.

@BrianKopp
BrianKopp / A k8s custom metrics gist.md
Last active August 4, 2019 20:51
Kubernetes Connection Count Custom Metrics

K8s Custom Metrics

These files accompany a set of blog posts describing kubernetes custom metrics.

@BrianKopp
BrianKopp / main-read-file-contents.rs
Last active June 16, 2019 20:51
Rust CLI to read file and print word count
use std::env;
use std::fs;
use std::process;
use std::io;
fn main() {
let args: Vec<String> = env::args().collect();
let file_name = &args[1];
let file_content_result = fs::read_to_string(file_name);
@BrianKopp
BrianKopp / nginx-config.yaml
Created June 13, 2019 21:05
Kubernetes nginx DaemonSet basic config
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nginx
labels:
app: nginx
spec:
selector:
matchLabels:
app: nginx
@BrianKopp
BrianKopp / first-deploy.yaml
Created June 13, 2019 20:53
Basic Kubernetes hello world deployment and service
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
labels:
app: hello-world-app
spec:
replicas: 1
selector:
matchLabels: