lsof -wni tcp:3000
kill -9 PID
| Ніка | |
| Адріана | |
| Адріан | |
| Тіна | |
| Аліна | |
| Ангеліна | |
| Алінка | |
| Ліна | |
| Аліса | |
| Алла |
| # Run command by time interval | |
| watch -n 60 index.sh | |
| # Find file on disk | |
| find / -name "myfile" | |
| find / -name "%myfile%" | |
| # Script output to file | |
| ls > log.txt | |
| ls >> log.txt # don't rewrite file |
| .idea/ |
lsof -wni tcp:3000
kill -9 PID
| con = Faraday.new(url: url, params: {}, headers: headers) do |faraday| | |
| faraday.response :logger, nil, { headers: true, bodies: true } | |
| faraday.adapter Faraday.default_adapter | |
| end | |
| if method_type == 'post' | |
| con.post do |req| | |
| req.body = request_body | |
| end | |
| else |
| <?php | |
| [ | |
| 'attribute' => 'foo', | |
| 'value' => 'foo', | |
| 'label' => Yii::t('adminpanel', 'Foo'), | |
| 'filter' => Foo::getFooList(), | |
| 'filterType' => GridView::FILTER_SELECT2, | |
| 'filterOptions' => ['style' => 'min-width: 85px'], | |
| 'filterWidgetOptions' => [ |
| <?php | |
| (new DateTime())->getTimestamp(); |
| <?php | |
| /** | |
| * Set foo field | |
| * | |
| * @param boolean $baz | |
| * | |
| * @return boolean | |
| */ |
| <?php | |
| // model | |
| public function getFoo() { | |
| return true; | |
| } |
| <?php | |
| // config/web.php:186 | |
| 'mailer' => [ | |
| 'class' => 'yii\swiftmailer\Mailer', | |
| 'messageClass' => 'app\components\Message', | |
| 'htmlLayout' => '@app/modules/account/mail/layouts/html', | |
| 'useFileTransport' => true, // <-- | |
| ], |