Skip to content

Instantly share code, notes, and snippets.

View washopilot's full-sized avatar

Fernando Chicaiza washopilot

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / Dockerfile
Last active July 11, 2023 03:09
Succesfull BoltCMS DockerFile and docker-compose with multi-networking
# the different stages of this Dockerfile are meant to be built into separate images
# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage
# https://docs.docker.com/compose/compose-file/#target
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG PHP_VERSION=7.4
ARG OPENRESTY_VERSION=1.17.8.2
# "php" stage
@washopilot
washopilot / website-dl.md
Created April 21, 2023 12:18 — forked from stvhwrd/website-dl.md
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

@washopilot
washopilot / jlgranda server permissions
Created March 21, 2023 11:27
jlgranda server permissions
chown emporiol.emporiol emporiolojano.com -Rf
chmod 775 emporiolojano.com -Rf

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@washopilot
washopilot / ssh.txt
Created December 27, 2022 16:42
ssh configuration namecheap
PARA GENERAR KEY
ssh-keygen -t rsa
PARA CONECTARSE MEDIANTE SSH CON NAMECHEAP
ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa user@myhost -p 22