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
apply Service "pg-NOW()-check" { | |
check_command = "pgsql" | |
// var db_dict = { "db1" = 5432, "db2" = 5433, "db3" = 5434, "db4" = 5435 } | |
for (db_key => db_value in db_dict) { | |
//need to out into host file | |
vars.pgsql_hostname = host.address | |
vars.pgsql_database = db_key | |
vars.pgsql_port = db_value | |
// monit user & 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
apply ScheduledDowntime "backup-downtime" to Service { | |
author = "icingaadmin" | |
comment = "Scheduled downtime for backup" | |
ranges = { | |
monday = service.vars.backup_downtime | |
tuesday = service.vars.backup_downtime | |
wednesday = service.vars.backup_downtime | |
thursday = service.vars.backup_downtime | |
friday = service.vars.backup_downtime |
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
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
# Keep state. | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# Loop device. | |
-A INPUT -i lo -j ACCEPT |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>titile</title> | |
<meta charset="utf-8"> | |
<style> | |
@keyframes RX { | |
from { transform: rotate(0deg);} | |
to {transform:rotate(10200deg);} | |
} |
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
use app; | |
db.createCollection('rent') | |
db.createCollection('guest') | |
db.guest.insert({ "_id" : ObjectId("5ba24958103b0ac162148f6f"), "name" : "Иванов Иван Иваныч", "floor" : 3, "org" : 2, "cardNo" : 34443, "dateIn" : 20180919, "dateOut" : 20190920 }) | |
db.rent.insert({ "_id" : ObjectId("5ba24a53103b0ac162148f71"), "company" : "Sun", "floor" : 3, "org" : 2 }) | |
db.rent.insert({ "_id" : ObjectId("5ba24a44103b0ac162148f70"), "company" : "Microsoft", "floor" : 2, "org" : 1 }) | |
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 | |
for ($i=1; $i<=10; $i++) { | |
if (($i % 2) == 0) { | |
echo $i." "; | |
} | |
} | |
?> |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title> | |
VCG | |
</title> |
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 | |
// name, damage, durability | |
$weaponSet1 = [ | |
["Sword", 15, 80], | |
["Scythe", 35, 10], | |
["Club", 5, 40], | |
]; | |
$json = json_encode($weaponSet1); |
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
git config --global alias.lg "log --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(green)(%cr) %C(blue)<%an>%Creset' --graph --color --abbrev-commit" |
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
sudo yum install epel-release -y && sudo yum install nginx -y && \ | |
sudo sed -i 's/listen .* 80 .*/listen 8080 default_server;/' /etc/nginx/nginx.conf && \ | |
sudo sh -c "echo `curl -s http://169.254.169.254/latest/meta-data/public-ipv4` > /usr/share/nginx/html/index.html" && \ | |
sudo systemctl restart nginx |