git commit
templates only work with interactive message writing. Need a hook for -m
commits.
cd .git/hooks
touch commit-msg
chmod +x commit-msg
#!/bin/bash | |
# Remember to start cloud-provider-kind first: | |
# sudo cloud-provider-kind --enable-lb-port-mapping=true | |
set -euo pipefail | |
command_exists() { | |
command -v "$1" >/dev/null 2>&1 |
conversation: | |
intents: {} | |
intent_script: | |
ShoppingListAddItem: | |
action: | |
action: todo.add_item | |
target: | |
entity_id: todo.shopping_list | |
data: |
input_text: | |
gate_state: | |
name: Gate State | |
--- | |
template: | |
cover: | |
- name: Gate | |
friendly_name: "Gate" |
#!/bin/bash | |
# Ref: https://github.com/Kuadrant/kuadrant-operator/blob/main/doc/user-guides/full-walkthrough/secure-protect-connect-openshift.md | |
export PREPEND="-jmtest1" | |
export KUADRANT_GATEWAY_NS=api-gateway$PREPEND # Namespace for the example Gateway | |
export KUADRANT_GATEWAY_NAME=external$PREPEND # Name for the example Gateway | |
export KUADRANT_DEVELOPER_NS=toystore$PREPEND # Namespace for an example toystore app | |
export KUADRANT_AWS_ACCESS_KEY_ID=$KUADRANT_AWS_ACCESS_KEY_ID # AWS Key ID with access to manage the DNS Zone ID below |
#!/bin/bash | |
# Markdown is hard - this finds broken URL patterns. For example: | |
# this (doc)[https://example.com] | |
# where you meant: [doc](https://example.com) | |
pattern='\([^()]+\)\[[^][]+\]' | |
find . -type f -name "*.html" | while read -r file; do | |
perl -ne 'print "$ARGV: $_" if /\([^()]+\)\[[^][]+\]/' "$file" | grep -vE 'object\.get|decode' |
// keep N-day worth of data | |
var days=7; | |
// change to false to have the script to really exclude old records | |
// from the database. While true, no change at all will be made to the DB | |
var dryrun=true; | |
var now = new Date().getTime(), | |
time_criteria = now - days * 86400 * 1000, | |
time_criteria_in_seconds = time_criteria / 1000; |
#!/bin/bash | |
make local-setup-mgc | |
make local-setup-kind OCM_SINGLE=true | |
./bin/clusteradm init --bundle-version='0.11.0' --wait --context kind-mgc-control-plane | |
hub_token=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-token"') | |
hub_apiserver=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-apiserver"') | |
./bin/clusteradm join kind-mgc-control-plane --hub-token ${hub_token} --hub-apiserver ${hub_apiserver} --cluster-name kind-mgc-control-plane --bundle-version='0.11.0' --force-internal-endpoint-lookup --context kind-mgc-control-plane --feature-gates=RawFeedbackJsonString=true |
window.location.href = `narwhal://${window.location.host}${window.location.pathname}`; |
import requests | |
from geopy.distance import geodesic | |
from geopy.geocoders import Nominatim | |
def get_outages(): | |
url = "https://api.esb.ie/esbn/powercheck/v1.0/outages" | |
headers = {"api-subscription-key": "f713e48af3a746bbb1b110ab69113960"} | |
response = requests.get(url, headers=headers) |