Skip to content

Instantly share code, notes, and snippets.

View cakeneko's full-sized avatar
🍀
Take a break, or else!

Natalia cakeneko

🍀
Take a break, or else!
  • Barcelona, Spain
  • 19:33 (UTC +01:00)
View GitHub Profile
@cakeneko
cakeneko / disable-wifi-on-ethernet.bash
Last active July 11, 2025 14:45
Disable Wifi when there's an active Ethernet connection on a Raspberry Pi 5 using NetworkManager
#!/bin/bash
export LC_ALL=C
# Copy this file and make it executable:
# sudo curl -fsSL https://gist.github.com/cakeneko/0034e7d5db84ca824869598332ea22fc/raw -o /etc/NetworkManager/dispatcher.d/90-disable-wifi-on-ethernet
# sudo chmod +x /etc/NetworkManager/dispatcher.d/90-disable-wifi-on-ethernet
# Make sure your Ethernet connection has its connection.id set to "eth0"
# sudo nmcli con mod <UUID> connection.id eth0
@echo off
powershell Start-Process notepad -Verb RunAs -ArgumentList C:\Windows\System32\Drivers\etc\hosts -Wait
ipconfig /flushdns
@cakeneko
cakeneko / docker-setup.sh
Last active April 24, 2025 11:55
Collection of setup scripts for Docker, Nginx and PostgreSQL
#!/usr/bin/env bash
set -e
sudo apt update
sudo apt install curl lsb-release -y
ARCH=$(dpkg --print-architecture)
DIST=$(lsb_release -is | awk '{print tolower($0)}')
CODE=$(lsb_release -cs)