Skip to content

Instantly share code, notes, and snippets.

@ismarsantos
ismarsantos / gist:5c98d1100eb05987fa47943c81594507
Created June 7, 2023 15:30
Access WSL webserver in local network
See this video, it helped me:
https://www.youtube.com/watch?v=yCK3easuYm4
netsh interface portproxy add v4tov4 listenport=<port-to-listen> listenaddress=0.0.0.0 connectport=<port-to-forward> connectaddress=<forward-to-this-IP-address>
for example
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=127.0.0.1
Microsoft has published a little bit of information about this on their WSL1 to WSL2 comparison page
@ismarsantos
ismarsantos / using-uuid-as-pk.md
Created February 6, 2023 19:19 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@ismarsantos
ismarsantos / wsl_user.md
Created January 31, 2023 17:13
How to set default user for manually installed WSL distro "wsl --import"

Side Note: This question was specifically about setting the default username in an imported instance. However, for completeness, you can also set the default username for a distro that was installed from the Store (or wsl --install) with:

<distro>.exe config --default-user <username>

For instance, if you installed "Ubuntu 20.04" from the Store, you would use:

ubuntu2004.exe config --default-user <username>

The .exe here is an "App Execution Alias" in Windows. You can check the name by going to "Manage app execution aliases" in the Windows System Settings.

<div class="row" data-controller="units">
<div class="col">
<%= render "shared/forms/label", locals: { form: form, input: :unit, presence: true } %>
<div class="row">
<div class="col">
<div class="input-group">
<%= form.select :unit_ids, build_options, { include_blank: false },
{
id: 'units',

This is a work in progress, proceed with caution

Install Proxmox and a Ubuntu VM with Portainer to manage docker containers

Setup Proxmox

  1. Install Proxmox 6.X iso I selected 2 drives in Raid 1 mirror
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
# cat /home/dokku/cloud/nginx.conf
server {
listen [::]:80;
listen 80;
server_name cloud.domain.com;
access_log /var/log/nginx/cloud-access.log;
error_log /var/log/nginx/cloud-error.log;
include /home/dokku/cloud/nginx.conf.d/*.conf;
@ismarsantos
ismarsantos / docker-compose-installer-for-container-optimized-os-on-gce.md
Created August 30, 2022 00:11 — forked from kurokobo/docker-compose-installer-for-container-optimized-os-on-gce.md
Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

The easiest way to make Docker Compose available on Container-Optimized OS on Google Compute Engine (GCE) on Google Cloud Platform (GCP).

This is minimal Bash script version of Community Tutorial.

How to use

Simply, download installer.sh, run it, and then reload bash by source ~/.bashrc or re-login.

@ismarsantos
ismarsantos / tutorial.md
Last active April 21, 2025 16:23
Proxmox 7.2-7 + NVIDIA vGPU with the GRID 14.2 driver + RTX A5000

We have an A5000 board,

I made the following configuration for nvidia-smi gpu command to work on host:

!!! Disclaimer !!!

The information below is not my own. I found all the commands already ready on the internet, read carefully all the steps before executing, researched each one of them before, what it does, its type of hardware, and its current configuration if supported, and backed up first.

This tutorial is incomplete, I just made the GPU configuration on the host to make it work, but the mdevctl types command that displays the profiles doesn’t return anything, according to other tutorials I found it should return, that’s all I got so far.

@ismarsantos
ismarsantos / Host
Created August 9, 2022 23:22 — forked from lucndm/Host
Proxmox GPU passthrough to LXC Container
Note : Proxmox 6.1
VI : /etc/apt/sources.list
# security updates
deb http://security.debian.org jessie/updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian jessie pve-no-subscription
@ismarsantos
ismarsantos / proxmox_nvidia.md
Created August 5, 2022 19:43 — forked from egg82/proxmox_nvidia.md
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.