Skip to content

Instantly share code, notes, and snippets.

View jameswburke's full-sized avatar

James Burke jameswburke

View GitHub Profile
<?php
/**
* Wrapper for WP_Query
* Interacts directly with WP_Query_Manager to ensure
* only unique posts are ever returned.
*
* Known issues:
* Won't work with offset values
*/
class Unique_WP_Query extends WP_Query {
@jameswburke
jameswburke / weather.cfm
Created December 26, 2011 22:27
Coldfusion Goolge Weather Caching
<!--- Try to read the file --->
<cftry>
<cffile
action = "read"
file = "C:\weatherCache.txt"
variable = "readWeather" />
<!--- In the event on an error (usually the file is missing) ping google weather and get the data --->
<cfcatch type="Any">
/**
* SocketManager - Singleton to manage multi-channel socket 'routing', need a way to merge with socket.io so client sessions aren't stored twice in memory,
*
* Requires Socket.IO-node and Socket.IO client libraries.
*
* Usage:
* in your main app.js file (or whereever you create the server)
*
* var io = require('socket.io'),
* sm = require('socketmanager');