Skip to content

Instantly share code, notes, and snippets.

@sebduggan
sebduggan / hmacEncode.cfm
Created October 30, 2017 09:26
HMAC encode function for FoxyCart
<cffunction name="hmacEncode" returntype="string" output="false">
<cfargument name="sku" required="true" />
<cfargument name="name" required="true" />
<cfargument name="value" required="true" />
<cfset var stringToHash = arguments.sku & arguments.name & arguments.value />
<cfset var apiKey = "YOUR_API_KEY_HERE" />
<cfset var hashedString = hmac( stringToHash, apiKey, "HMACSHA256" ) />
<cfreturn lcase( hashedString ) />
@sebduggan
sebduggan / RC4.cfc
Last active May 3, 2016 11:19
RC4 component, modified to work with FoxyCart data feeds
<!---
ColdFusion RC4 Component
Written by Steve Hicks ([email protected])
http://www.aquafusionmedia.com
Version 1.0 - Released: April 24, 2012
Version 1.1 - Modified by Seb Duggan ([email protected])
Added arguments to allow input and output not to be Hex values
@sebduggan
sebduggan / config.xml.cfm
Last active March 21, 2016 15:29
SES URLs in Mura FW/1 plugins
<displayobjects location="global">
<displayobject
name="Statistics"
component="includes.displayObjects"
displaymethod="dspStatistics"
persist="false">
<route
pattern="batting"
action="statistics:main.batting" />
<route
@sebduggan
sebduggan / config.xml.cfm
Last active January 11, 2019 17:42
Mura FW/1 plugins displayObject config
<displayobjects location="global">
<displayobject
name="Statistics"
component="includes.displayObjects"
displaymethod="dspStatistics"
persist="false" />
</displayobjects>
RewriteEngine On
# If it's a real path, just serve it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#########################
##### MySite
@font-face {
font-family: 'VegurRegular';
src: url('Vegur-R_0500.eot');
src: local('Vegur'),
local('Vegur-Regular'),
url('Vegur-R_0500.woff') format('woff'),
url('Vegur-R_0500.ttf') format('truetype'),
url('Vegur-R_0500.svg#Vegur-Regular') format('svg');
}