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
| #!/bin/bash | |
| # (C) Copyright Canonical 2011,2012 | |
| # What lxc container to clone | |
| LXC_BASE="" | |
| # $2 is a path to bind mount e.g. /tmp/foo. | |
| LXC_BIND="" | |
| LXC_DIR="" | |
| UNION="overlayfs" |
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 node | |
| var shell = require("shelljs") | |
| var n = 100; | |
| var nPorts = 10; | |
| var port = 40000; | |
| var launchCmds = []; | |
| for (var i = 0; i < n; i++) { |
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
| #!/bin/bash | |
| # I ran this on an EC2 c1.medium instance with Docker version 0.6.3 on Ubuntu 12.04. | |
| # I ran docker -d on tcp port 4243, and delivered 'stop' via the rest api | |
| # because that's what I do in my production setup, but I don't know if that | |
| # makes a difference. | |
| # First, run ubuntu:12.04, and in it do | |
| # echo -e '#!/bin/bash\nsleep 600' > cmd.sh | |
| # chmod +x cmd.sh | |
| # Then commit it and tag it as img-with-cmd |
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
| #cloud-config | |
| coreos: | |
| units: | |
| - name: test.service | |
| content: "[Unit]\nDescription=Test\n\n[Service]\nExecStart=/usr/bin/echo \"hi\"\nType=oneshot\n\n[Install]\nWantedBy=multi-user.target\n" |
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
| f = (cb) => | |
| fibrous.run => | |
| a.sync() | |
| b.sync() | |
| , cb |
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
| # Test 1: | |
| # Launch data-only container in privileged mode | |
| sudo docker run -i -t --name dataonly --privileged -v /shared ubuntu:14.04 /bin/bash | |
| # in container: | |
| mdir /shared/usr | |
| mount --bind /usr /shared/usr | |
| # Launch client container and attempt to read data from data-only container | |
| sudo docker run -i -t --volumes-from dataonly ubuntu:14.04 /bin/bash |
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 -v -H "Content-Type: application/json" -X POST \ | |
| -d '{"Cmd":["/bin/sleep","infinity"],"Image":"ubuntu:14.04", "ExposedPorts":{"22/tcp":{}}}' \ | |
| http://127.0.0.1:4243/containers/create?name=testcontainer | |
| curl -v -H "Content-Type: application/json" -X POST \ | |
| -d '{"PortBindings": { "22/tcp": [{ "HostPort": "11022" }]} }' \ | |
| http://127.0.0.1:4243/containers/testcontainer/start |
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
| #!/bin/bash | |
| fname=$1 | |
| branch=$2 | |
| key=$3 | |
| if [ "$fname" = "-h" ] | |
| then | |
| echo "Usage: git-crypt-diff fname branch key" | |
| exit 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
| @api {get} /engines Request Available Engines | |
| @apiVersion 1.0.0 | |
| @apiName GetEngines | |
| @apiGroup Engines | |
| @apiDescription Gets a list of the currently available engines on Sense. | |
| @apiError (404) user not found. | |
| @apiSuccess (200) {Object[]} engines List of available engines. |