Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1
#!/bin/bash | |
# curl -sL https://gist.githubusercontent.com/RichardBronosky/31660eb4b0f0ba5e673b9bc3c9148a70/raw/touchid_sudo.sh | bash | |
# This script is ready to copy-paste in whole, or just the line above (without the leading #) | |
# Use TouchID for sudo on modern MacBook Pro machines | |
# This script adds a single line to the top of the PAM configuration for sudo | |
# See: https://apple.stackexchange.com/q/259093/41827 for more info. | |
touchid_sudo(){ |
Netcat is like a swiss army knife for geeks. It can be used for just about anything involving TCP or UDP. One of its most practical uses is to transfer files. Non *nix people usually don't have SSH setup, and it is much faster to transfer stuff with netcat then setup SSH. netcat is just a single executable, and works across all platforms (Windows,Mac OS X, Linux).
On the receiving (destination) terminal, run:
nc -l -p 1234 > out.file
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
# For recent versions of Ubuntu: | |
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ | |
# Docs: | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference | |
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | |
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53 | |
# Download ISO Installer: |
#!/bin/bash | |
# Purpose | |
# grab the jwt token | |
# make API calls as the GitHub App used | |
# get a temporary jwt token from the key file and app id (hardcoded in the file:) | |
generated_jwt=$(./github-app-jwt.sh) | |
github_api_url="https://api.github.com/app" |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Chat</title> | |
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'> | |
<link href="style.css" rel="stylesheet" type="text/css"> | |
<script src="https://d2g2wobxbkulb1.cloudfront.net/0.0.19/tmi.js"></script> <!--For developement--> | |
<!--<script src="https://d2g2wobxbkulb1.cloudfront.net/0.0.19/tmi.min.js"></script>--> <!--For "production"--> | |
</head> |
This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.
Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).
So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a
# Generate a BaseSystem.dmg with 10.13 Install Packages | |
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/highsierra/ | |
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" | |
) |