export ACD_LOCAL=$HOME/.cache/Amazon-Cloud-Drive
# To use this file later
export ENCFS6_CONFIG=$ACD_LOCAL/encfs6.xml
mkdir -p \
//grails-app/conf/BootStrap.groovy | |
import org.vertx.java.platform.PlatformLocator | |
class BootStrap { | |
def vertxPlatformManager | |
def init = { servletContext -> | |
vertxPlatformManager = PlatformLocator.factory.createPlatformManager() | |
URL[] classpath = [new File('./src/verticles').toURI().toURL()] | |
vertxPlatformManager.deployVerticle( |
subprojects { | |
ext { | |
compileSdk = 25 | |
buildTools = "25.0.1" | |
minSdk = 19 | |
targetSdk = 25 | |
} | |
afterEvaluate { project -> | |
if (!project.name.equalsIgnoreCase("app") |
package sandbox; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY; | |
import java.io.IOException; | |
import java.nio.file.ClosedWatchServiceException; | |
import java.nio.file.FileSystem; |
// Shameless stolen from http://stackoverflow.com/questions/25772324/defining-an-alternate-connection-pool-in-grails-2-3-6 | |
def config = Holders.config | |
def dataSources = config.findAll { | |
it.key.toString().contains("dataSource_") | |
} | |
dataSources.each { key, value -> | |
def ds = value |
public static String stripTags(String input) { | |
return input.replaceAll("\\<.*?>",""); | |
} |
If you have a Domain class with an assigned id (not the default autoincremented long), the id assignment must not be in the constructor, but in a different line.
That means, having this domain:
class State implements Serializable {
String id
static mapping = {
id column: 'id', generator: 'assigned'
}
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Set cache dir | |
proxy_cache_path /var/cache/nginx levels=1:2 | |
keys_zone=microcache:5m max_size=1000m; | |
# Virtualhost/server configuration | |
server { | |
listen 80; | |
server_name yourhost.domain.com; | |
# Define cached location (may not be whole site) |
class TaskTimerListener implements TaskExecutionListener { | |
private Clock clock | |
@Override | |
void beforeExecute(Task task) { | |
clock = new org.gradle.util.Clock() | |
} | |
@Override |