Skip to content

Instantly share code, notes, and snippets.

@Oddly
Oddly / proxmox-termjs.md
Last active October 22, 2024 18:40
Setup a tty on Debian VM on Proxmox for xterm.js
  1. Edit the /etc/default/grub file. Append the console=ttyS0 statement to the grub config file at the end of the GRUB_CMDLINE_LINUX line: console=tty0 console=ttyS0,115200

  2. Create the grub.cfg file: BIOS: grub2-mkconfig -o /boot/grub2/grub.cfg EFI: grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

  3. Enable a getty login service for ttyS0 with the systemctl command:

@Oddly
Oddly / sources.list
Created October 22, 2024 18:26
Debian 12 sources.list
deb http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
@Oddly
Oddly / K8s-to-dockerdesktop.md
Created October 2, 2024 17:32
Connect a Pod Kubernetes on Docker desktop with a container on Docker desktop

This will create a Kubernetes Service of type ExternalName which will expose host.docker.internal, which will resolve to the host machine's IP address.

Create a file docker-connect.yml with below contents. Then do kubectl apply -f docker-connect.yml

apiVersion: v1
kind: Service
metadata:
  name: docker-container-service
spec:
@Oddly
Oddly / k8s-to-internet-fix.md
Last active October 2, 2024 17:34
Kubernetes on Docker desktop internet fix

This will update the Kubernetes CoreDNS service to forward login.microsoftonline.com to 1.1.1.1. Thank you patrickhuber

Put below code in coredns.yml and then kubectl apply -f coredns.yml. Ignore the errors.

apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
 namespace: kube-system
@Oddly
Oddly / gist:40b5121935e6da80c5100734672be0f6
Created April 29, 2024 14:49
Oneliner to delete broken symlinks
find "/directory" -maxdepth 1 -xtype l -print -delete