Skip to content

Instantly share code, notes, and snippets.

@dhellmann
dhellmann / conntrack_stats.py
Created October 3, 2023 22:25
script to summarize source info in conntrack output
#!/usr/bin/env python3
import collections
import fileinput
import operator
import sys
sources = collections.defaultdict(int)
for line in fileinput.input(sys.argv[1:]):
@dhellmann
dhellmann / settings-robotframework.el
Created June 12, 2023 21:35
emacs settings for robot-mode
(use-package robot-mode
:ensure t
:init
)
;; ensure that *.resource files are treated as robot framework files
(setq auto-mode-alist
(cons '("\\.resource$" . robot-mode) auto-mode-alist))
;; based on https://www.masteringemacs.org/article/executing-shell-commands-emacs
@dhellmann
dhellmann / gist:2cc1760edd77c3e7437c215a2cc8daa2
Created March 28, 2022 15:41
pr-history for 996, 1040, 1041
$ ./gh-review-stats pr-history -o openshift -r enhancements 996 1040 1041
Using config file: /Users/dhellmann/.gh-review-stats.yml
Wed Jan 5: #996 updated by Omer Tuchfeld
Wed Jan 5: #996 opened by omertuc "Enhancement for enabling single-node-openshift with workers" (https://github.com/openshift/enhancements/pull/996)
Thu Jan 6: #996 comment by eranco74
Thu Jan 6: #996 comment by eranco74
Thu Jan 6: #996 review by eranco74
Thu Jan 6: #996 comment by omertuc
Thu Jan 6: #996 review by omertuc
Thu Jan 6: #996 review by omertuc
------------------------------------------------------------
github.com/benmoss/go-powershell @ (https://github.com/benmoss/go-powershell)
replace: github.com/rancher/go-powershell @ v0.0.0-20200701184732-233247d45373 (https://github.com/rancher/go-powershell)
locally: /tmp/go-fork-diff/github.com/benmoss/go-powershell
------------------------------------------------------------
git --no-pager -C /tmp/go-fork-diff/github.com/benmoss/go-powershell log "--pretty=format:%h %cd %s" --date=iso --decorate origin/master..233247d45373
233247d 2020-07-01 11:47:32 -0700 Add go.mod
6845e6f 2020-07-01 11:20:37 -0700 Rename package
(use-package go-mode
:ensure t
)
;; going to use a lot of go so go ahead and require it
(require 'go-mode)
;; gocode for autocompletion
;; https://github.com/mdempsky/gocode
(setq gocode-dir
$ tox -r -e lint
lint recreate: /Users/dhellmann/Devel/pip/pip/.tox/lint
lint installdeps: pre-commit
lint installed: -f /Users/dhellmann/.pip/wheelhouse,appdirs==1.4.4,cfgv==3.1.0,distlib==0.3.1,filelock==3.0.12,identify==1.4.21,nodeenv==1.4.0,pip==19.3.1,pre-commit==2.6.0,PyYAML==5.3.1,setuptools==42.0.2,six==1.15.0,toml==0.10.1,virtualenv==20.0.25,wheel==0.33.6
lint run-test-pre: PYTHONHASHSEED='2788464127'
lint run-test: commands[0] | pre-commit run --all-files --show-diff-on-failure
Check builtin type constructor use.......................................Passed
Check for added large files..............................................Passed
Check for case conflicts.................................................Passed
Check Toml...............................................................Passed
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
machine.openshift.io/owned: ""
creationTimestamp: "2019-11-11T16:06:00Z"
generation: 1
labels:
api: clusterapi
$ dep ensure -update github.com/metal3-io/baremetal-operator
Solving failure: No versions of sigs.k8s.io/controller-runtime met constraints:
v0.1.10: Could not introduce sigs.k8s.io/controller-runtime@v0.1.10, as its subpackage sigs.k8s.io/controller-runtime/pkg/scheme is missing. (Package is required by github.com/metal3-io/baremetal-operator@master.)
v0.1.12: Could not introduce sigs.k8s.io/controller-runtime@v0.1.12, as its subpackage sigs.k8s.io/controller-runtime/pkg/scheme is missing. (Package is required by github.com/metal3-io/baremetal-operator@master.)
v0.1.11: Could not introduce sigs.k8s.io/controller-runtime@v0.1.11, as its subpackage sigs.k8s.io/controller-runtime/pkg/scheme is missing. (Package is required by github.com/metal3-io/baremetal-operator@master.)
v0.1.9: Could not introduce sigs.k8s.io/controller-runtime@v0.1.9, as its subpackage sigs.k8s.io/controller-runtime/pkg/scheme is missing. (Package is required by github.com/metal3-io/baremetal-operator@master.)
v0.1.8: Could not introd
$ ./node_modules/.bin/gitbook build
info: 13 plugins are installed
info: 12 explicitly listed
info: loading plugin "panel"... OK
info: loading plugin "sequence-diagrams"... OK
info: loading plugin "ga"... OK
info: loading plugin "codegroup"... OK
info: loading plugin "include-codeblock"...
warn: ace features disabled (`gitbook-plugin-ace` required)
OK
$ npm config ls -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.9.0 node/v10.16.0 linux x64"
; default values
access = null
allow-same-version = false