I hereby claim:
- I am cb0 on github.
- I am cb0 (https://keybase.io/cb0) on keybase.
- I have a public key whose fingerprint is 9FAD 9F16 6F87 71C3 42C6 DE38 6B8C 0D2A 4435 7A9C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#vagrant helper functions for brining up and shutting down the machines | |
#deps: - vagrant (of course) | |
- jq - Command-line JSON processor | |
- fzf - command-line fuzzy finder | |
#`vagrant_list` as helper function to get a list of all machines | |
vagrant_list () { | |
tmp=$(cat ~/.vagrant.d/data/machine-index/index | jq '.machines[] | {name, vagrantfile_path, state}' | jq '.name + "," + .state + "," + .vagrantfile_path'| sed 's/^"\(.*\)"$/\1/'| column -s, -t | sort -rk 2 | fzf ) | |
echo $tmp | awk '{ print $1 }' | |
} |
#block other user from using [s|p]trace on your code | |
> ./somecommand & | |
> sudo strace $(echo $!) > /dev/null & | |
Now another user cannot strace the proess. | |
One would need to stop and restart the process which could easily be detected with other methods. |
##AUTHOR: M. Puchalla | |
##SHORT DESC: possible non-critical ssh bug that is related to ssh alias (~/.config) file. | |
##FULL DESCRIPTION: | |
1. Connect to host where host key is not know. | |
e.g. ssh test.localhost #(redirects to vagrant machine) | |
2. Answer first question with "yes", enter new password, connect to host |
git log --no-notes --pretty=format:"%an %ae" --follow FILENAME |
#taken from https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck | |
config.vm.provider "virtualbox" do |v| | |
host = RbConfig::CONFIG['host_os'] | |
# Give VM 1/4 system memory & access to all cpu cores on the host | |
if host =~ /darwin/ | |
cpus = `sysctl -n hw.ncpu`.to_i | |
# sysctl returns Bytes and we need to convert to MB | |
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4 |