This file contains 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/env bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# todo: pass email as argument, then this can also run regularly as cronjob to generate reports each serverino | |
# set bash settings |
This file contains 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/env bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
FILE_PATH=/tmp/server-information.md | |
touch $FILE_PATH |
This file contains 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 | |
// Prepare data | |
$input = [ | |
['type' => 'order_2', 'date' => new DateTimeImmutable('+2 days')], | |
['type' => 'order_3', 'date' => new DateTimeImmutable('+3 days')], | |
['type' => 'order_1', 'date' => new DateTimeImmutable('+1 days')], | |
['type' => 'order_7', 'date' => new DateTimeImmutable('+8 days')], | |
['type' => 'always_after_2', 'date' => new DateTimeImmutable('+105 days')], |
This file contains 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 | |
include_once ('wp-admin/includes/plugin.php'); | |
echo "<pre>"; | |
echo "Name;URL;Version;" . PHP_EOL; | |
foreach (get_plugins() as $plugin) { | |
echo $plugin['Name'] . ';'; | |
echo $plugin['PluginURI'] . ';'; | |
echo $plugin['Version'] . ';' . PHP_EOL; | |
} | |
echo "</code>"; |
This file contains 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
// for velocity template (setters/getters) | |
#set( $longTypeHint = "$SCALAR_TYPE_HINT" ) | |
#set( $longTypeHint = $longTypeHint.replace("?", "null|") ) |
This file contains 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 | |
// I know this is very ugly, but good enough for my use case. | |
// this is highly dependent on fonts from https://gwfh.mranftl.com/fonts/ because of the file names. | |
$files = glob(__DIR__ . '/fonts/*.woff'); | |
foreach ($files as $file) { | |
$baseDirectory = pathinfo($file, PATHINFO_DIRNAME); | |
$fileName = basename($file); |
This file contains 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 | |
namespace Dennzo\IPRestriction; | |
use Psr\Log\LoggerInterface; | |
/** | |
* Don't forget, this (the logging part) is not GDPR compliant, since the IP is logged fully. | |
* This should only be used for debugging purposes! If used in live environments the logging part should be commented or removed. | |
* |
This file contains 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
:target:before { | |
content: ""; | |
display: none; | |
height: 120px; /* fixed header height*/ | |
margin: -120px 0 0; /* negative fixed header height */ | |
} |
This file contains 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 | |
namespace App\Controller; | |
use InvalidArgumentException; | |
use JMS\Serializer\SerializerInterface; | |
use Psr\Container\ContainerInterface; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
/** |
This file contains 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
LOG_LEVEL=debug |
NewerOlder