Skip to content

Instantly share code, notes, and snippets.

View CreativeNotice's full-sized avatar

Ryan Mueller CreativeNotice

View GitHub Profile
@CreativeNotice
CreativeNotice / gist:3440828
Created August 23, 2012 19:50
Function to check for struct key and value existence
public Boolean function structKeyHasValue( required struct s, required any o)
{
return ( structKeyExists(s,o) && len(s[o]) > 0);
}
@CreativeNotice
CreativeNotice / test-query-to-csv-func.cfm
Created May 23, 2012 13:58
CF method to convert a query to csv output.
<cfscript>
/**
* queryToCsv
* Allows us to pass in a query object and returns that data as a CSV.
* This is a refactor of Ben Nadel's method, http://www.bennadel.com/blog/1239-Updated-Converting-A-ColdFusion-Query-To-CSV-Using-QueryToCSV-.htm
* @param {Query} q {required} The cf query object to convert. E.g. pass in: qry.execute().getResult();
* @param {Boolean} hr {required} True if we should include a header row in our CSV, defaults to TRUE
* @param {String} d {required} Delimiter to use in CSV, defaults to a comma (,)
* @return {String} CSV content
*/
@CreativeNotice
CreativeNotice / Yammer_Tidy_2
Created April 13, 2012 15:22
Yammer Tidy 2
// ==UserScript==
// @name Tidy Yammer
// @version 1.2
// @include http*://*yammer.com/*
// ==/UserScript==
/*
* Original idea by dwnz http://userscripts.org/scripts/review/107377
* Updated 04/13/2012 by @CreativeNotice