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
:local CurDate [/system clock get date] | |
:local CurTime [/system clock get time] | |
#Log | |
:log info "Download speed is more than 50M" | |
#SendTelegram | |
/tool fetch url="https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<Chat_ID>&text=YourMessage" |
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"?> | |
<modification> | |
<name>GA Event</name> | |
<code>default</code> | |
<version>1.0</version> | |
<author>Coder</author> | |
<link></link> | |
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 | |
//wordpress | |
if (file_exists('wp-config.php')) { | |
preg_match_all('/define\s*\(\s*[\'"](.*?)[\'"]\s*,\s*[\'"](.*?)[\'"]\s*\)\s*;/', file_get_contents('wp-config.php'), $matches, PREG_SET_ORDER); | |
foreach ($matches as $match) { | |
if(in_array($match[1],['DB_HOST','DB_USER','DB_PASSWORD','DB_NAME'],false)){ | |
define($match[1], $match[2]); | |
} |
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 | |
// Параметри для підключення до MySQL серверу | |
$servername = "127.0.0.1"; | |
$username = ""; | |
$password = ""; | |
$db = ""; | |
// Підключення до MySQL серверу | |
$conn = mysqli_connect($servername, $username, $password); |
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 | |
// Параметри для підключення до MySQL серверу | |
$servername = "127.0.0.1"; | |
$username = ""; | |
$password = ""; | |
error_reporting(E_DEBUG); | |
ini_set('display_errors', 'on'); |
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 | |
public function rules() | |
{ | |
return [ | |
... | |
[['date_tmp'], 'safe'], | |
]; | |
} | |
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
<?= $form->field( | |
$model, | |
'email', | |
[ | |
'enableClientValidation' => false, | |
] | |
)->input( | |
'email', | |
[ | |
'validate_pattern'=>'^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$', |
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 | |
namespace @app\your\namespace\controllers; | |
use Yii; | |
use yii\web\Controller; | |
use yii\filters\VerbFilter; | |
use yii\web\Response; | |
use yii\helpers\Json; |