Skip to content

Instantly share code, notes, and snippets.


Ryan McCue rmccue

View GitHub Profile
View gist:4584739
//get the review type based on page custom meta field
function oswc_get_review_meta($postid) {
//try every reasonble conceivable variation that the user my enter to make this as user friendly as possible
$possible = array(
'Review Type',
'review type',
View gist:3075102
// $z is the pnormaldist with power = 0.05. I.e., pnormaldist(1-power/2)
function score($pos, $n) {
if ($n == 0) { return 0; }
$z = 1.95996397158435;
$phat = 1.0*$pos/$n;
return ($phat + $z*$z/(2*$n) - $z * sqrt(($phat*(1-$phat)+$z*$z/(4*$n))/$n))/(1+$z*$z/$n);
rmccue / find-local-vars.php
Created Jan 22, 2012 — forked from nacin/find-local-vars.php
Find Unset Local Variables
View find-local-vars.php
* Find unset PHP variables
* Deals with scope fairly correctly.
* Known bugs:
* - Does not yet support `if: ... endif;` (etc)
* - Does not yet support {$a}/${a} (coming soon)
rmccue / plugin-file.php
Created Jan 17, 2012 — forked from kovshenin/plugin-file.php
Improved class concept
View plugin-file.php
All new versions will be posted at
Please use that repository instead of this Gist.
View gist:591135
Plugin Name: Taxononmy Navigation Dropdown
Version: 0.1
Plugin URI:
Description: This plugin allows you to add a simple widget linking all of your taxonomies together.
Author: Anthony Cole
Author URI:
Copyright 2010 Anthony Cole ( email: )
rmccue / aggregate-feed.php
Created Apr 22, 2010 — forked from smajda/aggregate-feed.php
An improved version of the RSS merger
View aggregate-feed.php
/* Merge multiple RSS feeds with SimplePie
* Just modify the path to SimplePie and
* modify the $feeds array with the feeds you want
* You should probably also change the channel title, link and description,
* plus I added a CC license you may not want
* Help from: