Skip to content

Instantly share code, notes, and snippets.

geff21st

Block or report user

Report or block geff21st

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
@geff21st
geff21st / bitrixNewsList--simple.php
Last active Apr 16, 2019
Самый простой конфиг для news.list
View bitrixNewsList--simple.php
<? $APPLICATION->IncludeComponent(
"bitrix:news.list",
"",
Array(
"ACTIVE_DATE_FORMAT" => "j F Y",
"IBLOCK_ID" => CONTACTS_IBLOCK,
"IBLOCK_TYPE" => "content",
"SORT_BY1" => "SORT",
"SORT_BY2" => "ID",
"SORT_ORDER1" => "ASC",
View uplabJiraActions.user.js
// ==UserScript==
// @name uplabJiraActions
// @description Кастомные действия для Jira
// @author Uplab
// @license MIT
// @version 20180710.03.18.23
// @grant GM_addStyle
// @include https://j.uplab.ru/*
// ==/UserScript==
View batch-resize-crop.sh
mogrify -path ./previews \
-resize "300x300^" \
-gravity Center \
-extent "300x300" \
./*
View ДействияПриРазворачиванииБитриксПроекта.md

Служебные скрипты

wget http://dev.1c-bitrix.ru/download/scripts/bitrix_server_test.php
wget https://www.1c-bitrix.ru/download/files/scripts/restore.php

Настройки GIT

git config --global color.ui auto &&
View includeLandingPage.php
<?php
function includeLandingPage($page) {
global $APPLICATION;
if (empty($page)) return;
$APPLICATION->RestartBuffer();
include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/landing24/header.php");
View asyncScriptsLoad.js
var cont = document.getElementsByTagName('head')[0];
var jsList = [
{src: '/static/inner/js/libs.js', async: true, defer: true},
{src: '/local/templates/inner/assets-prog/dist/script.min.js', async: true, defer: true},
{
src: 'https://maps.googleapis.com/maps/api/js?libraries=places&key=YOUR_API_KEY',
onLoad: function () {
setTimeout(function () {
$(window).trigger('google:map:ready');
View urlrewrite.php
<?
$arUrlRewrite = array(
array(
"CONDITION" => "~^/personal/projects/requests/(\\d+)/(\\?.*|\$)(?#__rule_sort_hack__)~",
"RULE" => "id=\$1",
"ID" => "",
"PATH" => "/personal/projects/requests/detail.php",
"SORT" => 100,
),
array(
View BitrixAdminMenu:iconsList.php
<?php
// Выводит список доступных иконок для меню
$arr = [
'fav_menu_icon',
'iblock_menu_icon_iblocks',
'fileman_menu_icon',
'clouds_menu_icon',
'iblock_menu_icon_types',
'smile_menu_icon',
View images.optimize.sh
find . -name \*.jpg -type f -exec jpegoptim --strip-all {} \;
find . -name \*.png -type f -exec optipng -o7 {} \;
View .htaccess
# Removes index.php from ExpressionEngine URLs
RewriteCond %{REQUEST_URI} !^/bitrix/
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [L,NE,R] # <- for test, for prod use [L,NE,R=301]
# Adds trailing slashes
RewriteCond %{REQUEST_URI} !^/bitrix/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,NE,R] # <- for test, for prod use [L,NE,R=301]
You can’t perform that action at this time.