This file contains hidden or 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
javascript:if%20(typeof(%20ShowCFDebugSQL%20)%20==%20'undefined'){%20function%20ShowCFDebugSQL(){%20var%20arrTable%20=%20document.getElementsByTagName(%20'table'%20);%20var%20arrPre%20=%20null;%20var%20objCFDebugTable%20=%20null;%20var%20arrRawData%20=%20new%20Array();%20var%20objRawData%20=%20null;%20var%20objFrame%20=%20document.createElement(%20'textarea'%20);%20var%20i%20=%200;%20for%20(i%20=%200%20;%20i%20<%20arrTable.length%20;%20i++){%20if%20(%20arrTable[%20i%20].className%20&&%20(arrTable[%20i%20].className%20==%20'cfdebug')%20){%20objCFDebugTable%20=%20arrTable[%20i%20];%20break;%20}%20}%20if%20(objCFDebugTable){%20arrPre%20=%20objCFDebugTable.getElementsByTagName(%20'pre'%20);%20for%20(i%20=%200%20;%20i%20<%20arrPre.length%20;%20i++){%20if(%20arrPre[%20i%20].innerHTML.match(%20new%20RegExp(%20'SELECT|INSERT|DELETE|JOIN|WHERE',%20'i'%20)%20)%20){%20objRawData%20=%20new%20Object();%20objRawData.SQL%20=%20arrPre[%20i%20].innerHTML;%20objRawData.Params%20=%20'';%20if%20(%20(arrPre[%20i%20].nextSibling.n |
This file contains hidden or 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
# force **NO** SSL for non-login, non-registration pages | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} !^admin\.company\.com$ | |
RewriteCond %{URL} !^/register.cfm$ | |
RewriteCond %{URL} !^/login.cfm$ | |
RewriteRule ^(.*)?$ http://%{HTTP_HOST}/$1 [R=301,L] | |
# force SSL for login & registration pages | |
RewriteCond %{HTTPS} off | |
RewriteRule ^login.cfm(.*)$ https://%{HTTP_HOST}/login.cfm$1 [R=301,L] |
This file contains hidden or 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 extends="taffy.core.api" { | |
function onTaffyRequest(string verb, string cfc, struct requestArguments, string mimeExt, struct headers) { | |
local.metadata = getMetadata( getBeanFactory().getBean(arguments.cfc) ); | |
//do stuff with metadata | |
} | |
} |
This file contains hidden or 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
/cfformgateway/* = cfusion | |
/CFFormGateway/* = cfusion | |
/flex2gateway/* = cfusion | |
/flex2gateway = cfusion | |
/cffileservlet/* = cfusion | |
/CFFileServlet/* = cfusion | |
/cfform-internal/* = cfusion | |
/flashservices/gateway/* = cfusion | |
/flex-internal/* = cfusion | |
/rest/* = cfusion |
This file contains hidden or 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
<cffunction name="arrayMerge"> | |
<cfargument name="a" /> | |
<cfargument name="b" /> | |
<cfset var i = 0 /> | |
<cfset var base = StructNew() /> | |
<cfloop list="#arrayToList(a)#" index="i"> | |
<cfset base[i] = "" /> | |
</cfloop> | |
<cfloop from="1" to="#arrayLen(b)#" index="i"> | |
<cfset base[b[i]] = "" /> |
This file contains hidden or 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
// - NOT jsonPath or jsonQuery which are horrendously complex and fugly | |
// - simple query syntax 'its just javascript' | |
// - simple string interpolation | |
// - search then sorting | |
Lawnchair.plugin((function(){ | |
// | |
var interpolate = function(template, args) { | |
var parts = template.split('?').filter(function(i) { return i != ''}) | |
, query = '' |
This file contains hidden or 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
#### Contents of the preconfiguration file (for squeeze) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
# The values can also be preseeded individually for greater flexibility. | |
#d-i debian-installer/language string en | |
#d-i debian-installer/country string NL | |
#d-i debian-installer/locale string en_GB.UTF-8 | |
# Optionally specify additional locales to be generated. | |
#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8 | |
d-i debian-installer/locale string en_US |
This file contains hidden or 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
#!/bin/sh | |
# this script requires GNU-SED for the "-r" option. | |
# Get it via: sudo brew install gnu-sed | |
# command found at: http://stackoverflow.com/questions/4589731/git-blame-statistics/4590487#4590487 | |
echo "Lines in HEAD by Committer:" | |
git ls-tree -r HEAD|sed -re 's/^.{53}//'|while read filename; do file "$filename"; done|grep -E ': .*text'|sed -r -e 's/: .*//'|while read filename; do git blame "$filename"; done|sed -r -e 's/.*\((.*)[0-9]{4}-[0-9]{2}-[0-9]{2} .*/\1/' -e 's/ +$//'|sort|uniq -c |
This file contains hidden or 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
<!--- | |
An example of writing REST web services in ColdFusion, without a framework (and why you should use one). | |
Provided as an example of a simple implementation, but should not be considered a best practice or something | |
I am promoting. Not thoroughly tested, not very maintainable, not even that reusable. | |
---> | |
<cfsetting enablecfoutputonly="true" showdebugoutput="false" /> | |
<cffunction name="StructKeyRequire" output="false"> | |
<cfargument name="s" type="struct" /> |
This file contains hidden or 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 { | |
public function init() output="false" { | |
return this; | |
} | |
public function parse(data) output="false" { | |
local.links = []; | |
//loop over each line in the file |