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 static groovy.io.FileType.FILES | |
def appFolderName = 'C:/Users/me/grails-base-folder/' | |
def appFolder = new File(appFolderName) | |
def domainFolder = new File(appFolder, "grails-app/domain") | |
def controllersFolder = new File(appFolder, "grails-app/controllers") | |
def listAllGroovyFiles(folder) { |
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
syntax: glob | |
*.bat | |
*tmp | |
*~ | |
*\# | |
*ori | |
data/* | |
target/* | |
devDb |
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
<?xml version='1.0' encoding='utf-8'?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
# | |
#Oracle JDK installation | |
# | |
FROM ubuntu:precise | |
MAINTAINER Daniel Ribeiro <danieltribeiro@gmail.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update && apt-get -y install python-software-properties |
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
# | |
# Apache Tomcat7 installation | |
# | |
FROM danieltribeiro/oracle-java7-jdk | |
MAINTAINER Daniel Ribeiro <danieltribeiro@gmail.com> | |
RUN apt-get update | |
RUN apt-get -y install tomcat7 |
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
#!/bin/bash | |
RUNNING_CONTAINERS=`sudo docker ps --no-trunc -a -q` | |
if [[ -n "$RUNNING_CONTAINERS" ]]; then | |
echo "containers running" | |
echo "$RUNNING_CONTAINERS" | |
echo "killing containers" | |
sudo docker kill `sudo docker ps --no-trunc -a -q` | |
echo "stopping containers" |
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
log4j.debug=true | |
# Set root category priority to INFO and its only appender to CONSOLE. | |
log4j.rootCategory=TRACE, CONSOLE, ROLLINGFILE | |
# CONSOLE is set to be a ConsoleAppender using a PatternLayout. | |
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender | |
log4j.appender.CONSOLE.Threshold=INFO | |
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout | |
log4j.appender.CONSOLE.layout.ConversionPattern=[%6.6r]%m%n |
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
@Grapes( | |
@Grab(group='commons-codec', module='commons-codec', version='1.10') | |
) | |
import java.security.* | |
import java.util.Base64; | |
def file = new File('c:/users/danielr/Downloads/mortalkombat.mp4') | |
FileInputStream fis = new FileInputStream(file); | |
def md5 = org.apache.commons.codec.digest.DigestUtils.sha256(fis); | |
fis.close() | |
println md5 |
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
du -h --max-depth=1 |
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
/* | |
* Reindex elasticsearch | |
* Read all documents from oldServer/oldIndex/oldType and put them into newServer/newIndex/newtype | |
* If the newIndex raises an error script will print and stop | |
*/ | |
/* Configuration START */ | |
// OLD Server config - READ_ONLY | |
def oldServer = "http://localhost:9200" |
OlderNewer