#!/bin/sh | |
# Source: https://get.docker.com/ | |
command_exists() { | |
command -v "$@" > /dev/null 2>&1 | |
} | |
sh_c='sh -c' | |
if [ "$user" != 'root' ]; then | |
if command_exists sudo; then |
$ sudo apt-get update && sudo apt-get upgrade -yf && sudo apt-get dist-upgrade -yf
$ sudo apt-get install -yf update-manager-core
$ sudo do-release-upgrade
#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep [email protected] || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.
It's currently synchronized with my .vimrc
config except for a block of neovim-specific terminal key mappings.
This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.
These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,
How to import and indicate empty request or reply messages:
import "google/protobuf/empty.proto";
service SomeService {
rpc SomeOperation (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
It's easy enough to set up your machine as a swarm manager for local development on a single node swarm. But how about setting up multiple local nodes using Docker Machine in case you want to simulate a multiple node environment (maybe to test HA features)?
The following script demonstrates a simple way to specify the number of manager and worker nodes you want and then bootstrap a swarm.
You can also check out the sample as a Github project here.
Go has excellent build tools that mitigate the need for using make
.
For example, go install
won't update the target unless it's older
than the source files.
However, a Makefile can be convenient for wrapping Go commands with
specific build targets that simplify usage on the command line.
Since most of the targets are "phony", it's up to you to weigh the
pros and cons of having a dependency on make
versus using a shell
script. For the simplicity of being able to specify targets that
can be chained and can take advantage of make
's chained targets,