Skip to content

Instantly share code, notes, and snippets.

@niklaskeerl
niklaskeerl / Readme.md
Created September 7, 2024 09:47
Transform AWS Typescript Lambda to Typescript Express.js Application for ECS / EKS / Elastic Beanstalk

Transform Typescript AWS Lambda to Express.js Applications

Motivation

AWS Lambda is not always the ideal choice for your application. This can have numerous reasons e.g. your customers are annoyed from the cold startup times, you need a higher request body size or your application has very long running tasks which are interrupted.

To go around all of this issues we should have a long running application. Express.js is a popular choice for building Typescript and Javascript REST APIs. We can levarage it to transform our AWS lambda app to a long running Rest API.

@niklaskeerl
niklaskeerl / jaeger-kubernetes-all-in-one.yml
Created May 28, 2024 08:45
Kubernetes manifests for deploying jaeger all-in-one
# Kubernetes Namespace, Deployment and service for deploying in-memory jaeger for temporary use with e.g. odigos.
# odigos jaeger endpoint: jaeger.tracing:9411
# Port-forward jaeger UI: kubectl port-forward -n tracing <pod-name> 16686:16686
apiVersion: v1
kind: Namespace
metadata:
name: tracing
---
@niklaskeerl
niklaskeerl / delete_pod.sh
Created May 24, 2024 08:42
Force delete a kubernetes pod
kubectl delete pod <PODNAME> --grace-period=0 --force --namespace <NAMESPACE>
@niklaskeerl
niklaskeerl / get_kubeconfig.sh
Created January 25, 2023 09:59
Get kubeconfig for gcloud gke cluster
# List all gcloud projects
gcloud projects list
# Set Project ID from project list
gcloud config set project $PROJECT_ID
# List all cluster names and zones for this project ID
gcloud container clusters list
# Generate kubeconfig entry
gcloud container clusters get-credentials --zone $LOCATION $NAME
@niklaskeerl
niklaskeerl / latex_with_latexindent.md
Created May 25, 2021 15:45
Working Latex distribution with latexindent for Arch Linux

Working Latex distribution with latexindent for Arch Linux

  1. Install the texlive-most group
sudo pacman -S texlive-most
  1. Install texlive-latexindent-meta from the AUR (Arch User Repository) using your favorite AUR helper
@niklaskeerl
niklaskeerl / notability_local_webdav_backup.md
Created May 24, 2021 08:50
Notability local webdav backup

Backup your Notability notes on your machine using webdav

Setup

  1. Prepare a folder where you want your backup to be.

  2. Install rclone for your system

  3. Run the webdav server using rclone

@niklaskeerl
niklaskeerl / .bashrc
Created May 17, 2021 08:36
.bashrc without fish as interactive shell
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
@niklaskeerl
niklaskeerl / keymap_solution.md
Last active May 16, 2021 13:05
Keymap not working in arch linux after archinstall

Keymap not working in arch linux after archinstall

Credits: @Torxed archlinux/archinstall#107

The keymap set in the in the archinstall script does not work in your window manager.

Solution (edit the keymap "de" with the one you want):

$ localectl set-keymap "" &amp;&amp; localectl set-keymap de
@niklaskeerl
niklaskeerl / backup_home.md
Last active July 4, 2021 09:42
Backup home directory
@niklaskeerl
niklaskeerl / stakeholder_diagram.tex
Last active November 18, 2020 16:15
Stakeholder diagram latex template
\documentclass[border=10pt,tikz]{standalone}
\usepackage{pgf}
\usetikzlibrary{arrows,automata,shapes,positioning}
\usepackage[latin1]{inputenc}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3.5cm,
semithick]
\tikzstyle{every state}=[ellipse,fill=white,text=black]