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/bash | |
who -b | |
last reboot | less | |
last reboot | head -1 | |
last -x|grep shutdown | head -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 | |
/** | |
* LDAP Auth Handler | |
*/ | |
class LdapAuth | |
{ | |
/** | |
* @var false|resource | |
*/ | |
private $handle; |
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/bash | |
docker stop portainer | |
docker rm portainer | |
docker pull portainer/portainer-ce:2.14.0 | |
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v portainer_data:/data \ | |
portainer/portainer-ce:2.14.0 |
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
cd /opt | |
mv observium observium_old | |
wget -Oobservium-community-latest.tar.gz https://www.observium.org/observium-community-latest.tar.gz | |
tar zxvf observium-community-latest.tar.gz | |
mv /opt/observium_old/rrd observium/ | |
mv /opt/observium_old/logs observium/ | |
cp /opt/observium_old/config.php observium/ | |
/opt/observium/discovery.php -u |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!--suppress XmlUnboundNsPrefix, XmlUnboundNsPrefix --> | |
<ruleset name="overview"> | |
<description>overview</description> | |
<rule ref="Generic.Classes.DuplicateClassName"/> | |
<rule ref="Generic.CodeAnalysis.EmptyStatement"/> | |
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/> | |
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/> | |
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/> | |
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/> |
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
@echo off | |
:: BatchGotAdmin | |
:------------------------------------- | |
REM --> Check for permissions | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
REM --> If error flag set, we do not have admin. | |
if '%errorlevel%' NEQ '0' ( | |
echo Requesting administrative privileges... |
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
LoadModule auth_ntlm_module modules/mod_authn_ntlm.so | |
<Location /auth> | |
#AllowOverride None | |
AuthName "Private location" | |
AuthType SSPI | |
NTLMAuth On | |
NTLMAuthoritative On | |
<RequireAll> | |
<RequireAny> | |
Require valid-user |
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 | |
//Cloudflare IP Reset | |
//See if ip fits in IP range | |
function ip_in_network($ip, $net_addr, $net_mask){ | |
if($net_mask <= 0){ return false; } | |
$ip_binary_string = sprintf("%032b",ip2long($ip)); | |
$net_binary_string = sprintf("%032b",ip2long($net_addr)); | |
return (substr_compare($ip_binary_string,$net_binary_string,0,$net_mask) === 0); | |
} | |
//See if the "Cloudflare IP" is really a cloudflare IP |
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
/* | |
* smc_read.c: Written for Mac OS X 10.5. Compile as follows: | |
* | |
* gcc -Wall -o smc_read smc_read.c -framework IOKit | |
*/ | |
#include <stdio.h> | |
#include <IOKit/IOKitLib.h> |
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 | |
$output = "# changelog\n\n"; | |
$previousTag = 0; | |
$gitTags = shell_exec("git tag --sort=-creatordate"); | |
$gitTagsArray = explode("\n", $gitTags); | |
foreach ($gitTagsArray as $gitTag) { |