Last active
December 16, 2016 20:11
-
-
Save mallendeo/14d81d29490923da1df3ad2b09efbc0e to your computer and use it in GitHub Desktop.
Fish functions collection
This file contains hidden or 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
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