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 bash | |
set -e | |
HOST=${HOST:-'http://localhost:9001'} | |
COOKIE='/tmp/curl_s3_cookie' | |
DEFAULT_BUCKET=${DEFAULT_BUCKET:-''} | |
ACCESS_KEY_ID=${MINIO_ROOT_USER:-''} | |
SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD:-''} |
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 | |
set -e | |
IPTABLES=/usr/sbin/iptables | |
IPTABLES_SAVE=/usr/sbin/iptables-save | |
VIRT_NAME=${1} | |
VIRT_STATUS=${2} | |
function portForwarding() { |
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 | |
iptables -t mangle -N DROP_PRIVATE | |
iptables -t mangle -A DROP_PRIVATE -d 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,100.64.0.0/10,169.254.0.0/16 -j DROP | |
iptables -t mangle -A POSTROUTING -o br0 -j DROP_PRIVATE |
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 bash | |
newHostname=$1 | |
if [[ "$newHostname" == "" ]]; | |
then | |
echo "Please set 1 parameter" | |
echo "$0 hostname" | |
exit 1 | |
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
#!/usr/bin/env php | |
<?php | |
declare(strict_types=1); | |
/** | |
* Created by PhpStorm. | |
* User: dmitry | |
* Date: 11.11.18 | |
* Time: 20:41. | |
*/ |
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 | |
ZabbixServer=127.0.0.1 | |
ServersName=$(hostname) | |
apt install zabbix-agent | |
sed -i \ | |
-e 's/^.*StartAgents=.*$/StartAgents=0/' \ | |
-e 's/^Server=.*$/Server='${ZabbixServer}'/' \ | |
-e 's/^ServerActive=.*$/ServerActive='${ZabbixServer}'/' \ |
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 | |
apt update && apt install wget htop curl nano ssh -y | |
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb | |
dpkg -i zabbix-release_3.2-1+xenial_all.deb && apt-get update | |
export DEBIAN_FRONTEND=noninteractive | |
apt install zabbix-server-mysql zabbix-frontend-php -y |
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 | |
if(!array_key_exists(1, $argv)) exit(); | |
$appid = (int) $argv[1]; | |
$version = (int) preg_replace("/[^0-9]+/","",$argv[2]); | |
$url = "http://api.steampowered.com/isteamapps/uptodatecheck/v0001?appid=$appid&version=$version"; | |
$data = file_get_contents($url); |
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 | |
UT_URL='http://download.ap.bittorrent.com/track/beta/endpoint/utserver/os/linux-x64-ubuntu-12-04' | |
UT_USER='utorrent' | |
CONTACT='[email protected]' | |
crontab=/var/spool/cron/crontabs/$UT_USER | |
if [ -z "$(which curl)" ]; then | |
echo Eroor: is not curl. | |
echo apt install curl |