Skip to content

Instantly share code, notes, and snippets.

View rbrady's full-sized avatar

Ryan Brady rbrady

View GitHub Profile
@rbrady
rbrady / letsencrypt_dns.md
Last active March 14, 2025 01:15
Letsencrypt with DNS

Let's Encrypt with DNS Validation for Keycloak without a Domain

How DNS Validation Works with Let's Encrypt

Unlike HTTP validation (which requires a public domain), DNS validation works by:

  1. Having you create specific DNS TXT records to prove you control the DNS for your hostnames
  2. Let's Encrypt verifies these records before issuing certificates

Implementation Steps

Context

This is for programmers who want to ramp on Go, without resources that reiterate programming fundamentals. This would not be a good list of resources for folks who are learning to program using Go as their first language. Some resources that I dismiss here would be super valuable for newer folks. This is a selection of resources for those who understand programming fundamentals in a different language already.

Advice

  1. First steps = Tour of Go
  2. Don't waste time on Go Fundamentals-type books - it all lives in tour of Go.
  3. Consider joining the Gophers Slack
  4. When you need help, the Go Playground allows you make a quick scratch file and share it. Others trying to help can run your code easily this way.
#!/bin/bash
directory=${1:-""}
percentage=${2:-"25"}
watermark_image=${3:-"watermark.png"}
location="southwest"
if [ -z "$directory" ]; then
echo "Error: directory argument is required"
exit 1
import itertools
import sys
from filch import boards
from filch import configuration
from filch import constants
from filch import data
from filch import exceptions as peeves
BOARD_NAME = "Workflows-DFG-Rocky"
@rbrady
rbrady / sample_report.py
Created June 21, 2018 15:08
Sample Report
class ExternalEffortReport(reports.FileReport):
template_name = "/home/rbrady/ee_rpt.txt",
output_name = "/home/rbrady/external_efforts.txt"
def get_context_data(self, **kwargs):
# Call the base implementation first to get a context
context = super(ExternalEffortReport, self).get_context_data(**kwargs)
# get a reference to the desired cards
config = configuration.get_config()
manager = boards.BoardManager(config['trello'], BOARD_NAME)
@rbrady
rbrady / Unit3.java
Last active September 5, 2017 12:42
Example java class for Mike
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
public class Unit3 {
private static final String FILENAME = "energyProduced.txt";
private static final double ELECTRICITY_COST = 0.85;
@rbrady
rbrady / watermark.sh
Created June 24, 2017 02:47
Resize and Watermark images with ImageMagick
#!/bin/bash
# change dir to the first arg to the script
cd $1
if [[ "$2" != "" ]]; then
FONT_TYPE="$2"
else
FONT_TYPE="Helvetica"
fi
@rbrady
rbrady / example_trello_report_output.txt
Created March 9, 2017 13:58
Sample Trello Report Output
my-trello-board
--------------------
- Backlog
- Write code for feature C
- Write code for feature D
- In Progress
@rbrady
rbrady / board_report_jinja_example.txt
Created March 9, 2017 13:50
Sample Jinja Template
{{ board.name }}
--------------------
{% for list_item in board.open_lists() %}
- {{ list_item.name }}
{% for card in list_item.list_cards() %}
- {{ card.name }}
{% endfor %}
{% endfor %}
@rbrady
rbrady / board_query_snippet.py
Created March 9, 2017 13:49
Board Query Snippet
# check for board existence
board = [b for b in trello_api.list_boards() if b.name == board_name][0]
# if no board, print error and exit
if not board:
click.echo("Trello board not found!")
sys.exit(1)
# create board context
context = {'board': board}