title: PCDM Profile Template author:
- Mark A. Matienzo
- Christina Harlow date: 2016-10-20 profile: project: PCDM Profiles namespaces: pcdm: http://pcdm.org/models#
title: PCDM Profile Template author:
| // Compile with: | |
| // GOOS=linux go build -a --ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo -o dns-example main.go | |
| // | |
| // Run on Kubernetes. Example resolv.conf | |
| // | |
| // # /etc/reslov.conf | |
| // search default.svc.cluster.local svc.cluster.local cluster.local google.internal c.hightowerlabs.internal | |
| // nameserver 10.179.240.10 | |
| // options ndots:5 | |
| // |
This list has moved to a GitHub repo for easier tracking: https://github.com/coreos/awesome-kubernetes-extensions
Please comment below if you are using Kubernetes Third-Party Resources and I will add you to the list.
Known Users:
| // TxFunc is a function that can be wrapped in a transaction | |
| type TxFunc func(tx *sql.Tx) error | |
| // WithTx wraps a function in an sql transaction. After the function returns, the transaction is | |
| // committed if there's no error, or rolled back if there is one. | |
| func WithTx(db *sql.DB, f TxFunc) (err error) { | |
| tx, err := db.Begin() | |
| if err != nil { | |
| return err | |
| } |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
| #set up the dir structure if it doesn't exist | |
| set t ~/.trello; mkdir -p $t | |
| function if_exist # we don't want to litter our code with ifs if a read model or events are not there yet. Return /dev/nul for empty | |
| if test -e $t/$argv[1]; echo $t/$argv[1]; else; echo /dev/null; end | |
| end | |
| function list # provide lists from our tab delimited entries with filtering and line item numbers to make choices | |
| set list $argv[1]; set column_to_show $argv[2]; set filter $argv[3]; set count 1 | |
| cat (if_exist $list) | grep -e "$filter\$" | while read line | |
| set -l line_items (string split \t $line) | |
| echo $count\) $line_items[$column_to_show] |
I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥
Connect AM and AtoM Docker Compose environments using a shared external volume and other tweaks needed to test and develop DIP uploads between both applications.
Setup both Docker Compose environments independently:
Create local folder and Docker volume:
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "os" | |
| "os/exec" | |
| "go.uber.org/cadence/.gen/go/cadence/workflowserviceclient" | |
| "go.uber.org/cadence/activity" |