Skip to content

Instantly share code, notes, and snippets.

View rmccue's full-sized avatar

Ryan McCue rmccue

View GitHub Profile
@rmccue
rmccue / aggregate-feed.php
Created April 22, 2010 08:25 — forked from smajda/aggregate-feed.php
An improved version of the RSS merger
<?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: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/
@rmccue
rmccue / gist:250682
Created December 7, 2009 07:15
Normalise SimplePie items to put into a database
<?php
require('simplepie.inc');
$feed = new SimplePie('http://example.com/feed/');
foreach($feed->get_items() as $item) {
$new_item = (object) array(
'hash' => $item->get_id(true),
'timestamp' => $item->get_date('U'),
'title' => $item->get_title(),
'content' => $item->get_content(),
@rmccue
rmccue / plugin-file.php
Created January 17, 2012 12:27 — forked from kovshenin/plugin-file.php
Improved class concept
<?php
/*****
All new versions will be posted at
https://github.com/rmccue/Rotor_WPPlugin
Please use that repository instead of this Gist.
******/
@rmccue
rmccue / gist:1519244
Created December 25, 2011 13:26
A list of plugins from WP.org with broken readmes
1-button-plugin
1g1g-music-bar
2performant-product-importer
302-moved-temporarily
3d-twitter-wall
3rd-party-authentication
404-not-found-report
404-plugin
4q-survey
5gig-concerts

Keybase proof

I hereby claim:

  • I am rmccue on github.
  • I am rmccue (https://keybase.io/rmccue) on keybase.
  • I have a public key ASB1nf87pm0h0dkgm8ejxGL8KyOkkwbcA-7udP-D7I8qHwo

To claim this, I am signing this object:

<?php
/**
* Plugin Name: WP REST API Strict Mode
* Description: Triggers an error when unregistered parameters are used.
* Author: Ryan McCue
* Author URI: http://rmccue.io/
* Version: 0.1
*
* Requires https://core.trac.wordpress.org/ticket/35507
*/
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0MBRXg5cCp7ImA9WhRXEk8.&quot;"><id>tag:blogger.com,1999:blog-8515187792149845150</id><updated>2011-12-18T16:17:34.628+01:00</updated><category term="Chaussures" /><category term="Pays Basque" /><category term="beauté" /><category term="sport" /><category term="lingerie" /><category term="Perso" /><category term="Article non sponsorisé" /><category term="Invitation" /><category term="Evénements" /><category term="Article Sponsorisé" /><category term="Bons plans" /><categ
@rmccue
rmccue / gist:e03d99d04e1db8ab06a6
Created June 23, 2014 03:43
Human Made Autoloader
<?php
/**
* Plugin Name: HM Autoloader
* Description: Provides a standard autoloader utility for the site to use
* Author: Human Made Limited
* Author URI: http://hmn.md/
*/
namespace HM;

Keybase proof

I hereby claim:

  • I am rmccue on github.
  • I am rmccue (https://keybase.io/rmccue) on keybase.
  • I have a public key ASCILnUMWLsVHRN6vU_QWIVD43Gdi69Du7-v8Rp0bKrFUgo

To claim this, I am signing this object:

@rmccue
rmccue / react-dom.js
Created August 26, 2017 05:03
not-react.js
// Resolve custom components by calling .render() recursively.
const resolveComponents = element => {
// If the "component" is a string, it's static text.
if ( typeof element === 'string' ) {
return element;
}
// If the type is a string, it's already in DOM node form.
if ( typeof element.type === 'string' ) {
return element;