This file contains hidden or 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
const app = Array.from(document.querySelectorAll('*')).find((e) => e.__vue_app__).__vue_app__ | |
const version = app.version | |
const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__ | |
devtools.enabled = true | |
devtools.emit('app:init', app, version, {}) | |
/** Source: https://mokkapps.de/vue-tips/force-enable-vue-devtools-in-production-build/ */ | |
/** After this code press Option+R on Mac */ |
This file contains hidden or 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
<?php | |
/** | |
* NOTE: This gist is very old. You might want to check out recent forks | |
* like this one: https://github.com/Alexlytle/Wordpress_custom_route/blob/main/Wordpress_Custom_route.php | |
* (thanks @Alexlytle) If you have an improvement to this gist, please | |
* post a link in a comment for others who might benefit. Thanks! | |
* | |
* A class to create simple custom routes. | |
* |
This file contains hidden or 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
BEGIN:VCALENDAR | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
PRODID:-//Dodel Bookings//Dodel Booking WP 1.0//RU | |
BEGIN:VEVENT | |
LOCATION:Dnipro | |
SUMMARY:Бронь комнаты Миссия выполнима (10-16) 06.0 | |
UID:625-1525369848 | |
DTSTART;TZID=Europe/Kiev:20180506T110000 | |
DTEND;TZID=Europe/Kiev:20180506T123000 |
This file contains hidden or 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 unhash () { | |
var sy, sx; | |
if ("pushState" in history) | |
history.pushState( | |
"", document.title, | |
window.location.pathname + window.location.search | |
); | |
else { | |
// сохраняем позицию прокрутки страницы в переменные | |
sy = document.body.scrollTop; |
This file contains hidden or 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
fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile |
This file contains hidden or 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
jQuery('header').bind('classChanged', function(){ | |
console.log('class changed'); | |
}); |
This file contains hidden or 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(){ | |
var originalAddClassMethod = jQuery.fn.addClass; | |
var originalRemoveClassMethod = jQuery.fn.removeClass; | |
jQuery.fn.addClass = function(){ | |
var result = originalAddClassMethod.apply( this, arguments ); | |
jQuery(this).trigger('classChanged'); | |
return result; | |
} | |
jQuery.fn.removeClass = function(){ | |
var result = originalRemoveClassMethod.apply( this, arguments ); |