# Get tab-separated values list of metadata containers, IIB bundles, and OCP versions ``` CRW_VERSION=2.12 for csv in operator-metadata operator-bundle; do lastcsv=$(curl -sSLk "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&delta=1728000&rows_per_page=30&contains=codeready-workspaces" | \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for arg in "$@"; do | |
shift | |
case "$arg" in | |
--version) echo 1.2.1 ; exit ;; | |
--allow-pull) ;; | |
*) set -- "$@" "$arg" ;; | |
esac | |
done | |
buildah bud "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ref: https://docs.openshift.com/container-platform/4.6/backup_and_restore/backing-up-etcd.html | |
etcd_node=`oc get pods -n openshift-etcd -l app=etcd -o=jsonpath='{.items[0].spec.nodeName}'` | |
ssh -i ~/.ssh/dmz-ocp4-rsa core@$etcd_node | |
id=$(sudo crictl ps --name etcdctl | awk 'FNR==2{ print $1}') && sudo crictl exec -it $id /bin/bash | |
etcdctl member list -w table | |
etcdctl endpoint health --cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is a kubectl/oc plugin that will start namespace deletion, | |
# watch the namespace conditions for resources blocking on finalizers, | |
# and remove those finalizers from the blocking resources | |
# TODO: Does not yet work against core resource types. The regex doesn't get them. | |
NAMESPACE=$1 | |
if ! oc get ns ${NAMESPACE} &>/dev/null; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VERSION="${1#[vV]}" | |
VERSION_MAJOR="${VERSION%%.*}" | |
VERSION_MINOR_PATCH="${VERSION#*.}" | |
VERSION_MINOR="${VERSION_MINOR_PATCH%%.*}" | |
VERSION_PATCH_PRE_RELEASE="${VERSION_MINOR_PATCH#*.}" | |
VERSION_PATCH="${VERSION_PATCH_PRE_RELEASE%%[-+]*}" | |
VERSION_PRE_RELEASE="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA AND METADATA COHERENCE | |
Some modern cluster file systems provide perfect cache coherence among their clients. Perfect cache coherence among disparate NFS clients is expensive to achieve, especially on wide area networks. As such, NFS settles for weaker cache coherence that satisfies the requirements of most file sharing types. | |
Close-to-open cache consistency | |
Typically file sharing is completely sequential. First client A opens a file, writes something to it, then closes it. Then client B opens the same file, and reads the changes. | |
When an application opens a file stored on an NFS version 3 server, the NFS client checks that the file exists on the server and is permitted to the opener by sending a GETATTR or ACCESS request. The NFS client sends these requests regardless of the freshness of the file's cached attributes. | |
When the application closes the file, the NFS client writes back any pending changes to the file so that the next opener can view the changes. This al |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
= Time & Versioning in Graphs
== Time as Attributes
- Long (Seconds or Milliseconds since Epoch)
- String ISO-XXX -> comparable
- Simple String yyyy-mm-dd
Issues:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
function handle_event() { | |
local entry="$1" | |
local action=$(echo $entry | jq -r '.action') | |
local service=$(echo $entry | jq -r '.service') | |
local hook="./hooks/$service/$action" | |
if [ -x "$hook" ]; then | |
"$hook" "$entry" |
NewerOlder