Skip to content

Instantly share code, notes, and snippets.

View htaccess PageSpeed
AddDefaultCharset UTF-8
RewriteEngine On
<ifModule mod_expires.c>
# Add correct content-type for fonts & SVG
AddType application/font-woff2 .woff2
AddType image/svg+xml .svg
ExpiresActive On
View .stylelintrc
"extends": "stylelint-config-standard",
"rules": {
"indentation": "tab",
"string-quotes": "double",
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"selector-combinator-space-after": "always",
"selector-attribute-quotes": "always",
"declaration-colon-space-before": "never",
View scroll block
$(window).scroll(function() {
var sb_m = 20; // отступ сверху и снизу
var mb = 500; // высота подвала с запасом
var st = $(window).scrollTop();
var sb = $(".sticky-block");
var sbi = $(".sticky-block .inner");
var sb_ot = sb.offset().top;
var sbi_ot = sbi.offset().top;
var sb_h = sb.height();
View fullpage + height fixed header
var h_header = $('header').height();
paddingTop: h_header
var hf = function(){
var h_header = $('header').height();
var h_footer = $('footer').height();
'paddingTop': h_header,
npofopr / post-receive
Created Mar 30, 2017 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
View post-receive
while read oldrev newrev refname
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
View block-scroll.css
/* the page should not change width as content is loaded */
body {
overflow-y: scroll;
/* block scrolling without losing the scroll bar and shifting the page */
/* add this class when a modal is open */
body.block-scroll {
overflow: hidden;
overflow-y: scroll !important;
npofopr / stylus mixins
Created Jan 15, 2017
clearfix, responsive images, breakpoints
View stylus mixins
// Mixins.
margin 0
padding 0
text-indent 0
list-style none
list-style-position outside
View afg site scripts
$(document).ready(function() {
$(".toggle-mnu").click(function() {
return false;
$(".main-footer .toggle-mnu").click(function() {
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
View scripts
$(function() {
// Preloader
$(window).on( 'load', function() {
setTimeout(function() {
}, 100);
// Scroll Header
View sublime config 19.03.2015
"enable_tab_scrolling": false,
"fallback_encoding": "Cyrillic (Windows 1251)",
"remember_open_files": true,
"trim_trailing_white_space_on_save": true
"Seti_SB_h_med": true,
"Seti_SB_v_med": true,
"Seti_mouse_wheel_tabswitche": true,