Skip to content

Instantly share code, notes, and snippets.

View boycaught's full-sized avatar
🏠
Working from home!

.LAG boycaught

🏠
Working from home!
View GitHub Profile
@boycaught
boycaught / gist:3127569
Created July 17, 2012 06:21
CF+Java directory lister
<cfscript>
ourDirectory = expandPath(“./”);
directoryList = createObject(“java”,”java.io.File”).init(ourDirectory).list();
</cfscript>
@boycaught
boycaught / gist:3112362
Created July 14, 2012 17:53
CFScript Web Functions
<cfscript>
/**
* WEB FUNCTIONS
**/
remote any function getWebService(){
var targetUrl = '';
var webService = new http();
var content = '';
var thisresult = '';
@boycaught
boycaught / ajaxify-html4.js
Created June 6, 2012 23:44 — forked from balupton/ajaxify-html4.js
Ajaxify a Website using the HTML4 HashChange Functionality
(function(window,undefined){
// Prepare our Variables
var
document = window.document,
$ = window.jQuery;
// Wait for Document
$(window).bind(function(){
// Prepare Variables
@boycaught
boycaught / web-xml-urlrewritefilter
Created June 5, 2012 02:00 — forked from imageaid/web-xml-urlrewritefilter
Web.xml Settings for UrlRewriteFilter
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
@boycaught
boycaught / generateRandomAlphaNumString.cfm
Created May 28, 2012 23:01
Generate random alphanumirc string of any length
<cfscript>
function generateRandomAlphaNumString(size) {
var _t = [];
for (i=1; i<=arguments.size; i++) {
if (randrange(1,2) eq 2) {_t[i]=chr(randrange(65,90));}
else if (randrange(1,2) eq 2) {_t[i]=chr(randrange(97,122));}
else {_t[i]=chr(randrange(48,57));}
}
component {
public function init() output="false" {
return this;
}
public function parse(data) output="false" {
local.links = [];
//loop over each line in the file