Skip to content

Instantly share code, notes, and snippets.

View yunusga's full-sized avatar
👋
Hello World!

Yunus Gaziyev yunusga

👋
Hello World!
View GitHub Profile
@yunusga
yunusga / yoast_seo_breadcrumb_add_woo_shop.php
Created June 2, 2019 17:52 — forked from amboutwe/yoast_seo_breadcrumb_add_woo_shop.php
Multiple examples of how to customize the Yoast SEO breadcrumbs
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/*
* Add shop link to the Yoast SEO breadcrumbs for a WooCommerce shop page.
* Credit: https://wordpress.stackexchange.com/users/8495/rjb
* Last Tested: Apr 20 2017 using Yoast SEO 4.6 on WordPress 4.7.3
*/
add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_add_woo_shop_link' );
@yunusga
yunusga / import-tar-gz.sh
Created May 15, 2019 06:01 — forked from infusion/import-tar-gz.sh
Import a tar.gz file to MySQL
tar xzOf dump.sql.tar.gz | mysql -u $user -p $database

repostcss

@yunusga
yunusga / SketchSystems.spec
Last active June 13, 2018 15:05
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
My Awesome Sketch3
Second State
some event -> sad State
asd State
@yunusga
yunusga / nunjucks-filter-limit-to.js
Created August 30, 2017 12:37 — forked from jbmoelker/nunjucks-filter-limit-to.js
Nunjucks limitTo filter. Creates a new array or string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array or string, as specified by the value and sign (positive or negative) of limit.
/**
* @module limitTo
*
* Creates a new array or string containing only a specified number of elements.
* The elements are taken from either the beginning or the end of the source array
* or string, as specified by the value and sign (positive or negative) of limit.
*
* Same behavior as AngularJS limitTo filter: http://docs.angularjs.org/api/ng/filter/limitTo
*
* To use this filter in a template, first register it in the Nunjucks environment:
@yunusga
yunusga / modals.multi.floor.bootstrap.js
Created June 9, 2017 13:12
Multi-floor bootstrap modal windows
var modalsOpened = 0,
openedModalZIndex = 0,
$currentModal = null;
$('.modal')
.on('show.bs.modal', function(e) {
$currentModal = $(e.delegateTarget);
openedModalZIndex = $currentModal.css('z-index') + modalsOpened;
@yunusga
yunusga / visibly.js
Created April 20, 2017 13:57 — forked from juanmhidalgo/visibly.js
Cross-browser Page Visibility API polyfill
/*!
* isVis - v0.5.6 Sep 2012 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/
/*
* Firefox support added based on https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API
* @juanmhidalgo
*/
@yunusga
yunusga / gist:33cf0ba9e311e12df4046722e93d4123
Created April 5, 2017 11:55
Debug WordPress 404 issues (permalinks, rewrite rules, etc.)
/* Produces a dump on the state of WordPress when a not found error occurs */
/* useful when debugging permalink issues, rewrite rule trouble, place inside functions.php */
ini_set( 'error_reporting', -1 );
ini_set( 'display_errors', 'On' );
echo '<pre>';
add_action( 'parse_request', 'debug_404_rewrite_dump' );
function debug_404_rewrite_dump( &$wp ) {
@yunusga
yunusga / yandex-jquery.html
Last active September 2, 2019 12:56
Подключение jQuery с CDN Яндекса
<script src="https://yastatic.net/jquery/3.1.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.1.0.min.js"><\/script>')</script>