Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active December 16, 2016 20:11
Show Gist options
  • Save mallendeo/14d81d29490923da1df3ad2b09efbc0e to your computer and use it in GitHub Desktop.
Save mallendeo/14d81d29490923da1df3ad2b09efbc0e to your computer and use it in GitHub Desktop.
Fish functions collection
function sshtmux
ssh $argv -t 'tmux -CC a || tmux -CC'
end
function flushdns
sudo killall -HUP mDNSResponder
end
function tgfiles --description "tgfiles - will toggle hidden files and folders"
set showFiles "YES"
if test (command defaults read com.apple.finder AppleShowAllFiles) = YES
set showFiles "NO"
end
command defaults write com.apple.finder AppleShowAllFiles $showFiles
command killall Finder
end
# https://news.ycombinator.com/item?id=13193172
function sleepsafe
sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25
end
function sleepfast
sudo pmset -a hibernatemode 0
end
function sleepdefault
sudo pmset -a hibernatemode 3
end
# save function
funcsave functionname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment