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
<cffunction | |
name="setMachineAttributes" access="private" returntype="void" output="true" | |
hint="Sets machine specific variables as needed."> | |
<!--- developer/staging specific variables are overridden here ---> | |
<cfset var machineName=createObject("java", "java.net.InetAddress").localhost.getHostName()> | |
<cfswitch expression="#machinename#"> | |
<!--- modius machine ---> |
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
Greyhame:railo modius$ export set VAGRANT_LOG=info | |
Greyhame:railo modius$ vagrant up | |
INFO global: Vagrant version: 1.1.4 | |
... | |
INFO vagrant: `vagrant` invoked: ["up"] | |
INFO environment: Environment initialized (#<Vagrant::Environment:0x000001022f2828>) | |
INFO environment: - cwd: /Users/modius/Kitchen/railo | |
INFO environment: Home path: /Users/modius/.vagrant.d | |
INFO environment: Local data path: /Users/modius/Kitchen/railo/.vagrant | |
INFO environment: Loading plugin from JSON: berkshelf |
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
Olorin:myberk modius$ export set VAGRANT_LOG=info | |
Olorin:myberk modius$ vagrant up | |
INFO global: Vagrant version: 1.1.0 | |
... | |
INFO environment: Loading plugin from JSON: berkshelf-vagrant | |
ERROR root: Failed to load plugin: berkshelf-vagrant | |
ERROR root: -- Error: #<Gem::LoadError: Unable to activate berkshelf-vagrant-1.0.6, because net-ssh-2.2.2 conflicts with net-ssh (~> 2.6.6), net-scp-1.0.4 conflicts with net-scp (~> 1.1.0)> | |
ERROR root: -- Backtrace: | |
ERROR root: /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts' | |
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate' |
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
<!-------------------------------------- | |
Credit for the upload part (with some changes): | |
http://www.anujgakhar.com/2011/11/29/directly-uploading-a-file-to-amazon-s3-with-railo/ | |
Performance improvements: | |
- store file initially in virtual disk first (ram://), do resize then write to s3 | |
- define s3 path as railo mapping | |
- set region to correct region (defaults to us i believe) | |
----------------------------------------> |
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
<!--- | |
Have files showdown.js and a markdown file in the same directory. | |
---> | |
<cfscript> | |
manager = createObject("java", "javax.script.ScriptEngineManager").init(); | |
jsEngine = manager.getEngineByName("js"); | |
showdownJS = fileRead('#getDirectoryFromPath(getCurrentTemplatePath())#/showdown.js'); | |
jsEngine.eval(showdownJS); |
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
<!--- Load some demo markdown content ---> | |
<cfset markdownString = fileRead("#getDirectoryFromPath(getCurrentTemplatePath())#/demo.txt")> | |
<!--- Directory containing all the necessary jar files. ---> | |
<cfset jarDir = "#getDirectoryFromPath(getCurrentTemplatePath())#pegdown" /> | |
<!--- Array of necessary classes ---> | |
<cfset jClass = [ | |
"#jarDir#/parboiled-java-1.1.3.jar" | |
, "#jarDir#/asm-all-4.1.jar" |
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
<!--- get speakers by category; year ---> | |
<cfset qSpeakers = application.fapi.getContentObjects(typename="mxSpeaker", lProperties="objectid, label", orderBy="label", catspeaker_eq=stobj.metadata) /> | |
<!--- or old and busted get speakers by category; year ---> | |
<cfquery datasource="#application.dsn#" name="qSpeakers"> | |
SELECT type.objectID, type.label, refobj.typename | |
FROM refObjects refObj | |
JOIN refCategories refCat ON refObj.objectID = refCat.objectID | |
JOIN mxSpeaker type ON refObj.objectID = type.objectID | |
WHERE refObj.typename = 'mxSpeaker' |
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
<cfsetting enablecfoutputonly="true" /> | |
<!--- @@displayname: Google News Sitemap ---> | |
<!--- @@description: Generates a Google News Sitemap from dmNews content items. ---> | |
<!--- @@cacheStatus: 1 ---> | |
<!--- @@cacheTimeout: 60 ---> | |
<!--- @@fuAlias: sitemap ---> | |
<!--- | |
// build sitemap xml | |
---------------------------------------------------------------------------------------------------> |
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
<cfsetting enablecfoutputonly="true" /> | |
<!--- @@displayname: Google Sitemap ---> | |
<!--- @@description: Generates a Google Sitemap for all Navigation content items. ---> | |
<!--- @@cacheStatus: 1 ---> | |
<!--- @@cacheTimeout: 60 ---> | |
<!--- @@fuAlias: sitemap ---> | |
<!--- | |
// build sitemap xml | |
---------------------------------------------------------------------------------------------------> |
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
<!-- For example, within an extended ./myproject/packages/types/dmNews.cfc --> | |
<cffunction name="contentToIndex" returntype="query" description="Gets news content to index"> | |
<cfset qContentToIndex = application.fapi.getContentObjects(typename="dmNews",lProperties="objectid",publishDate_lte=now(),expiryDate_gt=now()) /> | |
<cfreturn qContentToIndex> | |
</cffunction> |