Skip to content

Instantly share code, notes, and snippets.

View randy-johnson's full-sized avatar

Randy Johnson randy-johnson

View GitHub Profile
@randy-johnson
randy-johnson / strings.cfm
Created August 21, 2011 00:14
Comparing Strings In Coldfusion
<cfset string1 = "Randy">
<cfset string2 = "RANDY">
<cfoutput>
<!--- IS: Case Insensitive --->
<p><cfif string1 is string2>
"#string1#" is equal to "#String2#"
@randy-johnson
randy-johnson / strings-is-operator.cfm
Created August 21, 2011 00:28
Using the IS Operator to Compare Strings in Coldfusion
<!---
Title: String Comparison Using the IS Operator.
From: Coldfusion By Example
Website: http://www.randy.cc/
Date: 8/20/2011
--->
<!--- Set variables for testing --->
<cfset string1 = "Randy">
<cfset string2 = "RANDY">
@randy-johnson
randy-johnson / strings-eq-operator.cfm
Created August 21, 2011 00:42
Using the EQ Operator to Compare Strings in Coldfusion
<!---
Title: String Comparison Using the EQ Operator.
From: Coldfusion By Example
Website: http://www.randy.cc/
Date: 8/20/2011
--->
<!--- Set variables for testing --->
<cfset string1 = "Randy">
<cfset string2 = "RANDY">
@randy-johnson
randy-johnson / strings-compare-function.cfm
Created August 21, 2011 00:46
Using the COMPARE Function to Compare Strings in Coldfusion
<!---
Title: String Comparison Using the Compare Function.
From: Coldfusion By Example
Website: http://www.randy.cc/
Date: 8/20/2011
--->
<!--- Set variables for testing --->
<cfset string1 = "Randy">
<cfset string2 = "RANDY">
@randy-johnson
randy-johnson / strings-comparenocase-function.cfm
Created August 21, 2011 00:52
Using the COMPARENOCASE Function to Compare Strings in Coldfusion
<!---
Title: String Comparison Using the CompareNoCase Function.
From: Coldfusion By Example
Website: http://www.randy.cc/
Date: 8/20/2011
--->
<!--- Set variables for testing --->
<cfset string1 = "Randy">
<cfset string2 = "RANDY">
@randy-johnson
randy-johnson / railo.conf
Created August 23, 2011 00:35
ProxyPass / Railo / Tomcat URL Rewriting
ProxyPreserveHost On
ProxyPass /dealers/ !
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
RewriteEngine On
ProxyRequests Off
RewriteCond %{REQUEST_URI} !^.*/(fancybox|flex2gateway|jrunscripts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm|index.cfm|favicon.ico|ckfinder|ckeditor|assets|product-images|store|dealers)($|/.*$) [NC]
RewriteRule "^/(.*)" ajp://localhost:8009/rewrite.cfm/$1 [P,QSA,L]
@randy-johnson
randy-johnson / isInIframe.js
Created September 14, 2011 00:02
In IFrame?
var isInIFrame = (window.location != window.parent.location) ? true : false;
@randy-johnson
randy-johnson / jquery-ajax-pass-data.js
Created September 21, 2011 02:44
jQuery ajax example of passing data
$.ajax({
cache:false,
type: "POST",
url: "/filters/"+action,
data: {category:category,groupname:groupname,gtype:gtype},
success: function(msg){
@randy-johnson
randy-johnson / username.cfm
Created July 26, 2012 18:48
Username Validation
<cfparam name="form.username" default="">
<cfif form.username is not "">
<cfif reFindNoCase("^([a-z_\d]+)$", form.userName)>
good
<cfelse>
empty or bad chars found
</cfif>
@randy-johnson
randy-johnson / xero.cfc
Last active August 29, 2015 14:14 — forked from mjb/xero.cfc
<!-----------------------------------------------------------------------------------
@@Author: Matthew Bryant
@@Company: TORO Waste Equipment
@@license: The MIT License (http://opensource.org/licenses/MIT)
@@Version: 0.1 $
@@Description: For use with Xero API (https://api.xero.com)
STEP 1. GENERATE SSL KEY
1.1. Download openSSL for windows: http://slproweb.com/products/Win32OpenSSL.html