Skip to content

Instantly share code, notes, and snippets.

View marceloverdijk's full-sized avatar

Marcel Overdijk marceloverdijk

View GitHub Profile
<!-- Compile LessCSS -->
<macrodef name="lessjs">
<attribute name="input" />
<attribute name="output" />
<sequential>
<java jar="./${dir.build.tools}/${tool.rhino}" fork="true" output="@{output}">
<arg path="./${dir.build.tools}/${tool.less}" />
<arg path="@{input}" />
</java>
<echo>Lessjs: generated @{output}</echo>
/**
* Tired of using <code>QueueFactory.getQueue("the-queue").add(TaskOptions.Builder.withPayload(theDeferredTask))</code> in your code,
* and want to use something like <code>new MyTask(..).enqueue()</code> or <code>new MyTask(..).enqueue(Queue.THE_QUEUE)</code>?
*
* See the implementation below with the SendCreateUserConfirmationEmailTask as concrete task to be queued like:
* <code>new SendCreateUserConfirmationEmailTask("spam-steve@microsoft.com").enqueue()</code>.
*/
// Task.java
@marceloverdijk
marceloverdijk / gist:1523589
Created December 27, 2011 12:57
Groovy Grails AppEngine
84.28.239.210 - - [27/Dec/2011:04:52:28 -0800] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7" "grailsframework.appspot.com" ms=708 cpu_ms=397 api_cpu_ms=0 cpm_usd=0.011057 instance=00c61b117c5cd2d68a05c6c15cdde8ca90f022
I 2011-12-27 13:52:28.737
javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext
W 2011-12-27 13:52:28.737
[grailsframework/0-1.355674379264627516].<stderr>: log4j:ERROR Error initializing log4j: Unable to get members for class groovy.util.ConfigObject
W 2011-12-27 13:52:28.777
Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@b2175{/,/base/data/home/apps/grailsframework/0-1.355674379264627516}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityExceptio
require.config({
baseUrl: 'js/app',
paths: {
cs: '../lib/requirejs/cs-0.3.2',
backbone: '../lib/backbone/backbone-0.5.3.min',
jquery: '../lib/jquery/jquery-1.6.4.min',
'jquery.mobile': '../lib/jquery.mobile/jquery.mobile-1.0.min',
text: '../lib/requirejs/text-1.0.2.min',
underscore: '../lib/underscore/underscore-1.3.1.min',
use: '../lib/requirejs/use-0.1.0'
define [
'jquery'
'use!jquery.mobile'
'use!underscore'
'use!backbone'
'cs!routers/Router'
], ($, $$, _, Backbone, Router) ->
class App
constructor: ->
define [
'jquery'
'use!backbone'
], ($, Backbone, CustomerListView) ->
class Router extends Backbone.Router
routes: {
'': 'customerListPage'
'/': 'customerListPage'
({
baseUrl: 'app',
dir: 'build',
mainConfigFile: 'main.js', // ==> is not picked up
modules: [{
name: "../main"
}],
paths: { // ==> have to define this again as mainConfigFile is not picked up
cs: '../lib/requirejs/cs-0.3.2',
backbone: '../lib/backbone/backbone-0.5.3.min',
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).bind('mobileinit', function() {
$.mobile.loadingMessage = 'Laden...';
Marcels-MacBook-Air:grails marceloverdijk$ git push
Counting objects: 85, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (78/78), done.
Writing objects: 100% (82/82), 444.39 KiB | 0 bytes/s, done.
Total 82 (delta 4), reused 0 (delta 0)
remote: Executing Jenkins build.
remote:
remote: You can track your build at https://jenkins-overdijk.rhcloud.com/job/grails-build
remote:
@marceloverdijk
marceloverdijk / gist:0388ac64953d07eaae7a
Created August 8, 2014 06:36
Spring Boot 1.1.5 issue with Spring web dependencies
apply plugin: "java"
apply plugin: "idea"
apply plugin: "spring-boot"
buildscript {
repositories {
mavenCentral()
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
}