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
// ts 3.6x | |
function debounce<T extends Function>(cb: T, wait = 20) { | |
let h = 0; | |
let callable = (...args: any) => { | |
clearTimeout(h); | |
h = setTimeout(() => cb(...args), wait); | |
}; | |
return <T>(<any>callable); | |
} |
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
{ | |
"name": "", | |
"description": "", | |
"version": "0.0.0", | |
"private": true, | |
"author": "Brian Frichette", | |
"homepage": "", | |
"contributors": [ "Brian Frichette <[email protected]> (https://github.com/brian-frichette)" ], | |
"bugs": { "url": "" }, | |
"scripts": { "start": "nodemon app.js" }, |