Skip to content

Instantly share code, notes, and snippets.

View bizikov's full-sized avatar

Alexandr Bizikov bizikov

View GitHub Profile
@bizikov
bizikov / example.js
Created August 12, 2015 11:11
IBM Process Designer 8.5: Чтение и запись данных в Coach View
// Чтение БО
var data = this.context.binding ? this.context.binding.get("value") : null;
if (data) {
// ваш код
}
// Чтение параметра
var title = this.context.options.title ? this.context.options.title.get("value") : null;
if (title) {
// ваш код
}
@bizikov
bizikov / replace.js
Created July 31, 2014 05:21
Убрать все пробелы в строке
// Удаляем все пробелы, используя
// регулярные выражения в JavaScript (RegEx):
var text3 = " a b c d e f g ";
var newText3 = text3.replace(/\s+/g, '');
@bizikov
bizikov / border-color-transition.css
Created July 2, 2014 08:14
Приятный эффект при наведении на ссылку
a{
-webkit-transition: border-color 200ms, width 250ms;
-moz-transition: border-color 200ms, width 250ms;
transition: border-color 200ms, width 250ms;
}
@bizikov
bizikov / robot.txt
Created May 22, 2014 16:51
Запрещаем индексацию всего сайта для поисковой системы Sputnik.ru
User-Agent: SputnikBot;
Disallow:/
@bizikov
bizikov / fancybox.js
Created May 19, 2014 12:42
Отключение эффектов и навигации через клавиши в плагине fancybox
$fancybox.fancybox({
openEffect: 'none',
closeEffect: 'none',
prevEffect: 'none',
nextEffect: 'none',
keys : {
next: null,
prev: null,
close : null
}
// Проверка версии jQuery
jQuery.fn.jquery
// Проверка версии jQuery UI
$.ui.version
@bizikov
bizikov / rgb2hex.js
Created May 14, 2014 05:31
Перевод RGB в HEX
// Хак для перевода RGB в HEX
$.cssHooks.backgroundColor = {
get: function (elem) {
if (elem.currentStyle)
var bg = elem.currentStyle["backgroundColor"];
else if (window.getComputedStyle)
var bg = document.defaultView.getComputedStyle(elem,
null).getPropertyValue("background-color");
if (bg.search("rgb") == -1)
return bg;
@bizikov
bizikov / Main.aspx
Last active August 29, 2015 14:00
Страница в Sharepoint 2013 c областями для веб-частей (Подробнее: http://bizikov.ru/2014/04/Stranica-v-Sharepoint-2013-c-oblastjami-dlja-veb-chastej/
<%@ Page language="C#" MasterPageFile="../_catalogs/masterpage/homePageMaster.master"
Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full"%>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderMain" runat="server">
<WebPartPages:WebPartZone runat="server" ID="webZone1" CssClass="ms-hide" Title="Новости">
<ZoneTemplate></ZoneTemplate>
</WebPartPages:WebPartZone>
@bizikov
bizikov / mixin.less
Last active July 19, 2017 08:43
Список из кроссбраузерных примешиваний для LESS
/* gradient */
.gradient(@from: #000, @to: #fff) {
background-color: @from;
background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image: -webkit-linear-gradient(top, @from, @to);
background-image: -moz-linear-gradient(top, @from, @to);
background-image: -o-linear-gradient(top, @from, @to);
background-image: linear-gradient(to bottom, @from, @to);
}
@bizikov
bizikov / example.html
Last active August 29, 2015 13:56
Универсальная сетка на LESS. В качестве параметров можно указать ширину сайта (за это отвечает переменная @desktop), а так же размер отступа ( @Margin).
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Сетка</title>
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0"/>
<link rel="stylesheet" href="grid.css"/>
<style>
.module{
padding: 1em;