Skip to content

Instantly share code, notes, and snippets.

View ilopmar's full-sized avatar

Iván López ilopmar

  • VMware
  • Madrid, Spain (Remote)
  • X @ilopmar
View GitHub Profile
@ilopmar
ilopmar / jooq.gradle
Created December 17, 2015 14:24 — forked from schoenobates/jooq.gradle
JOOQ Generator Gradle
import org.jooq.util.jaxb.*
import org.jooq.util.*
ext.db = [
url: 'jdbc:postgresql://host/db',
user: 'user',
password: 'user',
schema: 'schema'
]
package com.example
import ratpack.guice.Guice
import ratpack.server.RatpackServer
public class MyApp {
public static void main(String[] args) throws Exception {
RatpackServer.start { spec ->
spec.registry {
@ilopmar
ilopmar / SpeakerPageGenerator.groovy
Last active August 29, 2015 14:16
speakers_data.csv
package com.greachconf
import groovy.text.SimpleTemplateEngine
@Grab('com.xlson.groovycsv:groovycsv:1.0')
import com.xlson.groovycsv.CsvParser
@Grab('com.github.slugify:slugify:2.1.3')
import com.github.slugify.Slugify
| Plugin packaged grails-url-shortener-0.2.1.zip
| Plugin packaged grails-url-shortener-0.2.1.zip
| POM generated: /home/ivan/workspaces/misc/grails-url-shortener/target/pom.xml
WARN: No SCM provider installed.
Publishing to Grails Central
Publishing to http://grails.org/api/v1.0/publish/url-shortener/0.2.1
| Error Failed to publish plugin: <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
@ilopmar
ilopmar / gist:3e954dd030e88817786e
Created January 17, 2015 17:29
Error starting Grails 3.0 application
$ grails --version
| Grails Version: 3.0.0.BUILD-SNAPSHOT
| Groovy Version: 2.4.0-rc-2
| JVM Version: 1.8.0_25
$ gradle bootRun
:compileJava UP-TO-DATE
:compileGroovy
:processResources
:classes
@GrabResolver(name='grails-core', root='http://repo.grails.org/grails/core')
@Grab(group='org.grails', module='grails-datastore-gorm-mongo', version='1.0.0.BUILD-SNAPSHOT')
@Grab(group='org.slf4j', module='slf4j-simple', version='1.6.1')
import grails.persistence.*
import org.grails.datastore.gorm.mongo.config.*
MongoDatastoreConfigurer.configure("myDatabase", Book)
Book.withSession {
@ilopmar
ilopmar / LogTime.groovy
Last active December 3, 2022 19:41
Sample Groovy AST Transformation developed during the 4th Kaleidos Piweek for log the execution time of a method
package net.kaleidos.piweek
import org.codehaus.groovy.transform.GroovyASTTransformationClass
import java.lang.annotation.ElementType
import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
import java.lang.annotation.Target
@Retention(RetentionPolicy.SOURCE)