The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.
Install the following packages, which are good to have installed:
| FROM debian:stable-slim | |
| RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list | |
| RUN apt-get update && apt-get install -y unzip expect | |
| WORKDIR /gfriends | |
| COPY ./Gfriends-Inputer-ubuntu-latest.zip /gfriends/ | |
| RUN unzip Gfriends-Inputer-ubuntu-latest.zip \ | |
| && mv Gfriends\ Inputer gfriends-inputer \ |
| #!/usr/bin/bash | |
| # Start docker daemon in background | |
| nohup dockerd-rootless.sh --experimental --storage-driver vfs >| dockerd.log 2>&1 & | |
| # Save the process ID so we can kill it later | |
| echo $! > dockerd.pid | |
This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.
- Windows 10 Home
- Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2)
- Build Vim with the clipboard option enabled
- Set up VcXsrv Windows X Server
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
| Add the following in .zshrc: | |
| ... | |
| plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
| ... | |
| ### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
- Caddyfile
- config.json
- docker-compose.yml
Client side contents:
| #!/bin/bash | |
| for port in {1..9999}; do | |
| echo -n "TCP $port: " | |
| result=$(nc "$1" "$port" -w 1 2>&1 < /dev/null) | |
| if [ "$?" -eq 0 ]; then | |
| echo "Open" | |
| continue | |
| fi | |
| if [[ "$result" == *refused* ]]; then |
