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 | |
# Note that the -k flag here means we are ignoring cert warnings. | |
# If security matters you should use the Circonus cert provided | |
# here: http://login.circonus.com/pki/ca.crt | |
KEY=$1 | |
VALUE=$2 | |
ENDPOINT_URL=$3 |
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
require 'spec_helper' | |
describe "Dockerfile" do | |
before(:all) do | |
image = Docker::Image.build_from_dir('.') do |v| | |
if (log = JSON.parse(v)) && log.has_key?("stream") | |
$stdout.puts log["stream"] | |
end | |
end |
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
require 'docker' # see https://rubygems.org/gems/docker-api | |
require 'serverspec' # see http://serverspec.org | |
set :backend, :exec | |
Excon.defaults[:write_timeout] = 1000 | |
Excon.defaults[:read_timeout] = 1000 |
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 | |
APP_NAME="<app name>" | |
API_TOKEN="<api token>" | |
TIME=$(date +%s) | |
curl --user $APP_NAME:$API_TOKEN \ | |
-H "Accept: application/json" \ | |
-X POST \ | |
--data-binary "{\"category\": \"Deployment\",\"title\":\"Deployed $APP_NAME\",\"description\":\"Deployed revision X.X.X\",\"start\": $TIME,\"stop\":$TIME}" \ |
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 | |
set -e | |
apt-get install -y software-properties-common | |
apt-add-repository -y ppa:zfs-native/stable | |
apt-get update | |
apt-get install -y ubuntu-zfs | |
# load zfs kernel module |
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 | |
# "An elegant weapon, from a more civilized age." | |
MAGNET_URL=$1 | |
transmission-daemon | |
sleep 3 |
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 | |
# triton/docker | |
export DOCKER_TLS_VERIFY=1 | |
function dockerlocal { | |
export DOCKER_HOST=tcp://192.168.59.103:2376 | |
export DOCKER_CERT_PATH=$HOME/.boot2docker/certs/boot2docker-vm | |
} |
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
--- | |
driver_plugin: joyent | |
driver_config: | |
joyent_username: <%= ENV['MANTA_USER'] %> | |
joyent_keyfile: "<%= ENV['HOME'] %>/.ssh/id_rsa" | |
joyent_keyname: <%= ENV['MANTA_KEY_ID'] %> | |
joyent_url: <%= ENV['JOYENT_API_URL'] %> | |
platforms: | |
- name: smartos_base64_1430 |
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 | |
# you can test by doing | |
# curl -sL https://gist.github.com/bixu/e2620a2b0fcb6ed1830c/raw/pkgsrc_bootstrap.sh | bash -sx | |
BOOTSTRAP_TARBALL=$(curl -sLk http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/ | grep href= | cut -d\" -f2 | tail -n1) | |
cd / | |
curl -k http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/$BOOTSTRAP_TARBALL | gzcat | tar -xf - |
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 | |
ip_list=$(knife joyent server list | awk '{print $7}' | cut -d"," -f 1 | grep -v "10.*\|192.168.*\|172.16.*") | |
for ip in $ip_list | |
do nmap -A -T4 -F $ip | |
done | grep "Nmap scan report\|ssh" |