Collection of simple shell snippets
find {folder} -type f -exec sed -i 's/{searchString}/{replacement}/g' {} \;
#!/usr/bin/env bash | |
# yt_sync.sh usage: | |
# 1. Create a file called current_index and write 0 to it | |
# 2. Replace the playlist link with your playlist link | |
# 3. Execute the script to download all songs from the playlist | |
# 4. When the playlist on youtube changes, execute this script again | |
original_file_amount=$(ls | egrep '\.m4a|\.opus' | wc -l) | |
current_index=$(cat current_index) |
# source: https://www.svws.nrw.de/cgi-bin/yabb2/YaBB.pl?num=1421236234/5#5 | |
# prerequisite: | |
# * wine (tested with v8.6 (Staging)) | |
# * winetricks (newer is always better) | |
export WINEPREFIX=~/lupo | |
export WINEARCH=win32 | |
if [ ! -d "~/lupo" ]; then | |
mkdir ~/lupo | |
winetricks -q mdac28 | |
winetricks -q jet40 |
#!/bin/bash | |
# requires flameshot, curl, notify-send, wl-clipboard and jq | |
name="Screenshot_$(date +"%Y_%m_%d-%H-%M-%S").png" | |
if [ -z "$1" ] | |
then | |
flameshot gui -r >> ~/Pictures/$name | |
elif [ "$1" == "screen" ] | |
then |