This file contains 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
$ sudo apt install cmatrix | |
$ vim ~/.bash_aliases | |
... | |
alias matrix="tmux new-session\; split-window -h -p 13\; select-pane -t 0\; split-window -h -p 85\; select-pane -t 1\; split-window -v -p 25\; select-pane -t 0\; send-keys 'cmatrix -u 9' C-m\; select-pane -t 3\; send-keys 'cmatrix -u 9' C-m\; select-pane -t 2\; send-keys 'dcu' C-m\; select-pane -t 1\;" | |
... | |
$ source ~/.bash_aliases | |
$ matrix |
This file contains 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 | |
if [[ "$EUID" = 0 ]]; then | |
echo "Do not run this script as root" | |
exit 0 | |
else | |
sudo -k | |
if sudo true; then | |
sudo service apache2 stop | |
cd /var/www/ | |
source venv/bin/activate 2>&1 |