Skip to content

Instantly share code, notes, and snippets.

@lawries
lawries / BootStrap.groovy
Created February 24, 2023 11:52 — forked from jpboudreault/BootStrap.groovy
Grails sample BootStrap.groovy works with spring-security-code plugin
import grails.util.Environment
import com.alogient.learn.User
import com.alogient.learn.Role
import com.alogient.learn.UserRole
class BootStrap {
def init = { servletContext ->
def adminRole = new Role(authority: 'ROLE_ADMIN').save(flush: true)
def userRole = new Role(authority: 'ROLE_USER').save(flush: true)
@lawries
lawries / import.groovy
Created February 11, 2022 12:21 — forked from sfussenegger/import.groovy
skeleton script for a CSV to MySQL import
#!/usr/bin/env groovy
import groovy.grape.Grape
import groovy.sql.Sql
import com.csvreader.CsvReader
@Grab(group='net.sourceforge.javacsv', module='javacsv', version='2.0')
class Import {}
Grape.grab(

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info