Speed up audio of a file

NOTE: ACCELERATION can be a value from “0.5” (1/2 speed) to “2.0” (double speed)

ffmpeg -i INPUT_FILE -filter:a "atempo=ACCELERATION" -vn OUTPUT_FILE


Compress a File Without Removing It

gzip < file > file.gz


Setting OS Limits with systemd

  1. Edit /etc/systemd/user.conf and /etc/systemd/systemd.conf, add the following line to each file:
  2. Edit /etc/security/limits.conf and set the usual limit details:
    USER soft nofile NEW_LIMIT
    USER hard nofile NEW_LIMIT
  3. Restart your system for the changes to take effect.

Command Line Tricks

Recursively Set +x for Only Directories

Set the executable bit for directories (and not files) using +X (upper case) instead of +x (lower case).

chmod g+rX *

Prevent sudo Password Prompts

If you don’t have NOPASSWD set in sudoers, you can still bypass the password prompt by setting SUDO_ASKPASS to a binary that echos your password.

echo "echo mypassword" > ~/.local/bin/
chmod 755 ~/.local/bin/
export SUDO_ASKPASS=${HOME}/.local/bin/


Set Context for Container to Access Path

semanage fcontext -a -t container_file_t '<path_root>(/.*)?'
restorecon -R <path_root>


Locking macOS Dock Content

defaults write position-immutable -bool yes; killall Dock

Locking macOS Dock Size

defaults write size-immutable -bool yes; killall Dock

Show CMD-TAB App Switcher On All Monitors

defaults write appswitcher-all-displays -bool true; killall Dock

Prevent sudo Password Prompts

See Linux - Prevent sudo Password Prompts

Disabling auto-hide scroll bars

System Preferences -> General -> Show scroll bars = Always

Disable Touchpad Swipe Back

# Chrome
defaults write AppleEnableSwipeNavigateWithScrolls -bool FALSE
# FireFox
defaults write org.mozilla.firefox AppleEnableSwipeNavigateWithScrolls -bool FALSE
# Brave
defaults write com.brave.Browser AppleEnableSwipeNavigateWithScrolls -bool FALSE
# Safari
defaults write AppleEnableSwipeNavigateWithScrolls -bool FALSE

Disable Dock Bouncing Icons

defaults write no-bouncing -bool TRUE; killall Dock