| <?php declare(strict_types=1); | |
| // In reaction to @marcoshuttle's http://marcosh.github.io/post/2017/06/16/maybe-in-php.html | |
| // Warning: none of this code has been tested or even run. | |
| namespace Verraes\Maybe; | |
| interface Just extends Maybe { | |
| // We can only extract if we know it's a Just |
| package main | |
| import ( | |
| "reflect" | |
| "fmt" | |
| ) | |
| type Cloneable interface { | |
| Clone(inter interface{}) interface{} | |
| } |
bastion ~ # docker run -ti --rm --name=curl --volume=/var/run/docker.sock:/var/run/docker.sock:rw docker sh
/ # apk --update add curl jq
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/6) Installing nghttp2-libs (1.35.1-r0)
(2/6) Installing libssh2 (1.8.2-r0)
(3/6) Installing libcurl (7.64.0-r1)
(4/6) Installing curl (7.64.0-r1)| #!/usr/bin/env bash | |
| NODESAPI=/api/v1/nodes | |
| function getNodes() { | |
| kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name' | |
| } | |
| function getPVCs() { | |
| jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ |
| #!/bin/bash | |
| ## | |
| # Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes) | |
| # | |
| # Author: Markus Geiger <mg@evolution515.net> | |
| # Last revised 2019-09-11 | |
| # | |
| # ATTENTION! TO BE REFACTORED! FIRST DRAFT! | |
| # |
| # ------------------------------------------------ | |
| # Config files are located in /etc/wireguard/wg0 | |
| # ------------------------------------------------ | |
| # ---------- Server Config ---------- | |
| [Interface] | |
| Address = 10.10.0.1/24 # IPV4 CIDR | |
| Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
| PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
| PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
You don't need a Mac to do this :-)
For generating PKPass files, you'll need 4 things after this tutorial:
- Certificate Identifier (pass.com.example.www)
- Team Identified (Organizational Unit (OU) in the cert generated by Apple)
- The .p12 file
- The password for the .p12 file
In this document, I will explain how to upgrade the default systemd version from 237 to 242.
The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.
Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze that is used by lynis to detect if existing systemd services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.
You can try it once you've installed the version 242 of systemd that way:
| ##### 使用说明 ##### | |
| # 1. 请填写 proxy-providers - subscribe - url 为订阅链接 | |
| # 2. 下载 https://github.com/Loyalsoldier/clash-rules/archive/refs/heads/release.zip 并解压至 ./profiles/ruleset 文件夹下 | |
| # 3. 若需要自动更新 ruleset, 请编辑 rule-providers-config - type 为 http | |
| ##### 参考链接 ##### | |
| # 1. clash 样例配置文件 | |
| # https://lancellc.gitbook.io/clash/clash-config-file/an-example-configuration-file | |
| # 2. clash 规则集 | |
| # https://github.com/Loyalsoldier/clash-rules |