Skip to content

Instantly share code, notes, and snippets.

global:
name: consulcli
datacenter: dc2
enabled: false
# Configure federation.
federation:
# If enabled, this datacenter will be federation-capable. Only federation
# via mesh gateways is supported.
# Mesh gateways and servers will be configured to allow federation.
global:
name: consul
datacenter: dc2
tls:
enabled: true
verify: true
#verify: false # WARNING - Don't do this in production
caCert:
secretName: consul-federation
secretKey: caCert
global:
name: consul
datacenter: dc1
federation:
enabled: true
createFederationSecret: true
tls:
enabled: true
enableAutoEncrypt: true
verify: true
@pedrohdz
pedrohdz / flac2alac.sh
Created June 26, 2021 14:36
Replace FLAC with ALAC version while preserving metadata and cover art
#! /usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
while IFS= read -r -d '' source; do
echo
echo ===============================================================================
path=$(dirname "$source")
@pedrohdz
pedrohdz / extract-credentials.groovy
Last active January 31, 2024 20:57
Export credentials for Jenkins Configuration as Code (JCasC)
// This Jenkins Groovy script extracts credentials in Jenkins and outputs them
// in a JSON format that can be digested by "Jenkins Configuration as Code".
// Just pass the output into a JSON to YAML converter. You can run this
// through the Jenkins Script Console or similar.
//
// Thank you:
// - https://github.com/tkrzeminski/jenkins-groovy-scripts/blob/master/show-all-credentials.groovy
//
// To conver to YAML `json2yaml | sed '/^[[:space:]]*$/d'`
//
#!/usr/bin/env python
# pylint: disable=missing-docstring
from urllib import parse
import webbrowser
import logging as log
import requests
from bs4 import BeautifulSoup
#!/usr/bin/env python
# pylint: disable=missing-docstring
from urllib import parse
import webbrowser
import requests
from bs4 import BeautifulSoup
@pedrohdz
pedrohdz / bar.py
Last active February 15, 2019 15:11
#!/usr/bin/env python
# pylint: disable=missing-docstring
from urllib import parse
import webbrowser
import requests
from bs4 import BeautifulSoup
@pedrohdz
pedrohdz / foo.py
Last active February 10, 2019 15:35
#!/usr/bin/env python
# pylint: disable=missing-docstring
from urllib import parse
import webbrowser
import requests
from bs4 import BeautifulSoup
@pedrohdz
pedrohdz / crash.log
Created December 6, 2018 14:59
terraform-provider-azurerm crash when azurerm_route_table name is a space
This file has been truncated, but you can view the full file.
2018/12/06 15:54:59 [INFO] Terraform version: 0.11.10 17850e9a55d33c43d7c31fd6ac122ba97a51d899
2018/12/06 15:54:59 [INFO] Go runtime version: go1.11.1
2018/12/06 15:54:59 [INFO] CLI args: []string{"/Users/pedher/dev/src-avi-tf/tmp/bug_report/terraform", "apply"}
2018/12/06 15:54:59 [DEBUG] Attempting to open CLI config file: /Users/pedher/.terraformrc
2018/12/06 15:54:59 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/12/06 15:54:59 [INFO] CLI command args: []string{"apply"}
2018/12/06 15:54:59 [INFO] command: empty terraform config, returning nil
2018/12/06 15:54:59 [DEBUG] command: no data state file found for backend config
2018/12/06 15:54:59 [DEBUG] New state was assigned lineage "411d228a-9b7b-5dd0-217e-10fbd0227c80"
2018/12/06 15:54:59 [INFO] command: backend initialized: <nil>