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
<cfscript> | |
this.ormEnabled = true; | |
this.datasource = "YOUR_DATASOURCE_HERE"; | |
this.ormSettings = { | |
dbcreate = "update", | |
eventhandling = true, | |
flushAtRequestEnd = false, | |
cfclocation = [] | |
}; | |
</cfscript> |
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
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
http.createServer(function(request,response){ | |
response.writeHead(200,{ | |
'Content-Type' : 'text/plain' | |
}); | |
var directory = 'C:\\ColdFusion9\\logs\\'; |
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>Building a data object from rows</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script> | |
$(function(){ | |
var rows = $(".row"); |
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
<!--- | |
Slatwall - An Open Source eCommerce Platform | |
Copyright (C) 2011 ten24, LLC | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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>Bootstrap</title> | |
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<style> | |
body {background: #eee} | |
.container {background: #fff;} | |
a.sliderImage {margin: 0 25px 0 25px;text-align: center;display: block;} | |
a.pname {margin: 25px;text-align: center;display: block;} |
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
String username = 'dvega' | |
String password = 'password' | |
String auth = "$username:$password" | |
def (user,pass) = auth.split(':') | |
println "user=$user pass=$pass" |
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
import org.springframework.transaction.interceptor.TransactionAspectSupport | |
import org.springframework.transaction.support.TransactionSynchronizationManager | |
class BootStrap { | |
def grailsApplication | |
def init = { servletContext -> | |
// transaction support for services |
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
dataSource { | |
pooled = true | |
jmxExport = true | |
driverClassName = "org.h2.Driver" | |
username = "sa" | |
password = "" | |
} | |
hibernate { | |
cache.use_second_level_cache = true | |
cache.use_query_cache = false |
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
<nav class="navbar navbar-default" role="navigation"> | |
<div class="container-fluid"> | |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | |
<ul class="nav navbar-nav"> | |
<li class="${controllerName == null ? 'active' : ''}"> | |
<a href="${createLink(uri:'/')}">Home</a> | |
</li> | |
<li class="${controllerName == 'blog' ? 'active' : ''}"> | |
<a href="${createLink(uri: '/blog')}">Blog</a> | |
</li> |
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
<div class="entry"> | |
<p>I am working on coverting this site over to a grails applicaiton. While there are some good plugins out there I could of taken advantage of I decided to use this as a learning experience and write a ton of it from scratch. </p> | |
<p>For the blog post itself we have some unique URLs that look like this | |
</p><blockquote>/blog/2014/3/30/Grails-views-Controller-and-Action-name</blockquote> | |
This converts to /blog/year/month/day/slug. So first thing I needed to was setup a url mapping for this path. I also put some constraints on the parameters so we get exactly what we are looking for. |
OlderNewer