This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html(lang="ru") | |
head | |
block meta | |
meta(charset="UTF-8") | |
block link | |
link(rel="stylesheet", href="css/styles.css") | |
block title | |
title Default title | |
body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lazyRequireTask(taskName, path, options) { | |
options = options || {}; | |
options.taskName = taskName; | |
gulp.task(taskName, function(callback) { | |
var task = require(path).call(this, options); | |
return task(callback); | |
}); | |
} | |
// usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body oncopy="return false" onselectstart="return false" ondragstart="return false"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --page-requisites -r -l 10 http://site.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a[href^="#"]').on('click', function(){ | |
var elementClick = $(this).attr("href"); | |
var destination = $(elementClick).offset().top; | |
var minusTop = 0; | |
switch(elementClick){ | |
case "#services": minusTop = 90; break; | |
case "#portfolio": minusTop = 60; break; | |
case "#advantages": minusTop = 90; break; | |
case "#steps": minusTop = 60; break; | |
case "#price": minusTop = 60; break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"theme": "Material-Theme.sublime-theme", | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"overlay_scroll_bars": "enabled", | |
"line_padding_top": 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sunset_get_attachment( $num = 1 ){ | |
$output = ''; | |
if( has_post_thumbnail() && $num == 1 ): | |
$output = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ); | |
else: | |
$attachments = get_posts( array( | |
'post_type' => 'attachment', | |
'posts_per_page' => $num, | |
'post_parent' => get_the_ID() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function comments_all_func( $atts ){ | |
extract( shortcode_atts( array( | |
'category' => '' | |
), $atts ) ); | |
$categories = explode( ',', $atts['category'] ); | |
$taxq = array( | |
#'posts_per_page' => 6, | |
'post_type' => 'wpm-testimonial', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param string $str Text to find <img> src attribute value | |
* @param string(optional) $placeholder if <img> src attr is empty use $placeholder | |
* @param boolean(optional) $echo - if true display value else return value | |
* @return string | |
*/ | |
function ecf_find_img_url($str, $echo = false, $placeholder = 'http://placehold.it/350x150' ) { | |
$start = stripos($str, '<img'); | |
OlderNewer