Skip to content

Instantly share code, notes, and snippets.

View nanox's full-sized avatar
🏣
Remote

Jose Leonardo Alvarez nanox

🏣
Remote
View GitHub Profile
@nanox
nanox / BoringSSL_on_Windows
Created June 25, 2025 02:22 — forked from sgnn7/BoringCrypto_Windows_DLL
Build BoringCrypto / BoringSSL DLL on Windows 10
PS ...\boringssl> mkdir build
PS ...\boringssl> cd build
PS ...\boringssl> # Create build_boringssl.ps1
PS ...\boringssl\build> powershell -executionpolicy bypass -File .\build_boringssl.ps1
...
DLL is at ...\boringssl\build\outx64\ssl\ssl.dll
@nanox
nanox / multipass-docker-cloud-init.yaml
Last active June 14, 2025 23:22 — forked from pmbaumgartner/cloud-init.yaml
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl
@nanox
nanox / docker-runtime-test.sh
Created June 10, 2025 21:46 — forked from rimelek/docker-container-runtime-test.sh
Compare Docker container runtimes and check the available resources, the kernel version and the visibility of the kernel files (made for a youtube video))
#!/usr/bin/env bash
set -eu -o pipefail
runtimes=(Host runc runsc kata)
YELLOW_START='\033[1;33m'
YELLOW_END='\033[0m'
declare -A COMMANDS=(
@nanox
nanox / enable_ebpf_on_wsl2
Created June 5, 2025 07:41 — forked from MarioHewardt/enable_ebpf_on_wsl2
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
@nanox
nanox / install-crio-ubuntu2204-lts.md
Last active June 5, 2025 03:11 — forked from IvanCl4udio/Howto.md
How install CRI-O on Ubuntu 22.04 LTS

How install CRI-O on Ubuntu 22.04 LTS

OS=xUbuntu_22.04

CRIO_VERSION=1.24

echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
@nanox
nanox / HowTo-CRIO-Ubuntu.md
Last active July 2, 2025 02:09 — forked from IvanCl4udio/Howto.md
How install CRI-O on Ubuntu 22.04 LTS

How install CRI-O on Ubuntu 22.04 LTS

OS=Debian_11

CRIO_VERSION=1.23

echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

@nanox
nanox / goldpinger.yaml
Created April 25, 2025 17:29 — forked from saintdle/goldpinger.yaml
Goldpinger
apiVersion: apps/v1
kind: Deployment
metadata:
generation: 1
labels:
app.kubernetes.io/instance: goldpinger
app.kubernetes.io/name: goldpinger
name: goldpinger
spec:
replicas: 5
@nanox
nanox / lxc-wsl2.md
Created March 12, 2025 04:57 — forked from jacky9813/lxc-wsl2.md
Running LXC VM in WSL2

Running LXC/LXD VM in WSL2 (Windows 11 Only)

If you just running LXC/LXD containers, the default settings for WSL2 (both Windows 10 and Windows 11) should be adequate.

However, if trying something like lxc launch images:alpine/3.18 --vm, LXC will complain that vhost_vsock module is not loaded.

Here's how I configure WSL2 so I can run VM with LXC/LXD.

@nanox
nanox / goofyfs.md
Created March 4, 2025 18:09 — forked from tomsing1/goofyfs.md
Mounting an S3 bucket as a folder on Mac OS X

This document shows how to mount an AWS S3 bucket on Mac OS X using goofyfs.

The first three steps illustrate how to use goofys

  1. Install goofyfs via brew
brew cask install osxfuse
brew install goofys