How to fix skewed system times on multiple vagrant instances π»
Set current date of darwin/osx on all local vagrant instances:
date | pbcopy && vagrant status | grep running | awk '{print $1}' | xargs -I {} vagrant ssh {} -c "sudo date --s \"$(pbpaste)\""
Set current date of darwin/osx on all vagrant instances:
date | pbcopy && vagrant global-status | grep running | awk '{print $1}' | xargs -I {} vagrant ssh {} -c "sudo date --s \"$(pbpaste)\""
The alias I set for myself looks like this:
alias fix_vagrant_dates="date | pbcopy && vagrant global-status | grep -v 'not running' | grep running | grep virtualbox | awk '{print \$1}' | xargs -P 9001 -I {} vagrant ssh {} -c \"sudo date --s \\\"\$(pbpaste)\\\"\" >& /dev/null"
Fake pbcopy/pbpaste via x windows:
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
Fake pbcopy/pbpaste via xclip:
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
Max of 10 processes in parallel, without needlessly using pbcopy/pbaste (should work on GNU/Linux like that):