Skip to content

Instantly share code, notes, and snippets.

View npofopr's full-sized avatar
🙃

Vladislav Altyncev npofopr

🙃
View GitHub Profile
@langolf
langolf / gist:8691201
Last active August 29, 2015 13:55
Simple gulpfile
var gulp = require('gulp'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
autoprefixer = require('gulp-autoprefixer'),
csso = require('gulp-csso'),
imagemin = require('gulp-imagemin'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
clean = require('gulp-clean'),
@meritt
meritt / wstdays.md
Last active August 29, 2015 14:03
Презентации с Web Standards Days. Санкт-Петербург, 28 июня.
@Neolot
Neolot / gist:3105730
Created July 13, 2012 16:11
JQUERY Блоки равной высоты
// Equal height of the blocks
function setEqualHeight(blocks, etalon, correction){
blocks = $(blocks);
if ( blocks.length > 1 ) {
var tallest = 0;
blocks.each(function(){
var height = $(this).outerHeight(true);
if (tallest < height) tallest = height;
});
if (etalon && tallest < etalon) {
@Neolot
Neolot / gist:3964353
Created October 27, 2012 11:30
JQUERY Автоочистка поля при фокусе
(function($) {
$(function() {
$('#selector').each(function(){
var text = $(this).val();
$(this)
.focusin(function(){
$(this).addClass('focus');
if ($(this).val() == text) $(this).val('');
})
.focusout(function(){
@Neolot
Neolot / gist:3964361
Created October 27, 2012 11:35
JQUERY Плавная прокрутка по якорям
/* Вешаем событие прокрутки на все якоря (#) на странице */
$('a[href^="#"]').bind('click.smoothscroll', function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop':$target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
@biakaveron
biakaveron / cusel-fixed-min-2.5.js
Created November 6, 2012 06:59
Обновленная версия cuSel (скроллинг работает с jQuery 1.7+)
/* -------------------------------------
cusel version 2.5
last update: 31.10.11
смена обычного селект на стильный
autor: Evgen Ryzhkov
updates by:
- Alexey Choporov
- Roman Omelkovitch
using libs:
@balupton
balupton / README.md
Created February 11, 2013 03:52
DocPad: Clean dates in post URLs

DocPad: Clean dates in post URLs

Creates URLs like /2012/12/15/merry-xmas for your blog posts.

Requires momentjs to be installed: npm install --save moment

@balupton
balupton / docpad.coffee
Last active July 27, 2016 10:40
DocPad: Automatically set custom Meta Data for items in a Collection
# Define our Configuration
docpadConfig =
# Define our own Collections
collections:
# Posts
# Anything outputted to the posts directory can be considered a post
# Sort the posts by newest first
# And set their layout to `post` automatically if it isn't already set
@LeaVerou
LeaVerou / dabblet.css
Created March 23, 2013 23:44
Vertically centered text with SVG
/* Vertically centered text with SVG */
div {
width: 300px;
height: 150px;
background: #f06;
font: bold 150% sans-serif;
text-shadow: 0 1px 2px rgba(0,0,0,.5);
overflow: hidden; resize: both; /* just for this demo */
color: white;
set bell-style none