Skip to content

Instantly share code, notes, and snippets.

@ismarsantos
ismarsantos / pgadmin.txt
Last active April 29, 2024 23:57
Connect PgAdmin4 on WSL2 Ubuntu 20.04.3 LTS
sudo -u postgres psql -c 'SHOW config_file'
sudo nano /etc/postgresql/13/main/postgresql.conf
# uncomment line 59:
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
@ismarsantos
ismarsantos / SyncFolders.ps1
Created April 6, 2024 02:45 — forked from lafleurh/SyncFolders.ps1
PowerShell script to do a two-way sync of Windows folders
Param (
[string]$LeftFolder,
[string]$RightFolder
)
function CreateFolderStructure([string]$Path)
{
if (-not [string]::IsNullOrWhiteSpace($Path))
{
if (-not (Test-Path $Path))
@echo off
pushd "%~dp0"
rem Command generated using the editor's project launcher. See https://docs.unrealengine.com/en-US/SharingAndReleasing/Deployment/ProjectLauncher
rem For arguments documentation see https://github.com/botman99/ue4-unreal-automation-tool.
rem Use `-nocompileeditor` for forcing the editor not to compile.
.\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=%~dp0<project_name>\<project_name>.uproject -nop4 -clientconfig=Development -serverconfig=Development -unrealexe=%~dp0Engine\Binaries\Win64\UnrealEditor-Cmd.exe -utf8output -platform=Win64 -targetplatform=Win64 -build -cook -map=Splash.umap+Map.umap+Forest.umap -cookdir=%~dp0\<project_name>\Content\Stage\Prints\Abilities+%~dp0\<project_name>\Content\Stage\Animations -skipcookingeditorcontent -unversionedcookedcontent -pak -distribution -compressed -stage -package -stagingdirectory="%~dp0Dist"
popd
@ismarsantos
ismarsantos / gist:2cb5b147954fe3e1f4fa8a7517c8f418
Last active March 28, 2024 15:25
GRUB Linux Boot in lower resolution
vga=0x314
vga=784 nomodeset modeset=0 nouveau.modeset=0 modprobe.blacklist=nouveau,nvidia
GRUB VGA Modes
https://wiki.bqti.com.br/linux/grub-vga-modes/
@ismarsantos
ismarsantos / docker-compose.yaml
Created March 23, 2024 03:05 — forked from BlueHippoGithub/docker-compose.yaml
Remember to change the volumes for your own desired path
version: '3.3'
networks:
caddy:
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
@ismarsantos
ismarsantos / description.sh
Created February 8, 2024 08:09 — forked from sebyx07/description.sh
hatchbox restore postgres db
# cd into the backup
tar -xvf DATABASE.tar
cd DATABASE/databases
gunzip -k PostgreSQL.sql.gz
psql DATABASE_URL < Postgresql.sql
@ismarsantos
ismarsantos / tutorial.md
Last active January 22, 2024 11:21
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 / 9534-64-Core.txt
Created December 8, 2023 00:58
KVM QEMU CPU Pin AMD EPYC 9534 64-Core Processor
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0:0
64 0 0 0 0:0:0:0
1 0 0 1 1:1:1:0
65 0 0 1 1:1:1:0
2 0 0 2 2:2:2:0
66 0 0 2 2:2:2:0
@ismarsantos
ismarsantos / archlinux-qemu-kvm.md
Created December 7, 2023 05:29 — forked from tatumroaquin/archlinux-qemu-kvm.md
QEMU-KVM Installation for Arch Linux

Arch Linux QEMU-KVM

install all necessary packages

sudo pacman -S virt-manager virt-viewer qemu qemu-arch-extra \
edk2-ovmf vde2 ebtables dnsmasq bridge-utils openbsd-netcat libguestfs

enable libvirt daemon

SSL Certificate Option
There are many ways to obtain an SSL certificate. An easy and cheap way is to use LetsEncrypt. Setting up LetsEncrypt for a server that uses port 80 for a webserver is extremely easy. Since the Coturn server does use port 80, a manual request with a DNS challenge is easiest:
Install CertBot
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Request the certificate