Skip to content

Instantly share code, notes, and snippets.

View MyLittleTestRepository's full-sized avatar

MyLittleTestRepository

View GitHub Profile
@MyLittleTestRepository
MyLittleTestRepository / bitrix_iblock_properties.md
Created June 22, 2018 11:20 — forked from marvell/bitrix_iblock_properties.md
Bitrix: памятка по типам свойств инфоблока

Bitrix: памятка по типам свойств инфоблока

Для пользовательских типов свойств нужно указывать еще и USER_TYPE.

Привязка к элементам в виде списка:

PROPERTY_TYPE => 'E' 
USER_TYPE => 'EList' 

Дата/Время:

PROPERTY_TYPE => 'S' 
@MyLittleTestRepository
MyLittleTestRepository / update-phpstorm.sh
Created May 30, 2018 06:27 — forked from Jekis/update-phpstorm.sh
Download and install the latest version of PhpStorm for Ubuntu. Create .desktop file and use custom vmoptions.
#!/bin/bash
#
# Based on https://gist.github.com/olivertappin/e5920e131db9a451c91aa6e2bc24dc40
#
INSTALL_DIR=/opt/phpstorm
if [ "$(whoami)" != "root" ]
then
301 moved permanently (redirect):
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.example.com');
die();
?>
302 moved temporarily(redirect):
<?php
header('Location: http://www.example.com');
@MyLittleTestRepository
MyLittleTestRepository / Git-precommit-hook-mysqldump
Created March 7, 2018 06:22 — forked from mithereal/Git-precommit-hook-mysqldump
Git pre-commit hook for MySQL database backup ( remote mysqldump + Git push )
#!/bin/bash -e
# -e means exit if any command fails
DBHOST=address.to.your.server
DBUSER=username
DBPASS=password # do this in a more secure fashion
DBNAME=DBNAME
GITREPO=/where/is/your/repo
DUMP=$GITREPO/where/you/store/dumps
NEW=$DUMP/schema.sql
OLD=$NEW.old