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
<!--- Raw dynamic data ---> | |
<cfsavecontent variable="content"> | |
<h1>Moo</h1> | |
<p> | |
Rock your body... | |
</p> | |
<script src="https://gist.github.com/2385560.js?file=gistfile1.txt"></script> | |
<p> | |
After gist. | |
</p> |
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
<!--- generic function to replace gists with raw ---> | |
<cffunction name="replaceGistWithRaw" output="false" returnType="string"> | |
<cfargument name="input" type="string" required="true"> | |
<cfargument name="prefix" type="string" required="false" default="<pre>"> | |
<cfargument name="postfix" type="string" required="false" default="</pre>"> | |
<!--- This is a prefix used for our cache. It ensures all our values share a common prefix and won't conflict with others. ---> | |
<cfset var CACHE_KEY = "gist_"> | |
<cfset var x = ""> | |
<cfset var result = ""> |
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
<!--- Raw dynamic data ---> | |
<cfsavecontent variable="content"> | |
<h1>Moo</h1> | |
<p> | |
Rock your body... | |
</p> | |
<script src="https://gist.github.com/2385560.js?file=gistfile1.txt"></script> | |
<p> | |
After gist. | |
</p> |
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
<script id="result-template" type="text/x-handlebars-template"> | |
<div class="entry"> | |
<h1>{{title}}</h1> | |
<div class="body"> | |
{{body}} | |
</div> | |
</div> | |
</script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 1</title> | |
<script src="js/handlebars-1.0.0.beta.6.js"></script> | |
<script id="result-template" type="text/x-handlebars-template"> | |
<h2>Your Bio</h2> | |
<p> | |
Your name is {{firstname}} {{lastname}} and you are {{age}} years old. | |
</p> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 2</title> | |
<script src="js/handlebars-1.0.0.beta.6.js"></script> | |
<script id="result-template" type="text/x-handlebars-template"> | |
<h2>Your Favorite Things</h2> | |
{{#if things}} | |
<ul> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 3</title> | |
<script src="js/handlebars-1.0.0.beta.6.js"></script> | |
<script src="js/webtoolkit.md5.js"></script> | |
<script id="result-template" type="text/x-handlebars-template"> | |
<h2>You and Your Gravatar</h2> | |
<p> | |
Your email is {{email}} and your gravatar is:<br/> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Comic Character Searcher</title> | |
<script src="js/handlebars-1.0.0.beta.6.js"></script> | |
<script id="result-template" type="text/x-handlebars-template"> | |
<h2>Results</h2> | |
<p> | |
Your search returned {{number_of_total_results}} result(s). | |
</p> |
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
<!--- | |
Note - should add some logic to ensure file was properly image - can't trust the client | |
---> | |
<cfsetting showdebugoutput="false"> | |
<cffile action="upload" filefield="afile" destination="uploads" nameconflict="makeUnique"> | |
<cfset dataURL = "data:" & "image/" & cffile.clientfileext & ";base64," & toBase64(fileReadBinary(cffile.serverdirectory & "/" & cffile.serverfile))> | |
<cfset result = {"name":cffile.clientfile, "type":cffile.contenttype,"dataUrl":dataURL,"username":form.username,"accountnum":form.accountnum}> | |
<cfcontent type="application/json" reset="true"><cfoutput>#serializeJSON(result)#</cfoutput> |
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
if(structKeyExists(url,"init")) { | |
ormReload(); | |
applicationStop(); | |
location(url="index.cfm",addtoken=false); | |
} |