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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\UploadedFile; | |
use Illuminate\Support\Str; | |
use Illuminate\Validation\ValidationException; |
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
stages: | |
- build | |
- deploy | |
variables: | |
RELEASE_ARCHIVE: "release_${CI_COMMIT_SHORT_SHA}.tar.gz" | |
make archive: | |
stage: build | |
image: alpine: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
- 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 |
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 | |
/** | |
* Пример функции поворота массива | |
* 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/ |
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 | |
/* Get all and recursive files list, generator */ | |
function genDirectoryRecursive($path) { | |
$directoryIterator = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator($path), | |
RecursiveIteratorIterator::CHILD_FIRST, | |
RecursiveIteratorIterator::CATCH_GET_CHILD | |
); |
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
{ | |
"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": | |
[ |
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 | |
class PortfolioPageTemplate { | |
/* Возвращает массив с описанием шаблона страницы. */ | |
function GetDescription() { | |
return [ | |
'name' => 'Активный шаблон', | |
'description' => 'Тестовый активный шаблон', | |
'modules' => [], | |
]; |
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(){ | |
var $registerForm = $('#applicationRegisterForm'); | |
/* Если форм на странице нет, то скрипт тут завершит свою работу */ | |
if ($registerForm.length === 0) | |
return; | |
/* Валидатор, наверно можно удалить. */ | |
$registerForm.find('.form-control').on('change', function(){ | |
var $this = $(this); | |
$this.removeClass('parsley-error'); |
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 | |
// 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>'; |
NewerOlder