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
This file contains hidden or 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
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.6 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter | |
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs |
This file contains hidden or 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/sh | |
# circle.ci parallelism appends the subset of files to run in the container | |
# to the end of the test command. phpunit does not automatically parse files | |
# appended to the argument like this: | |
# | |
# phpunit --some-args 'testSomething1.php' 'testSomething2.php' | |
# | |
# this script parses arguments and individually dispatches calls to phpunit | |
# |
This file contains hidden or 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
<?php | |
$rot128 = function (string $input) { | |
foreach (str_split($input) as $i => $a) { | |
$input[$i] = chr((ord($a) + 128) % 256); | |
} | |
return $input; | |
}; |
This file contains hidden or 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
<?php | |
static $words = [ | |
'also', | |
'area', | |
'away', | |
'back', | |
'bank', | |
'base', | |
'bash', |
This file contains hidden or 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
apt install -y nload htop iotop tcptrack dstat multitail nmap hping3 |
This file contains hidden or 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 php | |
<?php | |
# read blog posting about this snippet | |
# https://... | |
if (!isset($argv[1])) { | |
exit(1); | |
} |
This file contains hidden or 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
<?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]); |
This file contains hidden or 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
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 |
Create a docker based PiHole server that writes only to memory.
Features
- fully supports ipv6
- portable and private dns server
- no sensitive data written to disk
- uses cloudflare doh as upstream dns source
Steps
- tweak and save the docker-compose.yml file
OlderNewer