Skip to content

Instantly share code, notes, and snippets.

View dhiller's full-sized avatar

Daniel Hiller dhiller

View GitHub Profile
@dhiller
dhiller / terminal-keyboard-cheatsheet.md
Created April 16, 2026 07:39
Terminal keyboard cheat sheet — shell navigation, editing, history & more
diff --git a/scripts/kubevirt/repo_groups.sql b/scripts/kubevirt/repo_groups.sql
index f0c56fd8..f296e1ce 100644
--- a/scripts/kubevirt/repo_groups.sql
+++ b/scripts/kubevirt/repo_groups.sql
@@ -3,125 +3,35 @@
update gha_repos set repo_group = 'SIG compute' where name in (
'kubevirt/ansible-kubevirt-modules',
- 'kubevirt/api-reference',
- 'kubevirt/bridge-marker',
// 20221107133814
// https://api.github.com/repos/kubevirt/kubevirt/commits/6c437ef18b3e3bc0a061cc4d81c315df7a5a92ac/status
{
"state": "pending",
"statuses": [
{
"url": "https://api.github.com/repos/kubevirt/kubevirt/statuses/6c437ef18b3e3bc0a061cc4d81c315df7a5a92ac",
"avatar_url": "https://avatars.githubusercontent.com/u/25687724?v=4",
"id": 20024382989,
// 20221107132746
// https://api.github.com/repos/kubernetes/test-infra/commits/f94fcb1556b89926c898fce5f90eb7730f98e58c/status
{
"state": "success",
"statuses": [
{
"url": "https://api.github.com/repos/kubernetes/test-infra/statuses/f94fcb1556b89926c898fce5f90eb7730f98e58c",
"avatar_url": "https://avatars.githubusercontent.com/u/20407524?v=4",
"id": 20009073751,
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more
version: 2
cli:
server: https://app.fossa.com
fetcher: custom
project: git@github.com:kubevirt/containerized-data-importer.git
analyze:
modules:
@dhiller
dhiller / coverage-go.sh
Created April 21, 2021 15:38
KubeVirt go coverage
#!/bin/bash
set -euo pipefail
GOPROXY=off GOFLAGS=-mod=vendor go test -coverprofile=_out/kubevirt-coverage.out ./pkg/...
go tool cover -html=_out/kubevirt-coverage.out -o _out/kubevirt-coverage.html
@dhiller
dhiller / patch.diff
Created April 16, 2021 13:56
kubevirt/kubevirt PR #5262
diff --git a/.bazelrc b/.bazelrc
index 584f94338..3fa9c9273 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -9,14 +9,17 @@ build --stamp --workspace_status_command=./hack/print-workspace-status.sh --host
build:x86_64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64_cgo
run:x86_64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64_cgo
test:x86_64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64_cgo
+coverage:x86_64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64_cgo
-- generated by github.com/kubevirt/community/hack/generate-devstats-repo-sql.py
-- Add repository groups
update gha_repos set repo_group = 'SIG compute' where name in (
'kubevirt/ansible-kubevirt-modules',
'kubevirt/api-reference',
'kubevirt/bridge-marker',
'kubevirt/cdi-api-reference',
'kubevirt/cdi-operator',
'kubevirt/client-go',
@dhiller
dhiller / gist:d19bd0d6fc588f4b56214a526a73d2a3
Created October 5, 2020 16:09
Restore issue after lock screen: journalctl
Oct 05 13:26:05 dhiller-fedora-work gnome-shell[3276]: JS ERROR: TypeError: global.window_group is null
recreate_widgets@/home/dhiller/.local/share/gnome-shell/extensions/pop-shell@system76.com/stack.js:197:13
recreate_widgets/this.tabs_destroy<@/home/dhiller/.local/share/gnome-shell/extensions/pop-shell@system76.com/stack.js:198:81
Oct 05 13:26:05 dhiller-fedora-work gnome-shell[3276]: meta_get_window_group_for_display: assertion 'compositor' failed
Oct 05 13:26:05 dhiller-fedora-work gnome-shell[3276]: JS ERROR: TypeError: global.window_group is null
recreate_widgets@/home/dhiller/.local/share/gnome-shell/extensions/pop-shell@system76.com/stack.js:197:13
recreate_widgets/this.tabs_destroy<@/home/dhiller/.local/share/gnome-shell/extensions/pop-shell@system76.com/stack.js:198:81
Oct 05 13:26:0
@dhiller
dhiller / state-labels.diff
Created September 18, 2020 14:33
Replace vcpu state if/else with method
diff --git a/pkg/monitoring/vms/prometheus/prometheus.go b/pkg/monitoring/vms/prometheus/prometheus.go
index 92626ade1..fe8a46cb2 100644
--- a/pkg/monitoring/vms/prometheus/prometheus.go
+++ b/pkg/monitoring/vms/prometheus/prometheus.go
@@ -172,16 +172,8 @@ func (metrics *vmiMetrics) updateVcpu(vmStats *stats.DomainStats) {
vcpuUsageLabels,
nil,
)
- var humanReadableState string
- if vcpu.State == int(libvirt.VCPU_OFFLINE) {