Skip to content

Instantly share code, notes, and snippets.

View sevenearths's full-sized avatar
🤖
Building stuff

Robert Johnstone sevenearths

🤖
Building stuff
View GitHub Profile
@sevenearths
sevenearths / terminal.sh
Created June 19, 2020 09:22
Making your terminal look cool
$ 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
@sevenearths
sevenearths / production_update.sh
Last active May 12, 2020 09:03
A script for helping update a Django (https://www.djangoproject.com/) site
#!/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