This file contains hidden or 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
Admin: | |
MYSQL -UUSERNAME -PPASSWORD -HHOST DB_NAME < FILE_NAME.SQL — залить бд; | |
MYSQLDUMP -UUSERNAME -PPASSWORD -HHOST DB_NAME > FILE_NAME.SQL — сделать дамп бд; | |
---------------------------------------------------------------------------------------------------------------------- | |
create database <name_db>; | |
show databases; | |
show tables from <name_db>; | |
show columns from <db_name.table_name>; #вывести список колонок в таблице со свойствами | |
exit — выход из консольки MySQL. | |
------------------------------------------------------------------------------------------------------------------------ |
This file contains hidden or 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
{{csrf_field}} - генерирует токен |
This file contains hidden or 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 artisan make:migration create_users_table --create=users //создать таблицу | |
------------------------------------------------------------------------------ | |
php artisan make:migration add_votes_to_users_table --table=users //изменить существующую таблицу | |
---------------------------------------------------- | |
php artisan migrate // запустить миграцию | |
-------------------------------------- | |
Чтобы отменить последнюю операцию миграции, вы можете использовать команду отката. | |
Эта команда откатывает последнюю «пакетную» миграции, | |
которая может включать в себя несколько файлов миграции: | |
------------------------------------------ |
This file contains hidden or 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
mkdir - создает каталог | |
rmdir - удаляет пустой каталог | |
rm -r удаляет каталоги с файлами и вложенными каталогами | |
rm -rf | |
Символическая ссылка на каталог: | |
sudo ln -s /opt/phpstorm/bin/phpstorm.sh /usr/local/bin/phpstorm |
This file contains hidden or 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
composer create-project drupal-composer/drupal-project:8.x-dev my_project --stability dev --no-interaction |
This file contains hidden or 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
wpcf7_add_shortcode("pages","page_handler"); | |
function page_handler(){ | |
$html = ' '; | |
$posts = get_posts(array( | |
'showposts'=>12, | |
'post_type' => 'our-doctor', | |
'order'=>'ASC', | |
'order_by' => 'date' | |
)); |
This file contains hidden or 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
@setup | |
// user on web-server | |
$user = 'ci90599'; | |
$timezone = 'Europe/Moscow'; | |
// path to the directory on web-server | |
$path = '/home/c/ci90599'; | |
$current = $path . '/current'; |
This file contains hidden or 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
/* | |
*Создание вывода рейтинга отеля | |
* @author Artem Rogov <[email protected]> | |
* @param $str_meta_data значение рейтинга(сколько звезд) | |
* @param $mask заполнитель(звезды) | |
*/ | |
function stars_hotel($str_meta_data,$mask,$mask_negative = '-'){ | |
//преобразование их string в числовое | |
// так как word_press создает дополнительные мета поля в строковом типе |
This file contains hidden or 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
{ | |
"private": true, | |
"scripts": { | |
"dev": "npm run development", | |
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"watch": "npm run development -- --watch", | |
"watch-poll": "npm run watch -- --watch-poll", | |
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"prod": "npm run production", | |
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" |
This file contains hidden or 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
version: '2' | |
services: | |
mysql: | |
image: mysql:5.7 | |
volumes: | |
- ./storage/docker/mysql:/var/lib/mysql | |
environment: | |
- "MYSQL_ROOT_PASSWORD=secret" | |
- "MYSQL_USER=app" | |
- "MYSQL_PASSWORD=secret" |