Skip to content

Instantly share code, notes, and snippets.

View vladbesson's full-sized avatar

Vladislav Balabanovich vladbesson

View GitHub Profile
@vladbesson
vladbesson / SCSS.md
Created July 20, 2017 09:48 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@vladbesson
vladbesson / wp-query-ref.php
Last active September 17, 2015 12:32 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@vladbesson
vladbesson / type.html
Last active August 29, 2015 14:27 — forked from aalexeev239/type.html
typography page
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
<link rel="stylesheet" href="css/style.css">
</head>
var $flatSubmenuLink = $('.flat-submenu-link');
var $myBody = $('body');
//Клик по ссылке
$flatSubmenuLink.on('click', function (e) {
e.preventDefault();
var $linkParent = $(this).parent();
var $flatSubmenuWrapp = $linkParent.siblings('.flat-submenu__wrapp');
@vladbesson
vladbesson / server_path.php
Last active August 29, 2015 14:16
Проверка путей на сервере
<?php
echo 'Путь к корневой папке: '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo 'Полный путь к скрипту и его имя: '.$_SERVER['SCRIPT_FILENAME'].'<br>';
echo 'Имя скрипта: '.$_SERVER['SCRIPT_NAME'];
?>
@vladbesson
vladbesson / new_gist_file.php
Last active August 29, 2015 14:16
Проерка работы функции mail() From http://old.webasyst.ru/support/help/test-mail-function.html
<?php
$message = '';
if (isset($_POST['email']) && !empty($_POST['email'])){
if (mail($_POST['email'], $_POST['subject'], $_POST['body'], '')){
$message = "Email has been sent to <b>".$_POST['email']."</b>.<br>";
}else{
$message = "Failed sending message to <b>".$_POST['email']."</b>.<br>";
}
}else{
if (isset($_POST['submit'])){
UPDATE wp_options SET option_value = replace(option_value, 'http://старыйдомен.ру', 'http://новыйдомен.ру') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://старыйдомен.ру','http://новыйдомен.ру');
UPDATE wp_posts SET post_content = replace(post_content, 'http://старыйдомен.ру', 'http://новыйдомен.ру');
// THEME SETTINGS
function interior_theme_settings( $wp_customize ) {
// Add interior_footer section footer settings
$wp_customize->add_section( 'interior_footer', array(
'title' => 'Подвал', // Title of section
'description' => 'Измените информацию в подвале.', // Description
) );
// Add setting for interior_footer_copyright
$wp_customize->add_setting( 'interior_footer_copyright', array(
'default' => '&copy; ' . get_bloginfo( 'name' ),