Docker engine: https://docs.docker.com/engine/install/
Unprivileged user:
# the username corresponds to the User command in service configuration file| <?php | |
| ## Open a temporary SSH port on the HiWiFi/Gee router | |
| ## Tested and effective on HiWiFi/Gee HC5861 (aka HiWiFi 3) | |
| // http://www.4006024680.com/local-ssh/ | |
| $contents = file_get_contents('http://192.168.199.1/local-ssh/api?method=get'); | |
| $result = json_decode($contents, true); | |
| $local_token = $result['data']; |
Docker engine: https://docs.docker.com/engine/install/
Unprivileged user:
# the username corresponds to the User command in service configuration file| <?php | |
| return [ | |
| // 添加对 Mermaid 图表的支持 | |
| (new Flarum\Extend\Formatter) | |
| ->configure(function (\s9e\TextFormatter\Configurator $configurator) { | |
| // 添加 Mermaid 标签 | |
| $configurator->tags->add('MERMAID', [ | |
| 'template' => '<div class="mermaid-container"><pre class="mermaid">{@text}</pre></div>' | |
| ]); |
| <?php | |
| /* | |
| * This file is part of Flarum. | |
| * | |
| * For detailed copyright and license information, please view the | |
| * LICENSE file that was distributed with this source code. | |
| */ | |
| use Flarum\Extend; |
| group1,repo1 | |
| group2,repo2 |
| <?php | |
| if (!function_exists('is_valid_ip')) { | |
| // PHP ≥ 8.0 | |
| function is_valid_ip(string $ip, ?string $type = null): bool | |
| { | |
| return false !== match ($type) { | |
| 'IPv4' => filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4), | |
| 'IPv6' => filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6), | |
| default => filter_var($ip, FILTER_VALIDATE_IP), |
| <?php | |
| if (!function_exists('arr_sum')) { | |
| /** | |
| * Replacement with bc math function for internal array_sum | |
| * | |
| * @param array $arr | |
| * @param int $scale | |
| * | |
| * @return mixed |
| <?php | |
| if (!function_exists('random_str')) { | |
| /** | |
| * Generate specific length random string | |
| * | |
| * @param $len | |
| * @param $special | |
| * @return string | |
| */ |
| # /run/systemd/generator/www.mount | |
| # Automatically generated by systemd-fstab-generator | |
| [Unit] | |
| SourcePath=/etc/fstab | |
| Documentation=man:fstab(5) man:systemd-fstab-generator(8) | |
| Before=local-fs.target | |
| [Mount] | |
| What=/dev/sdb1 |
Debian ≥ 10, Ubuntu ≥ 18, CentOS ≥ 7,
Others
Refs: