Skip to content

Instantly share code, notes, and snippets.

Alex Khijnij veksa

Block or report user

Report or block veksa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View russian_names.txt
Ёж
Ёко
Ёлка
Ёрш
Ёсена
Ёшико
Аави
Аалия
Аало
Ааре
@veksa
veksa / bots
Created Jul 20, 2014
Список нежелательных ботов
View bots
# Block Bad Bots & Scrapers
SetEnvIfNoCase User-Agent "Aboundex" bad_bot
SetEnvIfNoCase User-Agent "80legs" bad_bot
SetEnvIfNoCase User-Agent "360Spider" bad_bot
SetEnvIfNoCase User-Agent "^Java" bad_bot
SetEnvIfNoCase User-Agent "^Cogentbot" bad_bot
SetEnvIfNoCase User-Agent "^Alexibot" bad_bot
SetEnvIfNoCase User-Agent "^asterias" bad_bot
SetEnvIfNoCase User-Agent "^attach" bad_bot
SetEnvIfNoCase User-Agent "^BackDoorBot" bad_bot
@veksa
veksa / price-generate
Created Jul 19, 2014
Bitrix, генерирования свойства "минимальная цена"
View price-generate
/*Version 0.3 2011-04-25*/
AddEventHandler("iblock", "OnAfterIBlockElementUpdate", "DoIBlockAfterSave");
AddEventHandler("iblock", "OnAfterIBlockElementAdd", "DoIBlockAfterSave");
AddEventHandler("catalog", "OnPriceAdd", "DoIBlockAfterSave");
AddEventHandler("catalog", "OnPriceUpdate", "DoIBlockAfterSave");
function DoIBlockAfterSave($arg1, $arg2 = false)
{
$ELEMENT_ID = false;
$IBLOCK_ID = false;
$OFFERS_IBLOCK_ID = false;
@veksa
veksa / breadcrumbs
Created Jul 19, 2014
Bitrix, стандартный шаблон breadcrubms
View breadcrumbs
<?if( !defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true ) die();
if( empty( $arResult ) )
return "";
$strReturn = '<ul class="breadcrumb">';
for( $index = 0, $itemSize = count($arResult); $index < $itemSize; $index++ ){
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
if( $arResult[$index]["LINK"] <> "" && $arResult[$index]['LINK'] != GetPagePath() )
@veksa
veksa / title-format
Created Jul 19, 2014
Bitrix, Форматирование заголовков.
View title-format
if( !CSite::inDir( "/index.php" ) ){
if( strlen( $APPLICATION->GetPageProperty('title') ) > 1 ){
$title = $APPLICATION->GetPageProperty('title');
}else{
$title = $APPLICATION->GetTitle();
}
$APPLICATION->SetPageProperty("title", $title.( $arSite['SITE_NAME'] ? ' - ' : '' ).$arSite['SITE_NAME'] );
$APPLICATION->AddChainItem( $title );
@veksa
veksa / veksa.xml
Last active Aug 29, 2015
phpstorm codestyle settings
View veksa.xml
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="veksa">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
View untrusted-lvl12-solution.js
/*
* robotNav.js
*
* The green key is located in a slightly more
* complicated room. You'll need to get the robot
* past these obstacles.
*/
function startLevel(map) {
// Hint: you can press R or 5 to "rest" and not move the
View untrusted-lvl11-solution.js
/*
* robot.js
*
* You'll need three keys in order to unlock the
* Algorithm: the red key, the green key, and the
* blue key. Unfortunately, all three of them are
* behind human-proof barriers.
*
* The plan is simple: reprogram the maintenance
* robots to grab the key and bring it through
View untrusted-lvl10-solution.js
/*************
* ambush.js *
*************
*
* Oh. Oh, I see. This wasn't quite part of the plan.
*
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
*
View untrusted-lvl9-solution.js
/**********************
* fordingTheRiver.js *
**********************
*
* And there's the river. Fortunately, I was prepared for this.
* See the raft on the other side?
*
* Everything is going according to plan.
*/
You can’t perform that action at this time.