Skip to content

Instantly share code, notes, and snippets.

View nathanstanford2's full-sized avatar

Nathan Stanford nathanstanford2

View GitHub Profile
@-moz-document regexp("https://[^./]*\\.slack\\.com/(?!pricing)(?!security).*")
{
body
{
background: #222;
color: #e6e6e6;
}
a
{
@nathanstanford2
nathanstanford2 / gist:4353213
Created December 21, 2012 14:43
Coldfusion: Dump Function (CFScript)
<cffunction name="dump" output="true">
<cfargument name="variable" type="any" required="true" />
<cfargument name="abort" type="any" default="false" />
<cfdump var="#arguments.variable#" />
<cfif arguments.abort eq "true">
<cfabort />
</cfif>
</cffunction>
@nathanstanford2
nathanstanford2 / CFML: MimeType
Created December 18, 2012 16:14
CFML: MimeType
<cfset content_type = getPageContext().getServletContext().getMimeType("<!--- Path to file here --->") />
@nathanstanford2
nathanstanford2 / gist:4032110
Created November 7, 2012 15:02
Coldbox: Create Handler
<cfcomponent output="false" extends="coldbox.system.EventHandler">
<!--- Default Action --->
<cffunction name="index" returntype="void" output="false">
<cfargument name="event">
<cfset event.setView("general/mypdjfosdjfopjsapof")>
</cffunction>
@nathanstanford2
nathanstanford2 / QueryToStruct.cfm
Created November 6, 2012 12:58 — forked from erikvold/QueryToStruct.cfm
CFML: QueryToStruct
<cffunction name="QueryToStruct" returntype="any" hint="Converts a query to a struct, or an array of structs">
<cfargument name="query" type="query" required="true"/>
<cfargument name="row" type="query"/>
<cfargument name="forceArray" type="boolean" default="false"/>
<cfscript>
var local = StructNew();
var result = StructNew();
var idx = "";
var colName = "";