This file contains hidden or 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
#!/usr/bin/env groovy | |
/** | |
* Find files, directories or both from the specified location | |
* | |
* Usage: | |
* println RecursiveMatcher.getFiles("C:\") | |
* println RecursiveMatcher.getDirectories("./") | |
* println RecursiveMatcher.getFilesAndDirectories("../") | |
* |
This file contains hidden or 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
#!/usr/bin/env groovy | |
/** | |
* Small example showing how to make a routing | |
* in Apache Camel and ActiveMQ in a groovy shell-script. | |
* | |
* @author: Marcel Maatkamp (m.maatkamp avec gmail dot com) | |
*/ | |
@Grapes([ | |
@Grab('org.apache.camel:camel-core:2.3.0'), |
This file contains hidden or 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('nekohtml:nekohtml:1.9.6.2') | |
]) | |
import java.io.IOException | |
import java.util.ArrayList | |
import java.util.List | |
def xml = "<x a=\"a\"><y b=\"b\">1</y><y>2</y></x>" | |
new XmlSlurper().parseText(xml).y.each { y -> |
This file contains hidden or 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
docker run \ | |
--name zookeeper \ | |
-d \ | |
-p 2181:2181 \ | |
-p 2888:2888 \ | |
-p 3888:3888 \ | |
jplock/zookeeper |
This file contains hidden or 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
docker run \ | |
--name mesos_master \ | |
--link zookeeper:zookeeper \ | |
-d \ | |
-e MESOS_QUORUM=1 \ | |
-e MESOS_LOG_DIR=/var/log \ | |
-e MESOS_WORK_DIR=/tmp \ | |
-e MESOS_ZK=zk://zookeeper:2181/mesos \ | |
-p 5050:5050 \ | |
redjack/mesos-master |
This file contains hidden or 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
docker run -d \ | |
--name mesos_slave_01 \ | |
--link zookeeper:zookeeper \ | |
-e MESOS_LOG_DIR=/var/log \ | |
-e MESOS_MASTER=zk://zookeeper:2181/mesos \ | |
-e MESOS_EXECUTOR_REGISTRATION_TIMEOUT=5mins \ | |
-e MESOS_ISOLATOR=cgroups/cpu,cgroups/mem \ | |
-e MESOS_CONTAINERIZERS=docker,mesos \ | |
-v $(which docker):$(which docker) \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ |
This file contains hidden or 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
docker run -d \ | |
--name mesos_slave_01 \ | |
--link zookeeper:zookeeper \ | |
-e MESOS_LOG_DIR=/var/log \ | |
-e MESOS_MASTER=zk://zookeeper:2181/mesos \ | |
-e MESOS_EXECUTOR_REGISTRATION_TIMEOUT=5mins \ | |
-e MESOS_ISOLATOR=cgroups/cpu,cgroups/mem \ | |
-e MESOS_CONTAINERIZERS=docker,mesos \ | |
-v $(which docker):$(which docker) \ | |
-e DOCKER_HOST=tcp://192.168.1.18:2375 \ |
This file contains hidden or 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
docker run \ | |
--name marathon \ | |
-d \ | |
-p 8080:8080 \ | |
--link zookeeper:zookeeper \ | |
mesosphere/marathon \ | |
--master zk://zookeeper:2181/mesos \ | |
--zk zk://zookeeper:2181/marathon |
This file contains hidden or 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
{ | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "rabbitmq:management", | |
"network": "BRIDGE", | |
"portMappings": [ | |
{ "containerPort": 5672, "hostPort": 0, "servicePort": 5672, "protocol": "tcp" }, | |
{ "containerPort": 15672, "hostPort": 0, "servicePort": 15672, "protocol": "tcp" } | |
] |
This file contains hidden or 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
curl \ | |
-X POST \ | |
-H "Content-Type: application/json" \ | |
http://localhost:8080/v2/apps [email protected] |