Skip to content

Instantly share code, notes, and snippets.

View lmajano's full-sized avatar

Luis Majano lmajano

View GitHub Profile
component singleton accessors="true"{
property name="clientCache";
function init(){
clientCache = {};
return this;
}
function getCurrentClient(){
#### this is the main config file for nginx, to specify it from the command line, use the -c switch, e.g
#### nginx.exe -c nginx-railo.conf
##** if connecting to Tomcat, use Tomcat's RemoteIpValve to resolve CGI.REMOTE_ADDR, CGI.SERVER_NAME, and CGI.SERVER_PORT_SECURE
##** <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="X-Forwarded-Proto" remoteIpHeader="X-Forwarded-For" protocolHeaderHttpsValue="https" />
#user nobody;
#pid logs/nginx.pid;
@lmajano
lmajano / gist:6736160
Last active December 24, 2015 03:19
TestBox BDD DSL
/**
* This tests the BDD functionality in TestBox. This is CF10+, Railo4+
*/
component{
/*********************************** LIFE CYCLE Methods ***********************************/
beforeAll = function(){
application.salvador = 1;
}
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<subclass batch-size="25" discriminator-value="Page"
entity-name="cbPage"
extends="cfc:contentbox.model.content.BaseContent" lazy="true" name="cfc:contentbox.model.content.Page">
<bag batch-size="25" cascade="all-delete-orphan" inverse="true"
lazy="extra" name="childPages" order-by="createdDate">
<key column="FK_parentID"/>
<one-to-many class="cfc:contentbox.model.content.Page"/>