Skip to content

Instantly share code, notes, and snippets.

View washopilot's full-sized avatar

Fernando Chicaiza washopilot

View GitHub Profile
@washopilot
washopilot / steps.md
Created April 23, 2025 20:50
Update pnpm via corepack

To update pnpm via corepack (especially when using nvm and Node 22), you can follow these steps:


✅ Step-by-Step: Update pnpm via corepack

  1. Enable corepack (you probably already did this):
    corepack enable
@washopilot
washopilot / docker-php-laravel-setup-simple.sh
Last active April 1, 2025 02:32
Docker command for running PHP 8.4 with Laravel installer globally installed
docker run --rm -it \
-v "$(pwd):/workspace" \
-w /workspace \
php:8.4-cli-bookworm bash -c "apt update && apt install -y sudo curl unzip && groupadd -g $(id -g) devgroup && useradd -m -u $(id -u) -g $(id -g) dev && echo 'dev ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && sudo -u dev bash -c 'curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer && exec bash'"
@washopilot
washopilot / .theme.omp.json
Last active March 12, 2025 20:14
Configure zsh, antidote and oh-my-posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"black": "#262B44",
"blue": "#4B95E9",
"green": "#59C9A5",
"orange": "#F07623",
"red": "#D81E5B",
"white": "#E0DEF4",
"yellow": "#F3AE35"
@washopilot
washopilot / steps.txt
Last active September 22, 2024 18:01
Linux Mint Installations
# Instalar Google-Chrome a partir del repositorio
curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg >> /dev/null
echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt update
sudo apt install google-chrome-stable
# Configurar git
sudo apt install git
git config --global user.name "Fernando Chicaiza"
git config --global user.email "[email protected]"

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

@washopilot
washopilot / steps.txt
Created September 14, 2024 03:34
pnpm installation
curl -fsSL https://get.pnpm.io/install.sh | sh -
pnpm env use --global lts
pnpm completion zsh > ~/completion-for-pnpm.zsh
echo 'source ~/completion-for-pnpm.zsh' >> ~/.zshrc
@washopilot
washopilot / .wslconfig
Last active September 9, 2024 02:52
WSL2 best configuration & wsl.conf to start docker service (/etc/wsl.conf)
[wsl2]
memory=6GB
processors=8
swap=3GB
guiApplications=false
localhostforwarding=true
nestedVirtualization=false
debugConsole=false
networkingMode=NAT
@washopilot
washopilot / steps-qemu.txt
Last active March 18, 2025 13:48
Manejo de imágenes con Qemu en Archlinux
# Instalar en archlinux qemu para x86_64 (suficiente)
sudo pacman -S qemu-desktop
# Crear un archivo imagen vacío con formato qcow2 (dinámico)
qemu-img create -f qcow2 arch_image.cow 10G
# Comando para lanzar la imagen con un arhivo iso asociado (sirve para instalar la iso)
qemu-system-x86_64 -cdrom archlinux-x86_64.iso -boot order=d -drive file=arch_image.cow,format=qcow2 -m 4G \
-enable-kvm -cpu host -smp sockets=1,cores=2,threads=2 -device virtio-vga-gl -display gtk,gl=on,grab-on-hover=on

Installing Arch linux with EFI

  1. Change keyboard layout:

    • loadkeys no
  2. Verify boot mode:

    • ls /sys/firmware/efi/efivars (If the directory exist your computer supports EFI)
  3. Ping some site on the Internet to verify connection:

  • ping archlinux.org
@washopilot
washopilot / Dockerfile
Created April 9, 2024 17:10 — forked from shov/Dockerfile
Docker PHP 7.2 fpm with GD jpg, png suppot
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev