Example of a Docker bind mount.
Create an example directory and copy the following script to it. Make it executable and then run it.
$ chmod +x demo.sh
$ ./demo.sh
.
.
.
Example of a Docker bind mount.
Create an example directory and copy the following script to it. Make it executable and then run it.
$ chmod +x demo.sh
$ ./demo.sh
.
.
.
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi |
#!/bin/sh | |
strip_trailing_slashes() { | |
printf "$1" | sed 's/[/]*$//' | |
} | |
# If empty arg, return . | |
# If nothing but slashes, return / | |
# If no slashes after stripping all trailing slashes, return . | |
# Otherwise, return everything up until last path component |
#!/bin/sh | |
# Dependencies: sed, grep | |
# | |
# Usage: unjar FILE [DEST] | |
# | |
# - DEST must not already exist (won't overwrite existing contents); | |
# path to DEST will be created. | |
# TODO: add overwrite option | |
# | |
# - If DEST is not provided, defaults to a subdirectory in the current |
For example, on macOS you can use a Homebrew formula:
brew install plantuml
If plantuml
fails to install, check the output for any missing formulae. For example, you may
need to run the following before installing plantuml
will succeed:
#!/bin/bash | |
VERSION="$1" | |
CHANNEL="${CHANNEL:-dev}" | |
PLATFORM="${PLATFORM:-macos}" | |
ARCH="${ARCH:-x64}" | |
BASEURL="https://storage.googleapis.com/dart-archive/channels" | |
DARTSDK="dartsdk-$PLATFORM-$ARCH-release.zip" | |
DARTDOCS="dartdocs-gen-api.zip" |
FROM google/dart | |
RUN \ | |
groupadd --system dart && \ | |
useradd --system --no-log-init --create-home --home /home/dart -g dart dart | |
WORKDIR /app | |
RUN chown dart:dart /app && chmod 775 /app | |
USER dart |
# This file is meant to be sourced into your shell for the Anthos Sample Deployment tutorial, ex: | |
# $ source init-anthos-tutorial.env | |
function info() { | |
printf "$1\n" | |
} | |
function warn() { | |
info $1 | |
} |
package testhelper | |
import ( | |
"path" | |
"reflect" | |
"runtime" | |
"strings" | |
) | |
// GetFileFunc takes a function and returns a string formatted as | |
// "basedir/filename/function" to make it easier to identify the |