Skip to content

Instantly share code, notes, and snippets.

@borcean
Created September 1, 2016 22:30
Show Gist options
  • Save borcean/d069cda6d656ee188d3a0d7383323eda to your computer and use it in GitHub Desktop.
Save borcean/d069cda6d656ee188d3a0d7383323eda to your computer and use it in GitHub Desktop.
Put these in ~/.config/fish/functions and reload your shell
function ff
ping -c 1 -W 10 10.2.0.1 >/dev/null
if test $status -eq 0
ssh -q -t fir.osuosl.bak "sudo view /root/.../firfile"
else
echo "VPN not connected..."
end
end
function fsh
ping -c 1 -W 10 10.2.0.1 >/dev/null
if test $status -eq 0
ssh -q -t fir.osuosl.bak "sudo bash -i -c \"ssh -qA $argv\""
else
echo "VPN not connected..."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment