Skip to content

Instantly share code, notes, and snippets.

View septicwolf818's full-sized avatar

Rafał W septicwolf818

View GitHub Profile
@septicwolf818
septicwolf818 / clean_desktop.scpt
Created February 5, 2024 22:03
Organize files on Desktop (Apple Script)
-- Sort files on the desktop into folders
-- Function to sort files
on sortFiles()
tell application "Finder"
set desktopPath to path to desktop as string
set desktopFolder to folder desktopPath
-- Get list of files on the desktop
set desktopFiles to every item of desktopFolder
@septicwolf818
septicwolf818 / updateandclean.sh
Last active June 6, 2023 12:32
Bash script to update brew packages and clean logs/cache on MacOS
#!/bin/bash
# List of directories to clean
directories=(
# Caches
"/Library/Caches:Yes"
"$HOME/Library/Caches:No"
# Logs
"$HOME/Library/Logs:No"
"/var/log:Yes"
@septicwolf818
septicwolf818 / install.sh
Last active June 6, 2023 15:30
Arch Linux install script (X SERVER/NVIDIA GPU/GNOME 3)
#!/bin/bash
# Ask if Wi-Fi is needed
read -p "Do you need to connect to a Wi-Fi network? (y/n): " need_wifi
if [[ "$need_wifi" =~ [yY](es)* ]]; then
wifi-menu
fi
# Ask for hostname, username, and password
@septicwolf818
septicwolf818 / .zshrc
Last active February 20, 2024 17:28
My ZSH config
# You have to install ZSH shell first, then neofetch to make it work
autoload -Uz vcs_info
autoload -Uz compinit && compinit
autoload virtualenv
zstyle ':vcs_info:*' enable git svn
setopt PROMPT_SUBST
zstyle ':vcs_info:git*' formats "→ (%b) "
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ↠ '