Skip to content

Instantly share code, notes, and snippets.

@InvisibleRain
InvisibleRain / .tmux.conf
Last active May 27, 2023 15:11
Belongs to /etc/tmux.conf or ~/.tmux.conf
setw -g mode-keys vi
setw -g allow-rename off
@echo off
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
@InvisibleRain
InvisibleRain / IconCache.cmd
Created May 27, 2023 14:53
In old versions of Windows 10 file thumbnails sometimes get corrupted. This script fixes the issue
taskkill /f /im explorer.exe
cd /d %userprofile%\AppData\Local\Microsoft\Windows\Explorer
attrib -h iconcache_*.db
del iconcache_*.db
start explorer
@InvisibleRain
InvisibleRain / download-deps.sh
Created May 27, 2023 14:51
Download package dependecies recursively on debian-like systems
#!/bin/bash
set -e
# If argument is non-empty and the package exitst
if [[ -n $1 ]] && [[ $(apt show $1) ]]; then
dir=$HOME/$1
#rm -rf $dir # Uncomment for development
mkdir $dir
cd $dir
@InvisibleRain
InvisibleRain / spigot.service
Last active July 8, 2023 12:17
Spigot systemd unit with tmux
[Unit]
Description=Spigot
[Service]
Type=forking
Restart=on-failure
User=spigot
ExecStart=/opt/spigot/start.sh
KillMode=none
ExecStop=/opt/spigot/stop.sh