This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Discord App auto-updater for Debian | |
| # | |
| # This script is responsible for managing the Discord application on a system. | |
| # It performs the following tasks: | |
| # 1. Checks if Discord is currently installed on the system. | |
| # 2. If Discord is not installed, the script downloads and installs the latest version. | |
| # 3. If Discord is already installed, the script checks for the latest version online. | |
| # 4. If a newer version of Discord is available, the script downloads and updates Discord to the latest version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Add location to gnome weather manually | |
| if [[ ! -z "$(which gnome-weather)" ]]; then | |
| system=1 | |
| fi | |
| if [[ ! -z "$(flatpak list | grep org.gnome.Weather)" ]]; then | |
| flatpak=1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SSH_USER="user@sftp.domain.com" # your sftp credentials | |
| SSH_KEY="~/.ssh/id_rsa" # your ssh private key | |
| DOCUMENT_ROOT="/www/vhosts/mywebsite.com/htdocs" # directory on the remote server | |
| LOCAL_DIR="~/mywebsite.com/public" # directory on your local machine | |
| REMOTE_DIR="_remote_dir" # temporary mount point | |
| mkdir -p $REMOTE_DIR | |
| sshfs $SSH_USER:$DOCUMENT_ROOT $REMOTE_DIR -o workaround=rename -o defer_permissions -o IdentityFile=$SSH_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/zsh | |
| COMPRESSOR=$(whence -p yui-compressor) | |
| [ -z $COMPRESSOR ] && exit 0; | |
| function _compress { | |
| local fname=$1:t | |
| local dest_path=$1:h | |
| local min_fname="$dest_path/${fname:r}.min.${fname:e}" | |
| $COMPRESSOR $1 > $min_fname |