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
| CREATE TEMPORARY TABLE `temp_table` | |
| AS | |
| SELECT `id` FROM `main_table`; | |
| ALTER TABLE `temp_table` CHANGE `old_name` `new_name_1` int(10); | |
| ALTER TABLE `temp_table` ADD `new_name_2` int(10); | |
| INSERT INTO `temp_table` (`new_name_2`) VALUES (1); | |
| INSERT INTO `main_table_2` SELECT * FROM `temp_table`; | |
| DROP TEMPORARY TABLE `temp_table`; |
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
| *.ejs filter=gitignore | |
| *.js filter=gitignore |
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
| server { | |
| listen 80 default_server; | |
| root /var/www/html/public; | |
| index index.html index.php; | |
| client_max_body_size 100M; | |
| charset utf-8; | |
| location @modx-rewrite { | |
| rewrite ^/(.*)$ /index.php?q=$1 last; |
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
| docker exec -it dockermultikeymodxtemplate_nginx_1 bash | |
| docker exec -it dockermultikeymodxtemplate_nginx_1 nginx -s reload |
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
| Options +FollowSymLinks | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
| RewriteCond %{HTTP_HOST} ^www\.site\.ru$ [NC] | |
| RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L] | |
| RewriteBase / | |
| RewriteCond %{HTTP:X-HTTPS} !1 | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
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 | |
| // Работаем только на фронтенде | |
| if ($modx->event->name != 'OnHandleRequest' || $modx->context->key == 'mgr') {return;} | |
| // Определяем запрашиваемый хост | |
| $host = $_SERVER['HTTP_HOST']; | |
| // Выбираем контекст с настройкой base_url | |
| $q = $modx->newQuery('modContextSetting', array('key' => 'http_host', 'value' => $host)); | |
| $q->select('context_key'); |
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
| docker volume create portainer_data | |
| docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer |
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
| {"apps": [ | |
| { | |
| "env": { | |
| "interpreter_args": "--nouse-idle-notification —expose-gc" | |
| }, | |
| "env_development": { | |
| "NODE_ENV": "dev" | |
| }, | |
| "env_production": { | |
| "NODE_ENV": "prod", |
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
| -- Using MySQL with Cloud9 -- | |
| # start MySQL. Will create an empty database on first start | |
| $ mysql-ctl start | |
| # stop MySQL | |
| $ mysql-ctl stop | |
| # run the MySQL interactive shell | |
| $ mysql-ctl cli |
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
| .ajax-results | |
| .success, .error | |
| height: 0 | |
| opacity: 0 | |
| max-height: max-content | |
| margin-top: 10px | |
| overflow: hidden | |
| transition: 0.3s | |
| .active | |
| margin-top: 20px |