Skip to content

Instantly share code, notes, and snippets.

View bizikov's full-sized avatar

Alexandr Bizikov bizikov

View GitHub Profile
@bizikov
bizikov / rss-parser.php
Last active April 5, 2020 15:36
Парсер rss ленты на php
<?php
$orenru = 'http://www.oren.ru/rss/';
$ural56 = 'http://www.ural56.ru/news/news-rss.php';
$oreninform = 'http://oreninform.ru/rss/';
$ru56 = 'http://56.ru/text/rss.xml';
$xml = $orenru;
$rss = simplexml_load_file($xml);
echo '<div class="orenburg-rss-stream"><ul>';
@bizikov
bizikov / random.php
Created February 19, 2014 05:18
Вывод случайных записей в wordpress
<div class="rand">
<span>Случайные записи</span>
<?php $MyArgs = array('orderby' => 'rand','showposts' => '6'); ?>
<?php query_posts($MyArgs); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="excerpt">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail(); ?>
<p class="title"><?php the_title(); ?></p>
@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;
@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 / 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 / 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;
// Проверка версии jQuery
jQuery.fn.jquery
// Проверка версии jQuery UI
$.ui.version
@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
}
@bizikov
bizikov / robot.txt
Created May 22, 2014 16:51
Запрещаем индексацию всего сайта для поисковой системы Sputnik.ru
User-Agent: SputnikBot;
Disallow:/
@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;
}