This is a small component that does a simple regex check of the user agent string, then routes to the specified mobile url. There are parameters you can set in the send() function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component output="false" { | |
/* **************************** APPLICATION VARIABLES **************************** */ | |
// The application name. If you do not set this variable, or set it to the empty string, | |
// your CFC applies to the unnamed application scope, which is the ColdFusion J2EE servlet | |
// context. | |
THIS.name = "foo"; | |
// Life span, as a real number of days, of the application, including all Application scope variables. | |
THIS.applicationTimeout = createTimeSpan(0, 1, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Auto Execute Section Starts Here;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;Allow only one instance to run | |
#SingleInstance force | |
#Persistent | |
;Set tray tip and tray menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
CreateObject( "java", "java.util.Collections" ).Shuffle(variables.badwordArray); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generatePassword = function(args){ | |
// alpha array | |
var chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'], | |
// numeric array | |
numArr = [0,1,2,3,4,5,6,7,8,9], | |
// special character array | |
sChars = ['!','@','#','$','%','^','&','*','?']; | |
// set default values of args | |
var defaults = {}; | |
defaults['len'] = 16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
component output="false" { | |
public googleURL function init(apiKey) | |
description="Initialize this CFC as an object" | |
{ | |
variables.apiKey = arguments.apiKey; | |
return this; | |
} | |
public string function ShortenURL(required string url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Bad Word Filter</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script language="JavaScript" type="text/javascript"> | |
$(function(){ | |
$filterBox = $('#filterBox'); | |
$frmWords = $('#frmWords'); | |
$thewords = $('#thewords'); | |
$buttonCheck = $('#buttonCheck').click(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global) { | |
if ( !global.Event && !('keys' in Object) && !('bind' in Function) ) { return } | |
var eventProto = Event.prototype, | |
EVENTS = { | |
'mouse': [ 'click', 'dblclick', 'contextmenu', 'mousedown', 'mouseup', 'mouseover', 'mousemove', 'mouseout', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'drop'], | |
'key': [ 'keydown', 'keypress', 'keyup', 'input'], | |
'res': [ 'load', 'unload', 'beforeunload', 'abort', 'error', 'resize', 'scroll', 'readystatechange' ], | |
'form': [ 'select', 'change', 'submit', 'reset', 'focus', 'blur' ], | |
'ui': [ 'DOMFocusIn', 'DOMFocusOut', 'DOMActivate', 'DOMCharacterDataModified', 'DOMNodeInserted', 'DOMNodeRemoved', 'DOMSubtreeModified' ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// serve content as mime type css | |
getPageContext().getResponse().setcontenttype('text/css;charset=utf-8'); | |
// supress whitespace with cfoutputonly | |
setting enablecfoutputonly="true"; | |
// example of url varialbe call: /rt.cfm?height=1.25&weight=bold | |
// structure of default values, if not received in url | |
variables.baseSize = { | |
lineHeight = (structkeyexists(url,'size')) ? url.height : 1.5, | |
fontWeight = (structkeyexists(url,'size')) ? url.weight : 'normal' |
NewerOlder