Skip to content

Instantly share code, notes, and snippets.

View victorlapshev's full-sized avatar

Victor Lapshev victorlapshev

View GitHub Profile
<?
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
putenv("HOME=/home/bitrix/");
$commands = array(
'pwd',
'git config --global user.email "info@logoton.by',
'git config --global user.name "logoton server"',
'git config --global --list',
'git config core.filemode false',
<?php
function getTree($elements, $key = 'IBLOCK_SECTION_ID') {
$tree = array();
$sub = array(0 => &$tree);
foreach ($elements as $item) {
$id = $item['ID'];
$parent = empty($item[$key]) ? 0 : $item[$key];
$branch = &$sub[$parent];
<?php
class CLogotonProductProvider extends CCatalogProductProvider
{
static private $discounts = null;
/**
* @param array $arParams
*
* @return array|false
*/
<?
/**
* @author Dmitry Sharyk
* email: d.sharyk@gmail.com
*/
abstract class IIblockPropertyInterface {
function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName) {
$settings = self::PrepareSettings($arProperty);
<?
/**
* Неебучий enum
*
* @author Dmitry Sharyk
* email: d.sharyk@gmail.com
*/
class CPropertyElementEnum extends IIblockPropertyInterface {
# ставим xorg
yum install xorg-x11-server-Xvfb
yum install -y xorg-x11-fonts-75dpi
yum install -y xorg-x11-fonts-Type1
# это непонятно что, но оно нужно
yum install qt
# это конвертер
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos6-amd64.rpm
@victorlapshev
victorlapshev / .gitignore
Created November 7, 2015 21:23
Bitrix gitignore file (/local/ use)
.DS_Store
Thumbs.db
*.sql
.gitignore
/.idea/
/sitemap*.xml
robots.txt
.htaccess
/upload/*