Skip to content

Instantly share code, notes, and snippets.

View tongueroo's full-sized avatar

Tung Nguyen tongueroo

View GitHub Profile
@Stono
Stono / create-docker-tls.sh
Last active February 27, 2024 08:17
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
r53 = AWS::Route53.new(
:access_key_id => 'aws-key-id',
:secret_access_key => 'aws-secret-key')
response = r53.client.list_resource_record_sets(
:hosted_zone_id => "zone-id",
:start_record_name => 'xxx.example.com',
:start_record_type => 'CNAME'
)
puts response[:resource_record_sets].map{|r| r[:name]}
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby