Skip to content

Instantly share code, notes, and snippets.

@saper
saper / gist:71064197b58b2ccb0fa68be606a1c0d6
Created February 26, 2026 16:21
Sort ReplicaSet objects created by Kubernetes Deployment by the revision number
oc get replicaset -l app=my-app \
-o custom-columns='NAME=:.metadata.name,REVISION:.metadata.annotations.deployment\.kubernetes\.io/revision' \
--sort-by='.metadata.annotations.deployment\.kubernetes\.io/revision'
#! /bin/sh
github_auth=${GITHUB_TOKEN:+--header="Authorization: Bearer $GITHUB_TOKEN"}
verbosity="--quiet"
github_releases() {
{
wget "$verbosity" -O - "$github_auth" https://api.github.com/repos/prometheus/node_exporter/releases || {
echo "Cannot download the list of releases from github.com" >&2; exit 2;
}
} | tee .cached
[SB-FILE-1.x]
[SB-file-Header]
[digest]
hex=6a71338e996c4a0deb6ff46e2bf3a8cf78474056
len=20=0x14
[attrs]
hex=53544d500102000031040000070000000000000000000700060001000100db007367746c000fd2b10a4702000999000009990000099900000999000009990000099900000000767af4810b86
len=76=0x4c
[Sections-Header-Table]
Section-Header-Item=00000000080000002704000001000000
[?1l>saper@guest4:~/src/tamago-go/src % git checkout -b late-- 0:tcsh -- time-stamp -- Nov/08/20 18:21:48 --
-- 0:tcsh -- time-stamp -- Nov/08/20 18:21:49 --
st origin/latest
Branch 'latest' set up to track remote branch 'latest' from 'origin'.
Switched to a new branch 'latest'
saper@guest4:~/src/tamago-go/src % kk
saper@guest4:~/src/tamago-go/src % k
saper@guest4:~/src/tamago-go/src % sh -- 0:tcsh -- time-stamp -- Nov/08/20 18:21:58 --
-- 0:tcsh -- time-stamp -- Nov/08/20 18:21:59 --
bash all.
#include <sstream>
#include <math.h>
#include <iostream>
#include <fstream>
#include <string>
#include <limits>
#include <limits.h>
#include <unordered_map>
#include <stdlib.h>
#include <chrono>
Script started on Wed Apr 15 14:09:06 2020
Command: usbdump -i usbus3 -f 2 -s 65536
14:09:09.191780 usbus3.2 SUBM-INTR-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=4096
14:09:09.195674 usbus3.2 SUBM-CTRL-EP=00000000,SPD=HIGH,NFR=2,SLEN=36,IVAL=0
14:09:09.195981 usbus3.2 DONE-CTRL-EP=00000000,SPD=HIGH,NFR=2,SLEN=0,IVAL=0,ERR=0
14:09:09.196005 usbus3.2 SUBM-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
14:09:09.196228 usbus3.2 DONE-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=28,IVAL=0,ERR=0
14:09:09.196251 usbus3.2 SUBM-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
14:09:09.196478 usbus3.2 DONE-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=28,IVAL=0,ERR=0
14:09:09.196500 usbus3.2 SUBM-CTRL-EP=00000000,SPD=HIGH,NFR=2,SLEN=36,IVAL=0
Script started on Wed Apr 15 14:05:20 2020
Command: usbdump -i usbus3 -f 2 -s 65536
14:05:22.891336 usbus3.2 SUBM-INTR-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=4096
14:05:22.901213 usbus3.2 DONE-INTR-EP=00000081,SPD=HIGH,NFR=0,SLEN=0,IVAL=4096,ERR=CANCELLED
14:05:22.902227 usbus3.2 SUBM-INTR-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=4096
14:05:22.911907 usbus3.2 DONE-INTR-EP=00000081,SPD=HIGH,NFR=0,SLEN=0,IVAL=4096,ERR=CANCELLED
14:05:22.914184 usbus3.2 SUBM-INTR-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=4096
14:05:22.922903 usbus3.2 DONE-INTR-EP=00000081,SPD=HIGH,NFR=0,SLEN=0,IVAL=4096,ERR=CANCELLED
14:05:22.926096 usbus3.2 SUBM-INTR-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=4096
14:05:22.935898 usbus3.2 DONE-INTR-EP=00000081,SPD=HIGH,NFR=0,SLEN=0,IVAL=4096,ERR=CANCELLED
extended device statistics
device r/s w/s kr/s kw/s ms/r ms/w ms/o ms/t qlen %b
md0 0 0 0.0 0.0 0 0 0 0 0 0
twed0 0 52 0.0 218.4 0 57 0 57 3 100
twed1 101 0 209.8 0.0 30 0 0 30 0 39
extended device statistics
device r/s w/s kr/s kw/s ms/r ms/w ms/o ms/t qlen %b
md0 0 0 0.0 0.0 0 0 0 0 0 0
twed0 0 62 0.0 461.6 0 47 0 47 3 100
twed1 55 28 175.1 305.1 71 0 0 47 4 31
m.saper.info> gdb831 --args node build.js
GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd12.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
[New LWP 102051 of process 76788]
[Switching to LWP 102048 of process 76788]
Thread 10 hit Breakpoint 2, compile_data (dctx=0x803192a00) at ../src/sass_context_wrapper.cpp:18
18 sass_compile_data_context(dctx);
(gdb) print *dctx
$3 = {<Sass_Context> = {<Sass_Options> = {<Sass_Output_Options> = {<Sass_Inspect_Options> = {output_style = SASS_STYLE_NESTED, precision = 5, in_selector = false}, indent = 0x80573e0d8 " ", linefeed = 0x80573e0e0 "\n",
source_comments = false}, source_map_embed = false, source_map_contents = false, source_map_file_urls = false, omit_source_map_url = false, is_indented_syntax_src = false,
input_path = 0x805ac5ec0 "/home/saper/sw/node-sass-segfault-repro/src/complex.scss", output_path = 0x0, include_path = 0x80625b3f0 "/home/saper/sw/node-sass-segfault-repro", plugin_path = 0x0, include_paths = 0x0,
plugin_paths = 0x0, source_map_file = 0x0, source_map_root = 0x0, c_functions = 0x0, c_importers = 0x8031a9c20, c_headers = 0x0}, type = SASS_CONTEXT_DATA, outpu