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
body { | |
background: linear-gradient(231deg, #00efb1, #eb70d8); | |
background-size: 400% 400%; | |
-webkit-animation: animbgr 30s ease infinite; | |
-moz-animation: animbgr 30s ease infinite; | |
-o-animation: animbgr 30s ease infinite; | |
animation: animbgr 30s ease infinite; | |
} | |
@-webkit-keyframes animbgr { | |
0%{background-position:97% 0%} |
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 | |
/* | |
Скрипт надо запускать от юзера - владельца сайта, чтобы созданные файлы пакетов не принадлежали юзеру root | |
$ sudo -u USERNAME php /var/www/USERNAME/packages.php /var/www/USERNAME/www/ | |
Или от root, а после выставить владельца: | |
$ php /root/scripts/modx/packages.php /var/www/USERNAME/www/ && /var/www/USERNAME/chmod | |
Чтобы запустить из веба, просто положите скрипт в корень или куда-нибудь глубже и вызовите по HTTP | |
*/ |
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
#!/bin/bash | |
USER=########### | |
PASSWORD=############### | |
BACKUP=/home/host1372784/Backup | |
OLD=4 # Сколько дней хранить бэкапы | |
# Создаем директорию для сегодняшнего бэкапа | |
DIR=$BACKUP/`date '+%Y-%m-%d'` | |
mkdir $DIR |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Градиентный текст</title> | |
<style> | |
.page-title__label { | |
font-weight: 100; | |
font-size: 52px; | |
letter-spacing: .05em; |
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
<!-- DC PDF Embed Start --> | |
<iframe src="http://docs.google.com/viewer?url=http://cdn.dcodes.net/sc-samples/sample.pdf&embedded=true" style="width:760px; height:400px;" frameborder="0"> | |
Your browser should support iFrame to view this PDF document</iframe> | |
<!-- DC PDF Embed End --> | |
Parameters: | |
--------------------- | |
url - path to PDF file | |
embedded (true/false) - embed into page | |
width - width of pdf frame |
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
#!/bin/bash | |
#Пример перехода в папку: cd /home/user/Рабочий\ стол/папка/ | |
#далее: ./to-translit.sh или bash to-translit.sh | |
# Перекодирует рекурсивно в текущем каталоге имена | |
# файлов и каталогов в транслит. | |
SCRIPT=`readlink -e $0` | |
for NAME in * | |
do | |
LAT="$(echo $NAME | sed y/абвгдеёзийклмнопрстуфхцы/abvgdeezijklmnoprstufhcy/)" |
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
[[!pdoResources? | |
&parents=`15` | |
&depth=`0` | |
&tpl=`tpl_house_page` | |
&includeTVs=`people, main-pic, 1st-floor-square, 2nd-floor-square, Balkon-square, Common-square, Terassa-square` | |
&where=`{ | |
"Common-square:<=":"[[!#POST.square]]", | |
"AND:people:>=":"[[!#POST.people_count]]" | |
}` | |
&showLog=`0` |
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 | |
print '<pre>'; | |
ini_set('display_errors', 1); | |
$where = array( | |
'parent' => 47, | |
'publishedon' => '' | |
); | |
$resources = $modx->getCollection('modResource',$where); | |
$output = '<p>Всего ресурсов: '.count($resources).'</p>'; |
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
LOAD DATA INFILE '/home/k/ko/site.ru/comments.csv' | |
INTO TABLE modx_formit_forms | |
FIELDS TERMINATED BY '|' ENCLOSED BY '`' | |
LINES TERMINATED BY '\n' | |
(id,form,context_key,`values`,ip,@date,encrypted) | |
SET expired_date = STR_TO_DATE(@date, '%d.%m.%Y'); |
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
{$params = [ | |
'currid' => {$modx->resource->id} | |
]} | |
{processor action="web/prevnext/getdata" params=$params ns=modxsite assign=result} | |
{$pn=$result.object} | |
<div class="row"> | |
<div class="col-md-4 text-center"> |
OlderNewer