This file contains 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
ffmpeg -i input.MP4 -vf scale="2560:-1" output.mp4 |
This file contains 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
document.addEventListener("DOMContentLoaded", () => { | |
let state = { | |
url: window.location.href, | |
}; | |
let module = { | |
showHideElements(allElements) { | |
Array.from(allElements).map((element) => { | |
let key = element.dataset.qKey; | |
let identifier = element.dataset.q; |
This file contains 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
`for file in ./; do cwebp -q 50 "$file" -o "${file%.*}.webp"; done` |
This file contains 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
magick mogrify -resize 1920 *.jpg | |
//use -path arg if you want to output the resized images into a new dir |
This file contains 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 | |
$hook = "render_block_someBlock"; | |
add_filter( $hook, function($block_content, $block, $instance) { | |
$selector = explode(',', $blockInfo['selector'] ?? ''); | |
$content = new WP_HTML_Tag_Processor( $block_content ); | |
$content->next_tag( $selector ); | |
$content->add_class( 'g-rich-text' ); |
This file contains 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 | |
/*———— -Logic goes here, build $props, then include the markup template- ————*/ | |
$defaults = get_field('recent_posts') ?: []; | |
$posts_to_show = $defaults['posts_to_show']; | |
$query_args = [ | |
'post_status' => 'publish', | |
'paged' => 1, | |
'post_type' => 'post', | |
'posts_per_page' => $posts_to_show, |
This file contains 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
createObserver() { | |
let intersectionObserver = new IntersectionObserver((entries) => { | |
if (entries[0].intersectionRatio <= 0) { | |
//do something when hidden | |
console.log('hidden'); | |
} else { | |
//do something when visible | |
console.log('visible'); | |
} |
This file contains 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
import { exists } from '@/helpers/utilities'; | |
export let mixin = ({ node = null, config = {} } = {}) => { | |
if (!node) return false; | |
let state = { | |
node, | |
config, | |
}; |
This file contains 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 | |
// add the below to your functions file | |
// then visit the page that you want to see | |
// the enqueued scripts and stylesheets for | |
function se_inspect_styles() { | |
global $wp_styles; | |
echo "<h2>Enqueued CSS Stylesheets</h2><div>"; | |
foreach( $wp_styles->queue as $handle ) : |
This file contains 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
import { exists } from '@/helpers/utilities'; | |
export let mixin = ({ node = null, config = {} } = {}) => { | |
if (!node) return false; | |
let state = { | |
node, | |
config, | |
}; |
NewerOlder