jueves, 26 de marzo de 2026

Out of space lvm on lxc container proxmox

 

# List LVM volumes for the container
lvs | grep vm-101

# Check the actual size and usage
lvdisplay /dev/pve/vm-101-disk-0

# Try to mount the container's rootfs temporarily to check space
mkdir -p /tmp/ct101-check
mount /dev/pve/vm-101-disk-0 /tmp/ct101-check
df -h /tmp/ct101-check
du -sh /tmp/ct101-check/* | sort -hr | head -20


# First, unmount the temporary mount
umount /tmp/ct101-check

# Resize the rootfs to 20GB (or 30GB if you plan to run many containers)
pct resize 101 rootfs 20G

# Now start the container
pct start 101


viernes, 20 de febrero de 2026

Quick use of spectral to check openapi templates

# Now install spectral

npm init -y
npm install -g @stoplight/spectral-cli

npm install --save-dev @stoplight/spectral-cli spectral-aws-apigateway-ruleset


spectral

# Create ruleset
echo 'extends: ["spectral:oas"]' > .spectral.yaml

# Check openapi template
spectral lint openapi-api.yaml

Install node and go in wsl ubuntu

# Install go and set path
sudo apt update
sudo apt install golang-go
export PATH="$HOME/go/bin:$PATH"
source ~/.bashrc

# Install nodejs and npm
sudo apt install nodejs npm # Create a directory for global npm packages
mkdir -p ~/.npm-global

# Configure npm to use this directory
npm config set prefix '~/.npm-global'

# Add to your PATH (add this to ~/.bashrc to make it permanent)
export PATH="$HOME/.npm-global/bin:$PATH"

# Reload your shell
source ~/.bashrc

# Now install spectral
npm install -g @stoplight/spectral-cli

jueves, 5 de febrero de 2026

VSCode Claude Code extension doesn't login

 I was experiencing issues with the claude code extension in my new windows machine. And I had this as well with linux.

For windows I should install the claude code terminal and then login with the anthropic console.

irm https://claude.ai/install.ps1 | iex

Then edit the path on environemnt variables and add this path.

C:\Users\alega\.local\bin 

After that the vscode extension started to work.

viernes, 16 de enero de 2026

Install oasdiff

Great tool to check openapi templates


go install github.com/oasdiff/oasdiff@latest

echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc

source ~/.bashrc

oasdiff

lunes, 12 de enero de 2026

Configure the Terraform AWS provider to use a different AWS profile

To to configure the Terraform VSCode Extension to use a different AWS profile

Option 1: VS Code Settings (Recommended)

Open VS Code Settings (JSON) and add:

  1. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  2. Type "Preferences: Open User Settings (JSON)"
  3. Add this configuration:


{
"terraform.languageServer.terraform.path": "terraform",
"terraform.languageServer.enable": true,
"terminal.integrated.env.linux": {
"AWS_PROFILE": "profile-name"
}
}