Skip to content

Instantly share code, notes, and snippets.

View barata0's full-sized avatar

Daniel Ribeiro barata0

  • Rio de Janeiro
View GitHub Profile
@barata0
barata0 / docker-rm
Created June 7, 2014 07:11
Remove all running dockers and delete host entries for docker IP on known_hosts - on Ubuntu 14.04
#!/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"
@barata0
barata0 / Dockerfile
Created November 6, 2013 16:49
lxc-docker ubuntu tomcat7 apt-get install with oracle-java7-jdk
#
# Apache Tomcat7 installation
#
FROM danieltribeiro/oracle-java7-jdk
MAINTAINER Daniel Ribeiro <danieltribeiro@gmail.com>
RUN apt-get update
RUN apt-get -y install tomcat7
@barata0
barata0 / Dockerfile
Created November 5, 2013 20:17
lxc-docker ubuntu oracle-java7-jdk
#
#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
<?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
@barata0
barata0 / .hgignore
Created April 24, 2013 02:26
hgignore for grails project
syntax: glob
*.bat
*tmp
*~
*\#
*ori
data/*
target/*
devDb
@barata0
barata0 / gist:5357749
Created April 10, 2013 19:36
List all Domain Classes without a Controller in GRAILS
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) {