Skip to content

Instantly share code, notes, and snippets.

@aasutossh
Forked from ricardoboss/config.fish
Created August 22, 2021 05:16
Show Gist options
  • Save aasutossh/94665c51dd8602f85c46e57dd9f1f027 to your computer and use it in GitHub Desktop.
Save aasutossh/94665c51dd8602f85c46e57dd9f1f027 to your computer and use it in GitHub Desktop.
~/.config/fish/config.fish
# Path to Oh My Fish install.
set -q XDG_DATA_HOME
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
or set -gx OMF_PATH "$HOME/.local/share/omf"
# Load Oh My Fish configuration.
source $OMF_PATH/init.fish
# Administration
alias ll="ls -aFl"
alias journal="sudo journalctl -ex --no-hostname"
alias dropcache="sudo sync; sudo echo 3 > /proc/sys/vm/drop_caches"
# Command shortcuts
alias npmg="sudo npm -g"
alias cmd="cmd.exe"
alias cmdc="cmd.exe /c"
alias dock="sudo docker"
alias explore="explorer.exe ."
# Laravel
alias art="php artisan"
alias aro="php artisan optimize:clear"
alias ard="php artisan down"
alias aru="php artisan up"
alias arm="php artisan migrate"
alias arf="php artisan migrate:fresh --seed"
alias ars="php artisan db:seed"
alias arl="tail -f storage/logs/*"
# Git
alias gs="git status"
alias pull="git pull"
alias push="git push"
alias fetch="git fetch"
alias ga="git add"
alias gc="git commit -m"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
# Caddy Functions
function cadensite -a hostname -d "Enable a website in caddy"
echo -e "Enabling host $argv..."
sudo ln -s /etc/caddy/vhosts.available/$argv.host /etc/caddy/vhosts/$argv.host
echo "Reloading caddy..."
sudo systemctl reload caddy
end
function caddissite -a hostname -d "Disable a website in caddy"
echo -e "Disabling host $argv..."
sudo rm /etc/caddy/vhosts.available/$argv.host
echo "Reloading caddy..."
sudo systemctl reload caddy
end
# Fuck
thefuck --alias | source
# Environment variables
set -x GPG_TTY (tty)
set -gx PATH $HOME/.local/bin $PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment