Directories on host machine:
-
/data/certbot/letsencrypt
-
/data/certbot/www
-
Nginx server in docker container
docker run -d --name nginx \
#!/usr/bin/env python | |
# | |
# Generates a PBKDF2 hash for qBittorrent WebUI password. This is useful for setting the password in the config file. | |
# | |
# NOTE: Hashing algorithm must match https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/password.cpp | |
# | |
# Usage: python qbittorrent_hash.py | |
# | |
# Author: Beau Hastings (https://github.com/hastinbe) | |
# Date: 2024-01-09 |
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
#!/bin/bash | |
#================================================= | |
# System Required: :Debian 9+/Ubuntu 18.04+/Centos 7+ | |
# Description: Trojan&V2ray&SSR script | |
# Version: 1.0.0 | |
# Author: Jeannie | |
# Blog: https://jeanniestudio.top/ | |
# Official document: www.v2ray.com | |
#================================================= | |
sh_ver="1.0.0" |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"github.com/gin-gonic/gin" | |
) |
#!/bin/sh | |
echo "Getting the latest version of trojan-go" | |
latest_version="$(curl -s "https://api.github.com/repos/p4gefau1t/trojan-go/releases" | jq '.[0].tag_name' --raw-output)" | |
echo "${latest_version}" | |
trojango_link="https://github.com/p4gefau1t/trojan-go/releases/download/${latest_version}/trojan-go-linux-amd64.zip" | |
mkdir -p "/usr/bin/trojan-go" | |
mkdir -p "/etc/trojan-go" |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/md5" | |
"crypto/rand" | |
"errors" | |
"fmt" | |
"io" |
var fileStorage = { | |
/** | |
* Saves a file on the device | |
* @param {string} name - filename (can include sub folders) | |
* @param {string} data - file contents | |
* @param {boolean} useSandbox - uses protected sandbox if true, otherwise external (default false) | |
* @returns {Promise} executes .then with saved file path as first param | |
*/ | |
write: function (name, data, useSandbox) { |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.
Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.