Skip to content

Instantly share code, notes, and snippets.

View armenr's full-sized avatar

Armen Rostamian armenr

View GitHub Profile
@armenr
armenr / ssh_key.tf
Created November 21, 2022 12:01 — forked from irvingpop/ssh_key.tf
Terraform external data source example - dynamic SSH key generation
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../ssh_key_generator.sh"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"
@armenr
armenr / install_k3s.sh
Created February 19, 2022 19:10
Testing Things - Don't mind me
#!/bin/sh
set -e
set -o noglob
# Usage:
# curl ... | ENV_VAR=... sh -
# or
# ENV_VAR=... ./install.sh
#
# Example:

Prerequisites

  • EKS Fargate profiles for <fargate-profile-namespace>. Guide
  • EKS Fargate coredns profile for coredns pods to run (create profile for kube-system namespace, refer guide from previous step)
  • EFS CSI Driver installed, mount points set and pv.yaml created. Refer Guide
  • EKS ALB Controller, refer Guide.

Install Helm

Refer Helm Installation to install helm command

@armenr
armenr / Readme.md
Last active December 1, 2021 04:20
A small, lightweight, m1-friendly, fully-portable (yay Docker) kubernetes setup & some goodies

Kube Productivity teengz

Kubernetes management

  • https://k8slens.dev/ -- LENS is like a full-blown IDE for Kubernetes. Hook up any of your kubectl contexts or files to it and you're off to the races!
  • https://octant.dev/ -- Octant is like Lens, but different. In some ways, better, albeit it feels slightly slower...but it's dope also!
  • https://k9scli.io/ -- Manage your kube clusters in style via one of the coolest, most-bad ass CLIs ever

Debugging/Observing

@armenr
armenr / schema.graphql
Last active August 30, 2021 21:15
datastore-warn
type Blog @model {
id: ID!
name: String!
posts: [Post] @connection(keyName: "byBlog", fields: ["id"])
}
type Post @model @key(name: "byBlog", fields: ["blogID"]) {
id: ID!
title: String!
blogID: ID!
@armenr
armenr / DeepOmit.d.ts
Created August 25, 2021 03:43 — forked from ahuggins-nhs/DeepOmit.d.ts
Deeply omit members of an interface or type
// Taken from https://stackoverflow.com/questions/55539387/deep-omit-with-typescript
/** Union of primitives to skip with deep omit utilities. */
type Primitive = string | Function | number | boolean | Symbol | undefined | null
/** Deeply omit members of an array of interface or array of type. */
export type DeepOmitArray<T extends any[], K> = {
[P in keyof T]: DeepOmit<T[P], K>
}
@armenr
armenr / .01-README.md
Last active August 13, 2024 12:25
CORRECTLY setting up VSCode + TypeScript + VueJS 3 + EsLint + Prettier

To be completed...

@armenr
armenr / Authwrapper.vue
Created August 2, 2021 19:43
auth-component formFields fix
<script setup lang="ts">
const isLoggedIn = false
const authFormFields = [
{
type: 'email',
required: true,
},
{
@armenr
armenr / README.md
Last active April 25, 2022 15:34
VideoJS + TypeScript + Vue3 (Quasar v2) Single-File Component
  1. install video.js - npm i [email protected]
  2. install video.js types (recently updated): npm i @types/video.js
  3. Check tsconfig.json --> "typeRoots" + "types" config properties matter!
@armenr
armenr / cdn-cloudformation-template.yml
Created May 20, 2021 18:24
CloudFormation Template for Amplify Custom Resource (S3 + CDN w/out hosting)
AWSTemplateFormatVersion: "2010-09-09"
# revisit this: https://github.com/aws-amplify/amplify-cli/issues/3240#issuecomment-623080190
Parameters:
env:
Type: String
Description: The environment name. e.g. Dev, Test, or Production.
Default: NONE
authRoleName:
Type: String
Description: Name of authRole