Skip to content

Instantly share code, notes, and snippets.

@madrover
madrover / Dockerfile
Created March 24, 2020 08:03 — forked from MikeKlebolt/Dockerfile
Molecule setup used for testing Windows Ansible roles with Docker
# Molecule managed
FROM microsoft/windowsservercore:latest
RUN powershell.exe -Command \
wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -Proxy <proxy> -Outfile c:\remoting.ps1; \
powershell.exe -ExecutionPolicy ByPass -File c:\remoting.ps1 -EnableCredSSP; \
$password = ConvertTo-SecureString "<password>" -AsPlainText -Force; \
Set-LocalUser -Name administrator -Password $password; \
Enable-LocalUser -Name "Administrator"; \
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
EXPOSE 5986
@madrover
madrover / multi_key_crypto.sh
Created December 14, 2015 21:45 — forked from kennwhite/multi_key_crypto.sh
OpenSSL command line recipe for multi-public key file encryption. Any single private key paired to one of the public keys can decrypt the file.
#!/usr/bin/env bash
#
# Example of multiple key AES encryption for text files using the openssl v. 0.9.8+ command line utility
# Uses n public certs as key for MIME PKCS envelope, any individual private key can decrypt.
#
# If standard RSA ssh keys exist, these can be converted to public certs as well (and ssh keys can decrypt)
#
# To sign (and verify) the encrypted file, one of the private keys is required, see:
# http://www.openssl.org/docs/apps/smime.html#EXAMPLES for openssl smime examples
# or http://www.openssl.org/docs/apps/cms.html#EXAMPLES for cms utility (OpenSSL v. 1.0+)