Skip to content

Instantly share code, notes, and snippets.

View frankjdelgado's full-sized avatar

Francisco Delgado frankjdelgado

View GitHub Profile
@frankjdelgado
frankjdelgado / easyio-skip-gif-resizing.php
Created December 15, 2022 21:13 — forked from nosilver4u/easyio-skip-gif-resizing.php
Prevent resizing of GIF images by Easy IO
<?php
/*
Plugin Name: Easy IO GIF Skipper
Version: 1.0.0
*/
add_filter( 'exactdn_pre_args', 'easyio_skip_gif_resizing', 10, 2 );
function easyio_skip_gif_resizing( $args, $image_url ) {
if ( strpos( $image_url, '.gif' ) ) {
return array();
@frankjdelgado
frankjdelgado / array.js
Last active June 29, 2016 21:47
Javascript array custom functions
/*
* Returns an array that contains the indexes from a search that match the array values with the given regular expression
* @param str Regular expresion
* return Array of indexes (integers), -1 if no value matches the regexp
*/
Array.prototype.allIndexOfStr = function (str) {
var pos = [];
for (var j=0; j<this.length; j++) {
if (this[j].match(str))
pos.push(j);