Skip to content

Instantly share code, notes, and snippets.

View npofopr's full-sized avatar
🙃

Vladislav Altyncev npofopr

🙃
View GitHub Profile
@balupton
balupton / README.md
Last active April 29, 2019 11:57
DocPad: Use DocPad, GitHub & Prose as a Wiki

Use DocPad, GitHub and Prose as a Wiki

This guide will walk you through how you can use a GitHub repository to house your wiki content, have DocPad render it, and automatically update on changes. It's also really nice as we get to benefit from the github project workflow for our wiki, that is issues, pull requests, etc.

We use this workflow heavily by linking the DocPad Website and the DocPad Documentation repositories allowing us to have users edit and submit pull requests for improvements to our documentation, and once merged, the website regenerates automatically.

1. Create a new repository for your Wiki Content

@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;

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
@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
@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:
@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;
});
@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(){
@balupton
balupton / README.md
Last active October 11, 2015 18:08
DocPad: Minify your assets with Grunt

DocPad: Minify your assets with Grunt

The following will minify your assets with grunt each time a generation write completes.

Installation

  1. Install Dependencies