This file contains hidden or 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 | |
use Monolog\Handler\NullHandler; | |
use Monolog\Handler\StreamHandler; | |
use Monolog\Handler\SyslogUdpHandler; | |
return [ | |
/* | |
|-------------------------------------------------------------------------- |
This file contains hidden or 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 takes 3 parameters: | |
str - string to convert | |
state - case "up" = uppercase, "low" = lowercase | |
invert(optional) - if true, the first letter will be oposite case | |
*/ | |
function convertString(str, state, invert) { | |
let result = ''; | |
switch (state) { | |
case 'low': |
This file contains hidden or 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
{ | |
"require": { | |
"phpmailer/phpmailer": "^5.2" | |
} | |
} |
This file contains hidden or 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 getNoun(number, one, two, five) { | |
let n = Math.abs(number); | |
n %= 100; | |
if (n >= 5 && n <= 20) { | |
return five; | |
} | |
n %= 10; | |
if (n === 1) { | |
return one; | |
} |
This file contains hidden or 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
fetch(url, { | |
method: 'POST', | |
headers: { | |
'auth': '1234' | |
}, | |
body: JSON.stringify({ | |
name: 'dean', | |
login: 'dean', | |
}) | |
}) |
This file contains hidden or 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
/node_modules | |
/public/storage | |
/storage/*.key | |
/vendor | |
Homestead.yaml | |
Homestead.json | |
.env | |
# ====== OS X =========================================== | |
.DS_Store |
This file contains hidden or 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 | |
//echo 'Я знаю '.declOfNum(5, array('иностранный язык', 'иностранных языка', 'иностранных языков')); | |
function declOfNum($number, $titles) | |
{ | |
$cases = array (2, 0, 1, 1, 1, 2); | |
return $number." ".$titles[ ($number%100>4 && $number%100<20)? 2 : $cases[min($number%10, 5)] ]; | |
} | |
function seconds_to_words($seconds) { | |
if ($seconds < 0) return "Неизвестно"; |
This file contains hidden or 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 | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
This file contains hidden or 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
// Listen for orientation changes | |
window.addEventListener("orientationchange", function() { | |
// Announce the new orientation number | |
alert(window.orientation); | |
}, false); | |
// Listen for resize changes | |
window.addEventListener("resize", function() { | |
// Get screen size (inner/outerWidth, inner/outerHeight) | |
This file contains hidden or 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
/** | |
* Настройка столбцов списка элементов ИБ в админке инфоблоков | |
* | |
* @param integer $IBlockID — ID инфоблока | |
* @param string $arIBlockListAdminColumns — символьные коды полей и свойств для показа в списке элементов ИБ | |
* @param string $orderByColumnName — наименования поля или свойства по которому нудно отсортировать | |
* @param string $orderDirection - направление сортировки | |
* @param integer $pageSize - количество элементов на страницу | |
* @param boolean $isToAllUsers - значение будет для всех, или для текущего пользователя | |
* @return boolean |
NewerOlder