<?php
require_once ( '/usr/share/php/libphp-phpmailer/autoload.php' ); // Убедитесь в этом пути.
//$mail = new PHPMailer;
$mail = new PHPMailer\PHPMailer\PHPMailer();
//Enable SMTP debugging.
$mail->SMTPDebug = 3;
//Set PHPMailer to use SMTP.
$mail->isSMTP();
//Set SMTP host name
$mail->Host = "smtp.yandex.ru";
//Set this to true if SMTP host requires authentication to send email
$mail->SMTPAuth = true;
//Provide username and password
$mail->Username = "ВАШ_ЯЩИК";
$mail->Password = "ВАШ_ПАРОЛЬ";
$mail->SMTPSecure = "ssl";
//Set TCP port to connect to
$mail->Port = 465;
$mail->From = "ВАШ_ЯЩИК";
$mail->FromName = "пофигу_что_тут";
$mail->addAddress("ЯЩИК_АДРЕСАТА");
$mail->isHTML(true);
$mail->Subject = "Test MAIL 1";
$mail->Body = "<i>from сonsole</i>";
$mail->AltBody = "This is the plain text version of the email content";
if(!$mail->send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent successfully";
}
grep -rl старое_имя_домена /путь/к/каталогу_сайта/
find /путь/к/каталогу_сайта/ -type f -exec sed -i 's/https\:\/\/старое_имя_домена.ru/https\:\/\/новое_имя_домена.ru/g' {} +
exten => 333333,1,Background(/var/lib/asterisk/IVR/my/snegurka)
[dedmoroz_incoming]
exten => 222222,1,Background(/var/lib/asterisk/IVR/my/dedmoroz)
exten => 333333,1,Background(/var/lib/asterisk/IVR/my/snegurka)
1. WordPress is an insecure SMS and the site on WordPress is subject to hacking.
assign [class="smplayer"] $workspace1
for_window [class="smplayer"] focus
mysqldump -u root -p database_name > /home/database_backup.sql
tar -czvf /home/website_catalog.backup /var/www/website_catalog #ну или где он у вас там находится.
tar -czvf /home/nginx_configs /etc/nginx
tar -czvf /home/apache_configs /etc/apache (хотя в будущем можете вместо апача php-fpm).
To get the class and instance, you can use xprop. After clicking on the window, you will see the following output:
xprop:
WM_CLASS(STRING) = "irssi", "URxvt"
The first part of the WM_CLASS is the instance ("irssi" in this example), the second part is the class ("URxvt" in this example).
# Temperature
# Support multiple chips, though lm-sensors.
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
[temperature]
label=TEMP
interval=10
[Unit]
Description=My Script Service
[Service]
WorkingDirectory=/home/dev/myapp
ExecStart=source venv/bin/activate && gunicorn -c gunicorn_config.py run_app:app
Restart=always
RestartSec=30 #перезагрузка сервиса, если вдруг упадет.
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=my-python-app
#Environment=NODE_ENV=production PORT=3080 (это для nodejs, но можете тоже поиграть, если надо).
[Install]
WantedBy=multi-user.target
#! /bin/sh
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -t raw -F
iptables -t raw -X
iptables -t security -F
iptables -t security -X
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT