Skip to content

Instantly share code, notes, and snippets.

View felix-berlin's full-sized avatar
🏠
Working from home

Felix Scholze felix-berlin

🏠
Working from home
View GitHub Profile
@stephenway
stephenway / README.md
Last active June 22, 2024 16:04
BEMIT Cheatsheet
@ahmadawais
ahmadawais / gulpfile.js
Created August 23, 2015 17:28
Gulp: Theme Zip building task
/**
* Clean gulp cache
*/
gulp.task('clear', function () {
cache.clearAll();
});
/**
* Clean tasks for zip
@cferdinandi
cferdinandi / stop-video.js
Last active August 2, 2025 14:10
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@szbl
szbl / my-plugin-snippet.php
Last active March 15, 2022 04:17
How I auto-include my library of "controllers" in a theme/plugin.
<?php
// include all PHP files in ./lib/ directory:
foreach ( glob( dirname( __FILE__ ) . '/lib/*.php' ) as $file )
include $file;