Skip to content

Instantly share code, notes, and snippets.

@lcustodio
lcustodio / clear-docker.sh
Created December 21, 2017 16:56
Clear docker volumes
docker system prune -a --volumes
@lcustodio
lcustodio / Mac OSX Setup - Brew
Created January 21, 2019 00:09 — forked from jbelke/Mac OSX Setup - Brew
Mac OSX Setup - Brew and Cask
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
# Install Xcode command line tools.
xcode-select --install
@lcustodio
lcustodio / hashmap.R
Created December 1, 2019 21:49
R Hashmap
# https://rnotebook.io/anon/ae2ac79d0d10d6f6/notebooks/hashmap.ipynb
library(hash)
h <- hash()
a <- matrix(1:4, nrow = 12, ncol = 3)
print(a)
# has.key("4",h)
@lcustodio
lcustodio / ssh_key.tf
Created August 12, 2020 09:44 — forked from irvingpop/ssh_key.tf
Terraform external data source example - dynamic SSH key generation
# 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}"