Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mkol5222
mkol5222 / get-aws-console-url.js
Created March 27, 2024 12:05 — forked from janaz/get-aws-console-url.js
Generate AWS console URL from the credentials stored in environment variables
/**
* This little program prints out the url to the AWS console
* generated from the local AWS credentials stored in environment variables:
* AWS_ACCESS_KEY_ID
* AWS_SECRET_ACCESS_KEY
* AWS_SESSION_TOKEN
*
* Steps:
* 1. Create a JSON object
* session = JSON.stringify({
multipass launch -n testvm -mem --cpu 1 --disk 5G --memory 2G 22.04 --cloud-init ~/.config/cloud-init.yml -v
ip_addr=$(multipass info testvm | awk '/IPv4/ {print $NF}')
ssh "ubuntu@${ip_addr}"
@mkol5222
mkol5222 / child-ingress.yaml
Created March 24, 2024 16:30 — forked from mgudesblatart/child-ingress.yaml
current configurations
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-{{ .Release.Name }}-frontend
namespace: {{ .Release.Name }}
annotations:
kubernetes.io/ingress.class: "nginx-3"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.ingress.kubernetes.io/auth-tls-secret: {{ .Release.Name }}/tls-secret
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1"
@mkol5222
mkol5222 / kind-with-ingress.md
Created March 24, 2024 16:29 — forked from AndersBennedsgaard/kind-with-ingress.md
Set up a Kind cluster with working ingress

To get a Kind cluster to work with an ingress controller such as NGINX Ingress Controller, you need some custom configuration of the cluster. Such a configuration file could look like:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    kubeadmConfigPatches:
      - |
### Option 1 - Terraform can generate SSL/SSH private keys using the tls_private_key resource
variable "key_name" {}
resource "tls_private_key" "example" {
algorithm = "RSA"
rsa_bits = 4096
}
resource "aws_key_pair" "generated_key" {
//
// main.swift
// Shell Notification Center
//
// Created by Keng Lee on 2021/1/15.
//
import Foundation
import Combine
var bag = Set<AnyCancellable>()
@mkol5222
mkol5222 / govc-ubuntu-install.md
Created February 5, 2024 14:09 — forked from tdewin/govc-ubuntu-install.md
Install ubuntu via GOVC in a almost automated way

Automated install

You want to have a fresh copy instead of a template clone? Here you go

Set some variables

set GOVC_INSECURE=true
set GOVC_URL=login@vcenter.fqdn
set GOVC_PASSWORD=youguess
set GOVC_DATASTORE=mydatastore
@mkol5222
mkol5222 / cloud-init.yaml
Last active February 7, 2024 08:21
how to launch multipass Ubuntu LTS VM with docker
#cloud-config
package_upgrade: true
#ssh_authorized_keys:
# - <your key>
packages:
- docker.io
- docker-compose
- jq
# Originally from here : https://gist.github.com/ngaffa/15d46c98dd82620c8120ddf7398d6dbd
#cloud-config
package_update: true
package_upgrade: true
packages:
# Update the apt package index and install packages needed to use the Docker and Kubernetes apt repositories over HTTPS
- apt-transport-https
- ca-certificates
- curl
@mkol5222
mkol5222 / tmux-cheatsheet.markdown
Created January 29, 2024 08:46 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname