Skip to content

Instantly share code, notes, and snippets.

View Tovape's full-sized avatar
🍋

Toni Valverde Tovape

🍋
View GitHub Profile
@tinotriste
tinotriste / breadcrumbs-functions.php
Last active July 1, 2024 14:40
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@loominade
loominade / jqueryScrollRight.js
Created April 1, 2015 08:02
ever bothered there is a scrollLeft() but no scrollRight() function in jQuery?
$.fn.extend({
scrollRight: function(property) {
return this[0].scrollWidth - (this[0].scrollLeft + this[0].clientWidth) + 1;
}
});
@lalibi
lalibi / Set-WindowState.ps1
Last active June 13, 2024 09:51 — forked from Nora-Ballard/Set-WindowState.ps1
Hide, Show, Minimize, Maximize, etc window from Powershell.
function Set-WindowState {
<#
.SYNOPSIS
Set the state of a window.
.DESCRIPTION
Set the state of a window using the `ShowWindowAsync` function from `user32.dll`.
.PARAMETER InputObject
The process object(s) to set the state of. Can be piped from `Get-Process`.
@AgentOak
AgentOak / youtube_formats.md
Last active July 24, 2024 11:20
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@jimmywarting
jimmywarting / readme.md
Last active July 27, 2024 17:49
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@zexeder
zexeder / slick-random.js
Created September 4, 2017 09:28
Slick Random Slides
$.fn.randomize = function (selector) {
var $elems = selector ? $(this).find(selector) : $(this).children(),
$parents = $elems.parent();
$parents.each(function () {
$(this).children(selector).sort(function (childA, childB) {
// * Prevent last slide from being reordered
if($(childB).index() !== $(this).children(selector).length - 1) {
return Math.round(Math.random()) - 0.5;
}
@mtx-z
mtx-z / wp-woocommerce-edit-product-loop-thumbnail-template.php
Last active February 22, 2024 08:47
Woocommerce (3.8.1-6.2.2) edit product loop thumbnail template (allows to had/edit HTML outputted by Woocommerce to generate the product loop thumbnail image area, as there is no dedicated template file to override) - Wordpress / WooCommerce 3.8.1-6.2.2
<?php
/**
* Edit default Woocommerce product loop thumbnail template
* As there is no dedicated Woocommerce template (eg wp-content/plugins/woocommerce/templates/loop/price.php)
* because it's generated using filter, we must remove Woocommerce hook, and add our own "at the same place"
* to edit the product loop thumbnail template
* tested up to
* 14/07/2023 :
* Woocommerce 6.2.2
* 12/10/2020 :