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 | |
const PATTERN_LINK = '/^(?<index>\d+):\s+(?<device>[\w\-]+).+state (?<state>UNKNOWN|UP|DOWN).+link\/(loopback|ether) (?<address>[a-z0-9\:]+)/'; | |
const PATTERN_IPv4 = '/^(?<index>\d+):\s*(?<device>[\w\-]+)\s+inet (?<ipv4>[0-9\.\/]+)/'; | |
const PATTERN_IPv6 = '/^(?<index>\d+):\s*(?<device>[\w\-]+)\s+inet6 (?<ipv6>[a-z0-9\:\/]+)/'; | |
$interfaces = []; | |
$result = shell_exec('ip -o link show'); | |
$rows = explode(PHP_EOL, $result); |
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
#!/usr/bin/env bash | |
if [ "$7" = "true" ] | |
then configureXhgui=" | |
location /xhgui { | |
try_files \$uri \$uri/ /xhgui/index.php?\$args; | |
} | |
" | |
else configureXhgui="" | |
fi |
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 OCA\ServerInfo\Resources; | |
class Memory { | |
public $memTotal = -1; | |
public $memFree = -1; | |
public $memAvailable = -1; | |
public $swapTotal = -1; | |
public $swapFree = -1; |
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 | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$stream = | |
$client = new GuzzleHttp\Client([ | |
//'handler' => new \GuzzleHttp\Handler\CurlHandler(), // body size: 0 | |
'handler' => new \GuzzleHttp\Handler\StreamHandler(), // body size: 25965 | |
]); |
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
Index: lib/private/TemplateLayout.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- lib/private/TemplateLayout.php (revision 4f2837017c95f063d99a05b6cd6a5e73ac388d75) | |
+++ lib/private/TemplateLayout.php (date 1574544614260) | |
@@ -48,6 +48,8 @@ | |
class TemplateLayout extends \OC_Template { | |