Skip to content

Instantly share code, notes, and snippets.

@Blindmikey
Blindmikey / redirects.php
Last active February 4, 2016 02:13
PHP Mass Redirection
<?php
/**
* Simple PHP script for mass redirects
*
* @author: Michael Niles <github@blindmikey.com>
* @version: 1.0.0
*/
/**
@Blindmikey
Blindmikey / SugarAPI.class.php
Created June 3, 2015 15:20
PHP SugarCRM Class
<?php
class SugarAPI
{
/**
* Default Class Settings
* @var array
*/
protected $s;
/**
@Blindmikey
Blindmikey / dynamic_img_src.php
Last active June 13, 2017 23:26
Wordpress: Pull any image file and get it's thumbnail in any size/crop dynamically without the need for add_image_size()
<?php
/**
* Call any image file (URI or ABSPATH) or image ID
* and get it's thumbnail in any size/crop dynamically
*
* Usage: <?php
* echo dynamic_img_src( 'http://yoursite.com/images/image.png', 'width=800&height=600&crop=true' );
* echo dynamic_img_src( 38, array( 'width'=>800, 'height'=>600, 'crop'=>true ) );
*
* @author Michael Niles <github@blindmikey.com>
@Blindmikey
Blindmikey / update_cats.php
Last active August 29, 2015 14:18
Simple script to update/reassign Wordpress posts from old categories to new categories.
<?php
/**
* Simple script to update/reassign posts from old categories to new categories.
* Creates any new categories that don't yet exist.
* Removes old categories that have now been emptied.
*
* @author Michael Niles <blindmikey@gmail.com>
* @version 1.0.0
*/