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
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
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
function $_(element) { return document.querySelector(element) } | |
let stack = [ | |
'/js/autocomplete/jquery-1.12.4.js', | |
'/js/autocomplete/jquery-ui.js', | |
'/js/autocomplete/loadcss.js', | |
] | |
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
function loadFancy() { | |
let stack = [ | |
'/vendor/jquery.min.js', | |
'/vendor/jquery.fancybox.min.js', | |
'/vendor/loadcss.js' | |
] | |
loadIt() |
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
//- Сортировка по популярным постам | |
# 1. Устанавливаем плагин HitsPage; | |
# 2. Создаем дополнительное поле HitsPage с типом — число. | |
# 3. В шаблоне, где надо выводить просмотры пишем [[!HitsPage? &saveTv=`true`]] | |
[[!pdoResources? | |
&parents=`4,5,6,7` | |
&tpl=`pop_tpl` | |
&limit=`3` |
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
//- вставляется в шаблоне "поиск по тегам" | |
//- https://youtu.be/5INOkXHP6xQ?t=2389 | |
[[!pdoPage? | |
&tvFilters=`tags==%[[!#GET.tag]]%` | |
&parents=`3` | |
&tpl=`blog-item` | |
&sortby=`{ "pagetitle":"ASC" }` | |
]] |
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
[[#[[*parent]].pagetitle]] |
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
<?php | |
/*$page = $modx->getObject('modResource', 13); | |
$chars = json_decode($page->getTVValue('chars')); | |
echo '<pre>'; | |
foreach($chars as $k => $v) | |
{ | |
echo $v->key0.'-'.$v->value0; | |
} |
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
$where = array( | |
'parent' => 6 | |
); | |
$resources = $modx->getCollection('modResource',$where); | |
$output = '<p>Всего ресурсов: '.count($resources).'</p>'; | |
foreach ($resources as $k => $res) { | |
$output .= '<p>['.$k.'] => '.$res->get('pagetitle').'</p>'; | |
} | |
print $output; |
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
{ | |
"name": "ct.fzn.by-jqm", | |
"version": "0.0.1", | |
"devDependencies": { | |
"grunt": "latest", | |
"grunt-browser-sync": "latest", | |
"grunt-contrib-concat": "latest", | |
"grunt-contrib-pug": "latest", | |
"grunt-contrib-watch": "latest", | |
"grunt-critical": "latest", |
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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
pug: | |
{ | |
compile: { | |
options: { |