This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# === INFO === | |
# altnetworking.sh | |
# Description: Run the specified application in a custom networking environment. | |
# Uses cgroups to run process(es) in a network environment of your own choosing (within limits!) | |
VERSION="0.2.0" | |
# Author: John Clark | |
# adapted for cgroups v2 by Anselm Kruis | |
# Requirements: Debian 11 bullseye |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[[ $EUID -ne 0 ]] && exec sudo $0 -- $@ | |
set -e | |
command=${2:-help} | |
port=${3:-1024} | |
CHNROUTE_FILE="`dirname "$0"`/chnroute.txt" | |
IGNORE_FILE="`dirname "$0"`/ignore.txt" |
- Install qemu-user-static (
yay -S qemu-user-static
).- This might need you to install
pcre-static
and update PGP keys (follow the tips in the comments here).
- This might need you to install
- If not already present, install
systemd-binfmt
, the revamped version ofbinfmt-support
tools- Your system has to support transparent Qemu user emulation, but fortunately, that is mostly enabled once the steps here have been followed.
- Check the status of the
systemd-binfmt
unit (systemctl status systemd-binfmt
) and (re)start if needed (sudo systemctl restart systemd-binfmt
)- This unit has ARM support by default, but check the current documentation to make install it if needed
- Mount the root partition of the ARM system into a folder (for e.g.,
sudo mount /dev/sdb2 arm_mountpoint
) - Copy the QEMU ARM static binary (
/usr/bin/qemu-arm-static
on my distro) to the mounted root directory'susr/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
traefik: | |
restart: unless-stopped | |
image: traefik:v2.0.2 | |
ports: | |
- "80:80" | |
- "443:443" | |
labels: | |
- "traefik.http.services.traefik.loadbalancer.server.port=8080" |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❱ git config user.signingKey 38AF394C | |
❱ git config commit.gpgSign true | |
❱ echo "test" | gpg --clearsign | |
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
test | |
gpg: signing failed: Inappropriate ioctl for device | |
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dracula Theme for Consoles | |
# | |
# Console colors are set by the `setvtrgb` command which takes as argument a | |
# file of exactly three lines of text. These lines are the 0..255 values for | |
# | |
# red: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white | |
# grn: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white | |
# blu: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white | |
# | |
# Needless to say, this is a very annoying format. Here are the values for |
NewerOlder