Skip to content

Instantly share code, notes, and snippets.

View CarlosDomingues's full-sized avatar

Carlos Domingues CarlosDomingues

View GitHub Profile
@CarlosDomingues
CarlosDomingues / Python 3.10 on Ubuntu 20 on Windows 11.md
Last active January 13, 2022 18:50
Python 3.10 on Ubuntu 20 on Windows 11

A guide on how to install Python 10 on WSL2 under Windows 10 / 11.

Install pyenv

pyenv is a tool that allows switching the global Python version, or choosing a specific version per project.

sudo apt update --yes
sudo apt install --yes build-essential curl git libbz2-dev liblzma-dev libffi-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libsqlite3-dev llvm make python3-openssl tk-dev wget xz-utils zlib1g-dev
curl https://pyenv.run | bash
@CarlosDomingues
CarlosDomingues / Cleaning all Docker stuff.md
Created January 25, 2022 21:53
How to clean everything related to Docker
docker system prune --all --force --volumes
@CarlosDomingues
CarlosDomingues / systemd-timers-example.md
Created March 21, 2022 13:43
systemd timers example

A simple example of systemd timers. Inspired by this blog post.

1 - Go to /etc/systemd/system

2 - Create a FreeMemoryStatistics.service unit file like so:

[Unit]
Description=Logs free memory statistics to the systemd journal
Wants=FreeMemoryStatistics.timer

Sync a fork with upstream

Run the following (note: use main/master as needed):

git fetch upstream
git checkout master
git merge upstream/master
git push origin master
@CarlosDomingues
CarlosDomingues / kodolow.md
Last active April 29, 2022 19:39
Kubernetes on Docker on Linux on Windows

Kubernetes on Docker on Linux on Windows

This guide shows how to run Kubernetes in a Windows Host, using kind to run the control plane in Docker and WSL 2 to run Docker itself.

The whole point of doing that is to run Kubernetes:

  1. In a Windows Host
  2. Without managing virtual machines (Docker Desktop + WSL 2 will do that for us)
  3. Without using Docker Desktop's native Kubernetes feature (as it has a tendency to break workflows that do not relly on K8s).