View .gitlab-ci.yml
stages: | |
- build | |
- deploy | |
variables: | |
RELEASE_ARCHIVE: "release_${CI_COMMIT_SHORT_SHA}.tar.gz" | |
make archive: | |
stage: build | |
image: alpine:latest |
View backup_mysql_databases.yml
- hosts: mysql | |
vars: | |
backup_to: /root/backups/databases/ | |
backup_current_dir: "{{ backup_to }}{{ ansible_date_time.date }}" | |
backup_age: "7d" | |
tasks: | |
- name: Collect mysql databases | |
shell: 'mysql -u root -e "select schema_name from information_schema.schemata where schema_name not in (\"information_schema\", \"mysql\", \"performance_schema\");"' | |
register: dblist | |
become: yes |
View rotateMatrix.php
<?php | |
/** | |
* Пример функции поворота массива | |
* php version 7.2 | |
* | |
* @category Algoritms | |
* @package Array | |
* @author Evil_Wolf <wolfofdeath@yandex.ru> | |
* @license MIT https://opensource.org/licenses/MIT | |
* @link https://ibogatov.ru/ |
View genDirectoryRecursive.php
<?php | |
/* Get all and recursive files list, generator */ | |
function genDirectoryRecursive($path) { | |
$directoryIterator = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator($path), | |
RecursiveIteratorIterator::CHILD_FIRST, | |
RecursiveIteratorIterator::CATCH_GET_CHILD | |
); |
View sublime config
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Afterglow/Afterglow-monokai.tmTheme", | |
"dictionary": "Packages/User/russian_english.dic", | |
"draw_white_space": "all", | |
"fold_buttons": false, | |
"font_size": 13, | |
"ignored_packages": | |
[ |
View page_template.php
<?php | |
class PortfolioPageTemplate { | |
/* Возвращает массив с описанием шаблона страницы. */ | |
function GetDescription() { | |
return [ | |
'name' => 'Активный шаблон', | |
'description' => 'Тестовый активный шаблон', | |
'modules' => [], | |
]; |
View register.js
$(function(){ | |
var $registerForm = $('#applicationRegisterForm'); | |
/* Если форм на странице нет, то скрипт тут завершит свою работу */ | |
if ($registerForm.length === 0) | |
return; | |
/* Валидатор, наверно можно удалить. */ | |
$registerForm.find('.form-control').on('change', function(){ | |
var $this = $(this); | |
$this.removeClass('parsley-error'); |
View import_rasvero.php
<?php | |
// Libraries | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
require_once('xlsx_reader/SpreadsheetReader.php'); | |
// Statistics | |
$startTime = microtime(true); | |
echo 'Start Memory usage ' . (memory_get_usage(true) / 1024) . ' K byte'; | |
echo '<br>---------------------------------<br><br>'; |
View header.php
<?php | |
use Bitrix\Main\Page\Asset; | |
$AssetManager = Asset::getInstance(); | |
//$AssetManager->addCss(); | |
//$AssetManager->addJs(); | |
//$AssetManager->addString(); | |
?> | |
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> |
NewerOlder