Skip to content

Instantly share code, notes, and snippets.

View washopilot's full-sized avatar

Fernando Chicaiza washopilot

View GitHub Profile
@washopilot
washopilot / mysql-docker.sh
Created June 30, 2023 03:06 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@washopilot
washopilot / docker-compose-portainer.yml
Last active March 10, 2024 16:34
Nginx-proxy-manager multiple networking docker-compose.yml
version: '3'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: my_portainer
volumes:
- data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: always
networks:
@washopilot
washopilot / steps_nano_syntax_highlighting.txt
Last active December 2, 2023 16:48
How do I enable syntax highlighting in nano
I used this command to quickly enable all available languages (nano-syntax-highlighting)
find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc
@washopilot
washopilot / grub-restore-archlinux.txt
Last active June 24, 2025 16:20
Important considerations when installing Arch Linux with KDE
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck
pacman -S os-prober
nano /etc/default/grub
# Poner GRUB_DISABLE_OS_PROBER=false para que reconozca Windows
sudo grub-mkconfig -o /boot/grub/grub.cfg
@washopilot
washopilot / Caddyfile
Last active March 23, 2024 20:39
Caddy multinetworking configuration
{
email [email protected]
}
bolt.washopilot.duckdns.org {
reverse_proxy bolt-cms-site:80
}
wp1.washopilot.duckdns.org {
reverse_proxy wordpress-1:80
@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

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