Skip to content

Instantly share code, notes, and snippets.

View armenr's full-sized avatar

Armen Rostamian armenr

View GitHub Profile
@armenr
armenr / post-checkout.sh
Created March 16, 2021 20:50
Amplitude_SwitchEnv
#! /bin/bash
set -e
## Step Zero
## Checks to see if we've checked out to a newly-created branch & if we have, auto-commits an empty "first" commit
##
## Rationale: Due to the way Git maintains refs to hashes for HEAD (even when moving between branches of different names)
## we need to first always add a default/empty commit on new branch checkout. It's also nice because it orients you.
##
## Don't believe me?
@armenr
armenr / SetupTriggerLambda_index.js
Created April 23, 2021 15:47
amplify-video category stuff
/* eslint-disable */
const AWS = require('aws-sdk')
/* eslint-enable */
const s3 = new AWS.S3({})
/* eslint-disable */
exports.handler = function(event, context) {
/* eslint-enable */
const config = event.ResourceProperties
@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
@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 / 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 / .01-README.md
Last active August 13, 2024 12:25
CORRECTLY setting up VSCode + TypeScript + VueJS 3 + EsLint + Prettier

To be completed...

@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 / 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 / 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

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