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
#!/bin/bash | |
cd /usr/share/easy-rsa/ | |
echo "Введите название клиента латинскими буквами:" | |
read CLIENTNAME | |
. ./vars |
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
#!/bin/sh | |
# MySQL root password | |
ROOTPASS='Пароль рута БД' | |
############### | |
echo "Введите имя пользователя сервера, сайт которого будем удалять:" | |
read USERNAME |
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 | |
$sql = "SELECT | |
`p`.`id`, | |
getFIOWithInic(`p`.`id`,0) AS `fio`, | |
`p`.`number` AS `tabel`, | |
`rpt`.`name_short` AS `type_name`, | |
`rpc`.`name` AS `cat_name`, | |
DATE_FORMAT(`p`.`date_start_work`,'%d.%m.%Y') AS `date_start_work`, | |
`p`.`is_deleted`, |
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 | |
$items = Yii::app()->db->createCommand() | |
->select(array( | |
"t.id", | |
"DATE_FORMAT(`t`.`date_start`,'%d.%m.%Y') AS `date`", | |
//"DATE_FORMAT(`t`.`date_start`,'%H:%i') AS `time_start`", | |
//"DATE_FORMAT(`t`.`date_stop`,'%H:%i') AS `time_stop`", | |
"tr.number AS tr_number", | |
"s.output", |
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
#!/bin/sh | |
DATE=`date +%Y-%m-%d_%H-%M-%S` | |
DIR=~/backups/ | |
DB_USER=root | |
DB_PASS='********' | |
DB_HOST=localhost | |
REMOTE_STORAGE_HOST=***.***.244.225 | |
REMOTE_STORAGE_USER=backups | |
KEY_PATH=~/.ssh/id_rsa |
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
wget -q -O - http://www.atomicorp.com/installers/atomic | sh | |
yum clean all | |
rpm --import https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt | |
yum reinstall atomic-release -y |
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 | |
$server = '88.xxx.xxx.xxx\SQLEXPRESS'; | |
$link = mssql_connect($server, 'db_username', 'db_password'); | |
if (!$link) { | |
die('Something went wrong while connecting to MSSQL'); | |
} | |
mssql_select_db('database_name', $link); | |
$query_result = mssql_query('SELECT * FROM MenuItems'); |
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
# Generated by iptables-save v1.3.5 on Wed Jan 23 15:43:00 2013 | |
*nat | |
:PREROUTING ACCEPT [39:5343] | |
:POSTROUTING ACCEPT [2:120] | |
:OUTPUT ACCEPT [3:196] | |
-A POSTROUTING -o venet0 -j MASQUERADE | |
COMMIT | |
# Completed on Wed Jan 23 15:43:00 2013 | |
# Generated by iptables-save v1.3.5 on Wed Jan 23 15:43:00 2013 | |
*filter |
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
[[!FormIt? | |
&hooks=`groupSelector,recaptcha,spam,email,redirect` | |
&emailTpl=`sentEmailTpl` | |
&emailSubject=`Сообщение с stav-chip.ru` | |
&emailTo=`[[+emailAddresses]]` | |
&emailFrom=`[[+contact_email]]` | |
&emailSubject = `Сообщение с сайта stav-chip.ru` | |
&emailFromName = `СтавЧип` | |
&validate=`contact_name:required, | |
contact_email:email:required, |
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 | |
// Генерируем соль | |
$salt = '$2a$10$'.substr(str_replace('+', '.', base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(),mt_rand()))), 0, 22) . '$'; | |
// Шифруем пароль с применением данной соли | |
$hashed_password = crypt($password, $salt); |
OlderNewer