Skip to content

Instantly share code, notes, and snippets.

View cognifloyd's full-sized avatar

Jacob Floyd cognifloyd

  • Garland, TX
  • 10:16 (UTC -06:00)
View GitHub Profile
@cognifloyd
cognifloyd / openbao-mfa-0-notes.yaml
Last active October 4, 2024 00:26
openbao login mfa plugin implementation notes
---
notes:
- protobuf (not json) is used for the config stored in the barrier, not for IPC
- memdb only indexes key attributes, but full object (interace{}) is stored:
- loginMFAConfigTableSchema: id, namespace_id, type, name
- loginEnforcementTableSchema: id, namespace, nameAndNamespace
- mfa method - auth method:
# stays in core
TOTP: -
# extract these to external plugins
@cognifloyd
cognifloyd / BUILD
Last active September 12, 2024 17:58
capturing .git/modules
experimental_workspace_environment(
name="in_repo_workspace",
)
files(
name="gitmodules",
sources=[
".gitmodules",
"st2tests/st2tests/fixtures/packs/test_content_version/.git",
],
@cognifloyd
cognifloyd / image.go
Created May 1, 2022 02:20
Docker Registry client in go (rough outline)
package image // import "github.com/go-vela/worker/internal/image"
import (
"context"
dist "github.com/docker/distribution"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/distribution"
"github.com/docker/docker/dockerversion"
suite: Config files
templates:
# primary template files
- deployments.yaml
- jobs.yaml
# included templates must also be listed
- configmaps_packs.yaml
- configmaps_rbac.yaml
- configmaps_st2-conf.yaml
@cognifloyd
cognifloyd / pants-lint-all
Created June 15, 2021 03:28
pants pylint debugging
$ ./pants lint :: 1
15:28:39.56 [INFO] Completed: lint - Shellcheck succeeded.
15:29:51.95 [INFO] Completed: lint - Flake8 succeeded.
15:29:58.13 [INFO] Completed: lint - Black succeeded.
All done! ✨ 🍰 ✨
1283 files would be left unchanged.
15:31:44.47 [WARN] Completed: lint - Pylint failed (exit code 2).
************* Module file_watch_sensor
Please see https://github.com/cognifloyd/gentoo/tree/sys-libs-tapi-11
If you can pick it up, please do. I don't have time to continue working on it.
@cognifloyd
cognifloyd / prefix-dirs.patch
Created December 2, 2020 18:10
gentoo prefix darwin clang patch
This mirrors cmake-*-prefix-dirs.patch
It add EPREFIX to search paths for c/cxx headers.
It also adds EPREFIX/MacOSX.sdk to search paths for c and Frameworks.
Assumes that c++ lib and headers will be installed in the prefix.
Also, a couple of args are populated by inspecting the SDK,
so, default to EPREFIX/MacOSX.sdk when the sysroot is not specified.
(This does NOT set sysroot).
@cognifloyd
cognifloyd / bootstrap-prefix.sh
Last active December 5, 2020 03:33
Gentoo Prefix Bootstrap for Mac OS X Catalina
Please see https://github.com/cognifloyd/prefix/blob/wip_darwin/scripts/bootstrap-prefix.sh
from opsdroid.helper import add_skill_attributes
from opsdroid.matchers import *
from opsdroid.skill import Skill
class StackStormSkill(Skill):
_action_alias_matchers: list
def match_action_alias(self, func):
def matcher(func):
skills:
- name: st2_opsdroid
path: /opt/stackstorm/chatops/opsdroid-skills/st2
config:
prefix: '!'