- Загенерить ключ, который, возможно, уже есть:
ssh-keygen
- Залить ключ на на сервер, к которому нужно настроить доступ:
ssh-copy-id user@domain
rar a -ep1 -m5 cats_arch.rar cats/ | |
#-ep1 - параметр, удаляющий корневую директорию, т.е. cats | |
#a - архивироть | |
#-m5 - максимальная степень сжатия |
SublimeLinter | |
SublimeLinter-php | |
SublimeLinter-phplint | |
DockBlockr | |
File Rename | |
SublimeCodeIntel |
<?php | |
class BatchInsert extends \yii\base\Component | |
{ | |
const EVENT_AFTER_EXCECUTE = 'afterExecute'; | |
public $columnNames = []; | |
public $tableName = ''; | |
public $bufferedRowsNum = 200; | |
public $rows = []; |
.bs-callout { | |
padding: 20px; | |
margin: 20px 0; | |
border: 1px solid #eee; | |
border-left-width: 5px; | |
border-radius: 3px; | |
} | |
.bs-callout h4 { | |
margin-top: 0; | |
margin-bottom: 5px; |
<?php | |
trait DictGrouped | |
{ | |
public function getGroupName() | |
{ | |
return $this->dictGroup ? $this->dictGroup->name : ''; | |
} | |
public function getBrandName() |
CREATE DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci |
ssh-keygen
ssh-copy-id user@domain
<?php | |
//из config.php | |
if (YII_DEBUG) { | |
$config['bootstrap'][] = 'debug'; | |
$config['modules']['debug'] = [ | |
'class' => 'yii\debug\Module', | |
'allowedIPs' => ['127.0.0.1', '::1', '192.168.33.1', '*'], | |
'on beforeAction'=>function($event) { | |
//суть | |
$event->isValid = nil(Yii::$app->user->getIdentity())->hasRole(\common\models\User::ROLE_ADMINISTRATOR); |
# If a directory or a file exists, use it directly | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# Otherwise forward it to index.php | |
RewriteRule . index.php |