Skip to content

Instantly share code, notes, and snippets.

@wallyqs
wallyqs / readme.md
Created July 15, 2023 04:10
JetStream on Docker with Docker Compose

First, create a few volumes so that state is persisted across restarts:

docker volume create nats1
docker volume create nats2
docker volume create nats3

Now create a docker-compose.yaml with the following:

@reluce
reluce / prepare_ubuntu_template.sh
Last active September 5, 2025 02:12
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# All commands will be executed on a Proxmox host
sudo apt update -y && sudo apt install libguestfs-tools -y
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
# Read and set root user password from file.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt
# Create an additional user.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser"
# Set password for that user.
# Stolen from
# https://github.com/nginxinc/nginx-unsupported-modules/blob/master/ngx_otel_module/Dockerfile.base.debian
# plus
# https://github.com/nginxinc/nginx-unsupported-modules/blob/master/ngx_otel_module/Dockerfile.debian
# Updated to build on U18, and had to update the apt-add-repository for cmake to target bionic
# Updated to build DEBUG target for debugging
FROM <local_repo>/ubuntu18:latest
ENV DEBIAN_FRONTEND=noninteractive
ENV GRPC_VERSION_TAG=v1.36.4
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
postgres_ready() {
python << END
import sys
@SafeEval
SafeEval / cloud-init-meta-data.cfg
Last active June 24, 2022 14:20
Example of fully automated Ubuntu installation with KVM, virt-install 4.x, and cloud-init config files
#cloud-config
instance-id: my-vm-host
local-hostname: my-vm-host
@lcrilly
lcrilly / Dockerfile
Last active January 24, 2023 07:09
NGINX + OpenSSL 3.0
FROM nginx AS build
WORKDIR /src
RUN apt-get update && \
apt-get install -y git gcc make mercurial libperl-dev libpcre3-dev zlib1g-dev libxslt1-dev libgd-ocaml-dev libgeoip-dev
RUN git clone -b openssl-3.0 https://github.com/openssl/openssl openssl-3.0 && \
hg clone https://hg.nginx.org/nginx && \
hg clone http://hg.nginx.org/njs
RUN cd nginx && \
auto/configure `nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param=` \
@jepio
jepio / flatcar-install-k8s.sh
Last active February 6, 2023 03:43
Install k8s on flatcar
#!/bin/bash
set -xe
systemctl enable docker
modprobe br_netfilter
cat <<EOF | tee /etc/modules-load.d/k8s.conf
br_netfilter
EOF
@Postrediori
Postrediori / Linux-RocketLake-UHD-750.md
Last active June 17, 2023 13:18
Setup UHD 750 GPU on Intel Rocket Lake processors on Linux

Description

Linux distros don't support newest (May 2021) Rocket Lake GPUs by default. Tested on:

  • Fedora 34
  • Ubuntu 20.04.2.0
  • Ubuntu 21.04

Even if i915 module is loaded (lsmod | grep i915), the graphics is still running in software mode. This issue can be checked in the following ways:

@SachinMaharana
SachinMaharana / k8s.md
Created April 25, 2021 09:02
k8s setup
apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common

lsmod | grep br_netfilter

modprobe br_netfilter

cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
@abdennour
abdennour / ingress-kube-apiserver.yaml
Created April 18, 2021 00:50
expose kube-apiserver thru ingress
kind: Ingress
metadata:
name: kubeapi
namespace: default
annotations:
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: "api.devops.example.com"