Skip to content

Instantly share code, notes, and snippets.

View Woorg's full-sized avatar

Igor Gorlov Woorg

View GitHub Profile
@keyframes seemore-anim-1 {
0% {
clip: rect(11px, 300px, 19px, 0)
}
1.78571% {
clip: rect(17px, 300px, 13px, 0)
}
3.57143% {
add_action( 'woocommerce_single_product_summary', 'woocommerce_total_product_price', 10 );
function woocommerce_total_product_price() {
global $woocommerce, $product;
?>
<script>
jQuery(function($){
var price = <?php echo $product->get_price(); ?>,
currency = '<?php echo get_woocommerce_currency_symbol(); ?>';
@Woorg
Woorg / gist:e4371264346c968f9828d313f6db9b6b
Last active October 31, 2017 05:07
Получи 10$ на баланс digital ocean

Регистрируешся по ссылке и получаешь 10$ на баланс в digital ocean

https://goo.gl/HKoQdN

addEventListener('DOMContentLoaded', e => {
let observer = new MutationObserver((records) => {
let reload = false;
records.forEach((record) => {
if(record.type === 'attributes' &&
(record.target.matches &&
record.target.matches('body, #content, #overlay')) &&
record.attributeName === 'style') {
console.log(`style attr changed on
@Woorg
Woorg / blockClicks.js
Created July 4, 2017 20:02 — forked from lucas-pelton/blockClicks.js
Prevent multiple clicks and submissions in Contact Form 7
//http://epsiloncool.ru/programmirovanie/preventing-multiple-submits-in-contact-form-7
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').hasClass('is-active') ) {
e.preventDefault();
return false;
}
});
$('html, body').animate({
scrollTop: $("#elementID").offset().top
}, 2000);
@Woorg
Woorg / gist:cbb48e2908d696a2c78e79fb612d0924
Created June 6, 2017 00:11 — forked from bds/gist:2207826
Convert files from .scss to .sass
sass-convert -F scss -T sass application_styles.css.scss application_styles.css.sass
@Woorg
Woorg / wp filter debug
Created March 7, 2017 23:44
wordpress filter debug
global $wp_filter;
var_export($wp_filter['name of function']);
function cursorPosition(elementID, mouseX, mouseY) {
var offset = $('#'+elementID).offset();
var x = mouseX - offset.left;
var y = mouseY - offset.top;
return {'x': x, 'y': y};
}
@Woorg
Woorg / editor_config
Created January 11, 2017 18:23
editor config
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_line_ending": "unix",
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"folder_exclude_patterns":