Skip to content

Instantly share code, notes, and snippets.

@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 / 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.

# 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;

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
<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',
@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.

@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 / 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 / win11.xml
Created June 20, 2023 22:19 — forked from akitaonrails/win11.xml
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
@ismarsantos
ismarsantos / gist:cea11b371123818b195ed35561d9333d
Created July 12, 2023 19:29
Getting "fatal: Authentication failed" -error when sending git commands in Windows 10
The password is stored in windows credential manager and needs to be updated. Open command prompt and enter the following command to view the list of stored passwords:
rundll32.exe keymgr.dll,KRShowKeyMgr
Scroll down in the list until you spot the git-related entries. Click it and edit the correct password.
Voilà
https://stackoverflow.com/a/42830319