package main | |
import ( | |
"bytes" | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
NB: The following is only of interest if you want to share the host network with your virtual machine. The most common way this gets implemented is by setting up a bridge which includes the physical interface. Using a [MACVTAP] inerface is suposed to be more efficient, since it avoids the additional bridge in the network setup.
In this gist, we extend the information provided in the documenation on linux virtual interfaces.
In the following, we assume you host interface is eth0
. IP addresses used:
- host: 198.51.100.50/24
- virtual machine: 198.51.100.198/24
- default gateway: 198.51.100.254
[alias] | |
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads | |
- macOS 10.15.5
- tmux 3.1b
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color
, use screen-256color
which comes with system. Place this command into ~/.tmux.conf
or ~/.config/tmux/tmux.conf
(for version 3.1 and later):
{ | |
"background" : "#1d2021", | |
"black" : "#665C54", | |
"blue" : "#7DAEA3", | |
"brightBlack" : "#928374", | |
"brightBlue" : "#7DAEA3", | |
"brightCyan" : "#89B482", | |
"brightGreen" : "#A9B665", | |
"brightPurple" : "#D3869B", | |
"brightRed" : "#EA6962", |
Neovim and Vim both come bundled with a standard plugin called Netrw. Netrw acts a file explorer (similar to NERDTree), but more importantly has the ability to work with scp (as well as sftp, rcp, ftp, and lots of others :h netrw-nread
) to let you edit files and browse directories that are hosted on a remote machine, inside of your local Vim instance.
This is useful since you are able to use your Vim setup and plugins without copying over your dotfiles to the remote machine. As well, since the file is copied to your local machine, there will be no delay when typing.
This is optional for Vim, but required for Neovim (check this Neovim issue explaining why).