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
history |
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
psql -U postgres dt < /path/to/dump.sql |
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
GridView::widget([ | |
'dataProvider' => $dataProvider, | |
'filterModel' => $searchModel, | |
'columns' => [ | |
['class' => 'yii\grid\SerialColumn'], | |
[ | |
'attribute' => 'user_id', | |
// 'filter' => array("1" => "open", "2" => "in progress", "3" => "closed") | |
'filter' => ArrayHelper::map(\app\models\User::find()->asArray()->all(), 'id', '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
HOW TO INSTALL Angular2: | |
1) Install Node platform | |
2) Run 'npm install -g angular-cli' | |
'-g' stands for 'global' | |
'angular-cli' is a Command Line Interface which allows easly interact with angular while developing | |
3) Create your project by typing 'ng new <Your-project-name>' | |
4) Navigate to the folder <Your-project-name> and run 'ng serve' | |
it will build a project, run server on URL 'http://localhost:4200' and start watching for changes in code, once file is changed project will be rebuilt the project and browser will be automatically refreshed | |
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
List of available databases: \l | |
List of available tables: \dt | |
Choose table: \c <table_name> | |
Quit session: \q |
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
$(document).on("click", "#test-element", function() { | |
alert("click bound to document listening for #test-element"); | |
}); | |
$('body').append('<div id="test-element">Click mee</div>'); |
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
Finf what: > ?<\?= ?Yii::t\('app',\ '(.*)'\);? ?\?> | |
Replace with: data-lang-key="\1"> | |
Example: | |
<a href="javascript:void(0)" class="weather" title="Precipitation"><?= Yii::t('app', 'weather');?></a> | |
will be raplced to | |
<a href="javascript:void(0)" class="weather" title="Precipitation" data-lang-key="weather"></a> |
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
Find: <\?= ?Yii::t\('app',\ '(.*)'\);? ?\?> | |
Replace with: \1 |
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
// in controller | |
Yii::$app->view->params['message_to_layout'] = 'This message will be shown in layout'; | |
// in layout (and in any view!) | |
<?=$this->params['message_to_layout']?> |
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
.clearfix::before, .clearfix::after { | |
content: ""; | |
display: table; | |
} | |
.clearfix::after { | |
clear: both; | |
} | |
.clearfix { |