Skip to content

Instantly share code, notes, and snippets.

View lifeboatpres's full-sized avatar

Eric Klien lifeboatpres

View GitHub Profile
@danielbachhuber
danielbachhuber / gist:7126249
Last active December 21, 2021 15:46
Include posts from authors in the search results where either their display name or user login matches the query string
<?php
/**
* Include posts from authors in the search results where
* either their display name or user login matches the query string
*
* @author danielbachhuber
*/
add_filter( 'posts_search', 'db_filter_authors_search' );
function db_filter_authors_search( $posts_search ) {
@djekl
djekl / video_details.php
Created June 21, 2013 15:50
Get Video Details from YouTube or Vimeo
<?php
$urls = array();
$videos = array();
// vimeo test
$urls[] = 'http://vimeo.com/6271487';
$urls[] = 'http://vimeo.com/68546202';
// youtube test
@hakre
hakre / preg_replace_callback_offset.php
Last active December 6, 2017 08:50
preg_replace_callback_offset() - preg_replace_callback() with offset capturing.
<?php
/**
* preg_replace_callback_offset()
*
* preg_replace_callback() with offset capturing.
*
* Usage:
*
* Works exactly like preg_replace_callback() but differs in passing the matches to the callback function.
* Matches are as if using preg_match() with the PREG_OFFSET_CAPTURE flag:
@pceres
pceres / blur_detector
Created March 26, 2011 12:29
blurry photos detection
#! /bin/bash
#
# Author: Pasquale Ceres (pasquale_c@hotmail.com)
# License: GPL ver. 3
#
# Script originally developed for the
# "San Lorenzo Martire Caposele Church Records Digitalization Project"
#
# http://www.facebook.com/group.php?gid=188973755117&v=photos