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 | |
/** | |
* Использование: | |
* $v = new VideoThumb($link); | |
* $v->getVideo(); //Ссылка на видео | |
* $v->getTitle(); //Название ролика | |
* $v->fetchImage($path) //Скачать самое большое превью ролика | |
* | |
* Прогнать тест: |
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
$(document).ready(function () { | |
$(document).on("scroll", onScroll); | |
//smoothscroll | |
$('a[href^="#"][data-anchor="1"]').on('click', function (e) { | |
e.preventDefault(); | |
$(document).off("scroll"); | |
$('a').each(function () { | |
$(this).removeClass('active'); |
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 | |
public function change($key, $count, $options, $comment) | |
{ | |
if (array_key_exists($key, $this->cart)) { | |
if (isset($count) && !is_null($count) && $count <= 0) | |
return $this->remove($key); | |
else if(isset($count) && !is_null($count) && $count > 0) | |
{ | |
if ($count > $this->config['max_count']) { |
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
if (!window.FB) window.FB = { | |
_apiKey: null, | |
_session: null, | |
_userStatus: "unknown", | |
_logging: true, | |
_inCanvas: window.location.search.indexOf("fb_sig_in_iframe=1") > -1 || window.location.search.indexOf("session=") > -1 || window.location.search.indexOf("signed_request=") > -1 || window.name.indexOf("iframe_canvas") > -1 || window.name.indexOf("app_runner") > -1, | |
_https: window.name.indexOf("_fb_https") > -1, | |
_domain: { | |
api: "https://api.facebook.com/", | |
api_read: "https://api-read.facebook.com/", |
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 | |
/** @var modX $modx */ | |
/** @var array $scriptProperties */ | |
switch ($modx->event->name) { | |
// расчет стоимости события | |
case "UserEventsOnBeforeGetOrderCost": | |
/** @var UserEventsOrderInterface $orderHandler */ | |
$orderHandler = $modx->getOption("order", $scriptProperties); |
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 | |
$installPackages = array( | |
'sdStore' | |
, 'translit' | |
, 'SanitizeUpload' | |
, 'TinyMCE' | |
, 'FormIt' | |
, 'Analytics' | |
, 'Big Brother' |
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 SqlInjection{ | |
const UID = 'GaGaGa'; | |
static public $CONNECTOR_PATH = '/connectors/'; | |
static public $TABLE_PREFIX = 'modx_'; | |
static protected $goodRequest = null; | |
static protected function sqlBad(){ | |
$userTable = self::getTableName('users'); |
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> | |
<head> | |
<meta name="description" content="uikit slideshow + counts"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/js/uikit.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/js/components/slideshow.js"></script> |
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
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/ | |
/*At least requires the meta viewport tag with content 'width=device-width'*/ | |
@media only screen and (max-width: 1080px) and (orientation : portrait) { | |
/* PORTRAIT: | |
Windows Surface Pro*/ | |
} | |
@media only screen and (max-width: 800px) and (orientation : portrait) { | |
/* PORTRAIT: | |
Acer Iconia Tab A100 |
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 | |
/** | |
* Password generate | |
* | |
* @category generate | |
* @version 0.1 | |
* @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html | |
* @param string $len длина пароля | |
* @param string $data правила генерации пароля | |
* @return string Строка с паролем |