Skip to content

Instantly share code, notes, and snippets.

Avatar

Sean OMeara someara

View GitHub Profile
@jfeilbach
jfeilbach / gist:fd109c7dbc9798ce6e47358b82d0be76
Last active Mar 27, 2021
DNS over TLS (knot resolver) setup using 1.1.1.1 on macOS
View gist:fd109c7dbc9798ce6e47358b82d0be76
# Configuring DNS-over-TLS on macOS
# Worked on macOS 10.13.4
brew -v update
brew -v doctor
# Next two commands are optional
sudo chown -R $(whoami) $(brew --prefix)/*
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
# Install DNS client
brew install knot-resolver
# Should be installed to something like: /usr/local/Cellar/knot-resolver/2.3.0/sbin/kresd
@irvingpop
irvingpop / ssh_key.tf
Last active Jun 23, 2022
Terraform external data source example - dynamic SSH key generation
View ssh_key.tf
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../ssh_key_generator.sh"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"
View README.md

Docker Cookbook In Chef-Apply? It's easy!

export CHEF_DOCKER_PATH=/path/to/docker/cookbook
chef-apply docka.rb
View depends_on.rb
Chef::Resource::DockerContainer.class_eval do
property :dependencies_updated, [true, false]
def depends_on(resource)
subscribes :dependencies_updated, resource, :immediately
subscribes :run, resource
end
action :dependencies_updated do
new_resource.dependencies_updated true
@cwebberOps
cwebberOps / .kitchen.cloud.yml
Created Dec 9, 2014
one yaml to rule them all
View .kitchen.cloud.yml
---
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms: