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
using BITS = BITSReference1_5; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ | |
class BISTJobObject | |
{ | |
static BITS.BackgroundCopyManager1_5 BITSManager; | |
static BITS.GUID JobGUID; |
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
yum groupinstall "Development Tools" -y | |
yum install gcc glibc glibc-common gd gd-devel openssl -y | |
yum install glibc-devel glibc-headers kernel-headers kernel-devel gnutls-devel -y | |
cd /opt | |
wget https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz | |
./configure | |
make | |
cd src/ | |
cp wget /usr/bin/wget | |
cd ~/ |
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
@ECHO OFF | |
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -nologo -noProfile -NonInteractive -ExecutionPolicy bypass -File \\domain.com\sysvol\domain.com\Policies\{000000000000000000}\USER\Scripts\Logon\slack-auth.ps1 |
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
$out = 'Info: '+ (whoami) + ' logged into ' + (hostname) | |
$body = @( | |
@{ | |
text = $out | |
} | |
) | |
$JSON = $body | ConvertTo-Json | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-RestMethod -Uri "[Webhook URL]" -Method Post -Body $JSON -ContentType "application/json" |
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 | |
for value in arpwatch dhcpd dpinger ntpd openvpn syslogd unbound | |
do | |
pfSsh.php playback svc status $value | grep stopped | |
if [ $? -eq 0 ] | |
then | |
out="Important alert from "`hostname`": service $value is down!" | |
echo $out | |
curl -X POST -H 'Content-type: application/json' [Webhook URL] --data "{\"text\": \"${out}\"}" | |
fi |
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/bash | |
echo "deb http://httpredir.debian.org/debian stretch-backports main" | sudo tee -a /etc/apt/sources.list.d/stretch-backports.list | |
apt-get update | |
cd /tmp | |
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add - | |
echo 'deb https://debian.neo4j.com stable 4.0' > /etc/apt/sources.list.d/neo4j.list | |
apt update -y | |
apt install apt-transport-https -y | |
apt install neo4j -y | |
cd /usr/bin |
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
# Install Homebrew on Mac | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install packer | |
brew install packer | |
# Set packer's env variables | |
echo " | |
export PACKER_PLUGIN_PATH="~/.packer.d/plugins" | |
export PACKER_CONFIG_DIR="~/.packer.d" | |
" >> ~/.zshrc |
NewerOlder