Skip to content

Instantly share code, notes, and snippets.

Stanislav c01nd01r

Block or report user

Report or block c01nd01r

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
@c01nd01r
c01nd01r / index
Last active Aug 29, 2015
CSS Arrow
View index
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="arrow">
<p>GitHub Gist</p>
<p>Указательная стрелка</p>
@c01nd01r
c01nd01r / my_page_helper
Created Apr 15, 2014
Next and prev page. ImageCMS
View my_page_helper
if (!function_exists('next_page'))
{
function next_page($page_id)
{
$data = get_page($page_id+1);
if ($data) {
return $data;
} else {
return false;
}
View gist:940658c2ef7a2df92a2e
<xsl:template name="time" >
<xsl:param name="unix-timestamp"/>
<time datetime="{document(concat('udata://system/convertDate/', $unix-timestamp ,'/(Y-m-d)'))/udata}">
<xsl:value-of select="document(concat('udata://system/convertDate/', $unix-timestamp ,'/(d.m.Y)'))/udata"/>
</time>
</xsl:template>
<!-- Вызов шаблона-->
<xsl:call-template name="time">
<xsl:with-param select="//property[@name='publish_time']/value/@unix-timestamp" name="unix-timestamp"/>
View vim-on-heroku.sh
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@c01nd01r
c01nd01r / file.txt
Created Sep 13, 2015
Sublime Text Plugins
View file.txt
All Autocomplete
EditConfig
Go-To-CSS Decloration
Gulp
NPM
Jade
Matherial Theme
Stylus
PackageControl
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="@pepelsbey">
<title>JS Bin</title>
</head>
<body>
<div class="slider">
<input type="radio" name="slider__check" class="slider__check" id="slider__check-1" checked><label for="slider__check-1" class="slider__label">1</label><img src="http://habrastorage.org/files/3f2/628/bd5/3f2628bd58c8452db516195cb0c9bfc9.jpg" alt="" class="slider__image">
@c01nd01r
c01nd01r / user-agent-strings
Created Nov 13, 2015 — forked from the0ther/user-agent-strings
mobile device user-agent strings
View user-agent-strings
# User-Agent Strings for a Number of Devices
All of these are taken from www.tera-wurfl.com.
The list of devices is the result of a google query for "Top 10 Phones" and the 6 latest devices added to the database at 51degrees.mobi.
HTC One Mozilla/5.0 (Linux; Android 4.0.3; HTC One X Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19
iPhone 5
iPhone 5c Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; xx-xx) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7
Galaxy S4 Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; GT-I9500 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
View pagination.php
<?
//
// Код для разбивки контента на страницы взят отсюда: http://forum.php.su/topic.php?forum=1&topic=6985
//
$result = $GLOBALS['db']->Query("SELECT * FROM " . PREFIX . "_modul_contact_info");
$rows_max = $result->NumRows(); // Сколько всего заявок с формы в базе
$show_pages = 5; // Сколько заявок с формы покажем пользователю
$this_page = filter_var($_GET['page'], FILTER_SANITIZE_NUMBER_INT); // Номер текущей страницы
@c01nd01r
c01nd01r / gulpfile.js
Last active Dec 22, 2015
Gulp build error to browser
View gulpfile.js
//npm i gulp gulp-stylus gulp-plumber browser-sync bs-fullscreen-message
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var plumber = require('gulp-plumber');
var browserSync = require('browser-sync').create();
//Enable "Fullscreen Messages" plugin in Browsersync Plugins web settings (http://localhost:3001/plugins)
//Notification template
var bsError = function(data) {
@c01nd01r
c01nd01r / index.slim
Created Nov 20, 2013
Адаптивные изображения в сетке 3x3 на списках
View index.slim
div
ul
li
img src="#" width="100%"
span SomeText
li
img src="#" width="100%"
span SomeText
li
img src="#" width="100%"
You can’t perform that action at this time.