Skip to content

Instantly share code, notes, and snippets.

View 65's full-sized avatar

Duncan Isaksen-Loxton 65

View GitHub Profile
cleanmgr /d c: /sageset:1
@65
65 / error.txt
Created March 11, 2012 08:13
utf-7 encoding error when using cfpop
Unable to retrieve message content: java.io.UnsupportedEncodingException: unicode-1-1-utf-7
@65
65 / images.cfm
Created March 11, 2012 07:46
BlogCFC Flickr Images Pod
<cfsetting enablecfoutputonly=true>
<cfprocessingdirective pageencoding="utf-8">
<cfmodule template="../../tags/scopecache.cfm" cachename="pod_images" scope="application" timeout="#application.timeout#">
<cfmodule template="../../tags/podlayout.cfm" title="Recent Flickr">
<cfoutput>
</cfoutput>
</cfmodule>
</cfmodule>
<cfsetting enablecfoutputonly=false>
@65
65 / analytics.cfm
Created March 11, 2012 08:24
Filtering your traffic from Google Analytics - the better way
<cfif isUserInRole('Admin')>
<body onLoad="javascript:__utmSetVar('AdminUser')">
<cfelse>
<body>
</cfif>
<cfoutput>
<cfif pod eq int(arraylen(podlist)/2)+1>
</div>
<div style="float:right;width:50%;">
</cfif>
</cfoutput>
@65
65 / query.sql
Created March 11, 2012 07:58
Random rows in SQL
SELECT TOP 1 column
FROM table
ORDER BY NEWID()
@65
65 / info.txt
Created March 11, 2012 07:57
Windows version from CGI.HTTP_USER_AGENT
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
@65
65 / dDumper.js
Created March 11, 2012 07:42
ColdFusion style variable dump for javascript
dDumper(myQuery);
@65
65 / url.txt
Created March 11, 2012 07:38
Discount Images on Amazon ECS images
http://images.amazon.com/images/P/0976925524.01._PE20_SCMZZZZZZZ_.jpg
@65
65 / associateid.cfm
Created March 11, 2012 07:36
Using Your Associates ID with Amazon ECS
<cfset ASIN = "">
<!--- The asin code you just picked --->
<cfset accesskey = "">
<!--- Your unique API access key --->
<cfset ASIN = "sixfive-21">
<!--- Your associates ID --->
<cfset var AmazonURL = "http://ecs.amazonaws.co.uk/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=#accesskey#&AssociateTag=#associateTag#&Operation=ItemLookup&MerchantID=All&ItemId=#ASIN#&ResponseGroup=Medium">