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 | |
function get_word_form( $count, $word_forms = [ 'предмет', 'предмета', 'предметов' ] ) { | |
$count = preg_replace( '/[^\d]/', '', $count ); | |
$n100 = $count % 100; | |
$n10 = $count % 10; | |
if ( ( $n100 > 10 ) && ( $n100 < 20 ) ) { | |
return $word_forms[2]; | |
} elseif ( $n10 == 1 ) { |
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 (undefined) { | |
"use strict"; | |
let CreateNewDepatureOnEnter = { | |
initialize: function () { | |
document.addEventListener('keypress', this.onKeyPress.bind(this)); | |
}, | |
onKeyPress: function (e) { |
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
# This robots.txt file is created by Ilya Hoilik. | |
# You can contribute by visiting the link bellow. | |
# https://gist.github.com/ilyahoilik/c6d70d828f42aae429e3e84283fb85f7 | |
User-agent: * | |
# Folders and files | |
Disallow: /admin | |
Disallow: /api | |
Disallow: /applications |
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 | |
$is_cli = php_sapi_name() == 'cli'; | |
/** | |
* List all files inside a directory and all subdirectories. | |
* | |
* @param mixed $directory | |
* @param bool $is_cli | |
* @return void |