Create zpool with initial vdev
zpool create poolX mirror /dev/sdY /dev/sdZ
Add vdev to zpool
zpool add poolX mirror /dev/sdY /dev/sdZ
$fn = function ($fn) { | |
dispatch(fn() => $fn($fn)); | |
dispatch(fn() => $fn($fn)); | |
}; | |
dispatch(fn() => $fn($fn)); |
Create a docker based PiHole server that writes only to memory.
Features
Steps
config.vm.provision "shell" do |s| | |
s.name = "Install oh-my-zsh" | |
s.privileged = false | |
s.inline = <<-SHELL | |
sudo apt install -y zsh | |
wget -O ~/.zshrc https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/templates/zshrc.zsh-template | |
sudo chsh -s /bin/zsh vagrant | |
SHELL | |
end |
<?php | |
function array_shuffle_secure(array $input): array { | |
$output = []; | |
while ($arr) { | |
$arr = array_values($arr); | |
$char = random_int(0, count($arr) - 1); | |
$output[] = $arr[$char]; | |
unset($arr[$char]); |
apt install wireguard
echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/99-wireguard.conf
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey
sysctl --system
wg-quick up wg0
systemctl enable wg-quick@wg0
#!/usr/bin/env php | |
<?php | |
# read blog posting about this snippet | |
# https://... | |
if (!isset($argv[1])) { | |
exit(1); | |
} |
apt install -y nload htop iotop tcptrack dstat multitail nmap hping3 |
<?php | |
static $words = [ | |
'also', | |
'area', | |
'away', | |
'back', | |
'bank', | |
'base', | |
'bash', |
<?php | |
$rot128 = function (string $input) { | |
foreach (str_split($input) as $i => $a) { | |
$input[$i] = chr((ord($a) + 128) % 256); | |
} | |
return $input; | |
}; |