Skip to content

Instantly share code, notes, and snippets.

View sefinek's full-sized avatar
😻
*mew mew*

Sefinek sefinek

😻
*mew mew*
View GitHub Profile
#!/bin/bash
# Usage: bash <(curl -fsSL https://gist.githubusercontent.com/sefinek/2be007238549882857b7b8a1eb66c877/raw/ubuntu-mirror-pl.sh)
# Other useful script: https://raw.githubusercontent.com/ijash/ubuntu-fastest-mirror/master/run.sh
set -euo pipefail
SECONDS=0
# Logger
log() {
local level="$1"; shift
@sefinek
sefinek / set-locale-pl-en.sh
Last active May 18, 2025 02:41
Script to configure a Linux system (Ubuntu/Debian) with an English UI (en_US.UTF-8) and Polish regional formats (pl_PL.UTF-8) for date, numbers, currency, and paper size. Ideal for Polish users who prefer an English-language system with local formatting.
#!/bin/bash
# Usage: bash <(curl -fsSL https://gist.githubusercontent.com/sefinek/73593f5629065a761588b5a3ba16fed0/raw/set-locale-pl-en.sh)
set -euo pipefail
# Install 'locales' if not already present
if ! dpkg -s locales >/dev/null 2>&1; then
echo "Installing 'locales' package..."
sudo apt-get update -qq
sudo apt-get install -y locales
@sefinek
sefinek / git-installation.txt
Last active August 5, 2025 21:43
Git installation on Ubuntu/Debian
sudo apt update && sudo apt install -y software-properties-common && \
sudo add-apt-repository -y ppa:git-core/ppa && \
sudo apt update && sudo apt install -y git
@sefinek
sefinek / node-js-installation.txt
Last active August 5, 2025 21:44
Node.js v22 Installation on Ubuntu/Debian
sudo apt update && \
sudo apt install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && \
sudo apt install -y nodejs
@sefinek
sefinek / ufw-omada-rules
Last active April 27, 2025 03:51
Enables UFW and adds rules for the Omada Software Controller.
sudo ufw allow 8088/tcp && \
sudo ufw allow 8043/tcp && \
sudo ufw allow 8843/tcp && \
sudo ufw allow 29810/udp && \
sudo ufw allow 29811/tcp && \
sudo ufw allow 29812/tcp && \
sudo ufw allow 29813/tcp && \
sudo ufw allow 29814/tcp && \
sudo ufw allow 27001/udp && \
sudo ufw allow 27002/tcp && \
sudo dpkg-reconfigure tzdata
timedatectl
@sefinek
sefinek / git_clean_branch.txt
Created October 4, 2024 09:00
Resets Git main branch by removing all commits and creating a fresh one with current files.
git checkout --orphan new-main && git add . && git commit -m "First commit" && git branch -D main && git branch -m main && git push -f origin main
#!/bin/bash
##############################################################
# !!! WARNING !!! THIS SCRIPT IS INTENDED FOR SERVER USE #
# ONLY. IT WILL REMOVE GUI-RELATED PACKAGES AND COMPONENTS! #
# #
# DO NOT RUN THIS ON A DESKTOP SYSTEM WITH GNOME/KDE/XFCE #
# OR ANY OTHER GRAPHICAL ENVIRONMENT. #
##############################################################
# curl -fSL https://gist.githubusercontent.com/sefinek/42cd13a10895accf385c7f0774d53ce7/raw/cleanup.sh -o cleanup.sh