Skip to content

Instantly share code, notes, and snippets.

@bgroupe
bgroupe / pom.ts
Last active November 15, 2023 18:11
Page Object Pattern
import { Page, Locator } from "@playwright/test";
// All root pages inherit from the base page, ie PartnerDashboard, etc
// BasePage sets a root locator that is prepended to instances of child Section
class BasePage {
readonly page: Page;
readonly root: Locator;
constructor(root: string, page: Page) {
this.page = page;
this.root = page.locator(root);
@bgroupe
bgroupe / scaled-object-with-trigger-auth.yaml
Last active April 24, 2020 07:06
KEDA ScaledObject with TriggerAuthentication
apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
name: redis-auth
spec:
secretTargetRef:
- parameter: password
name: redis-secret
key: REDIS_PASSWORD
---
@bgroupe
bgroupe / rails-with-sidekiq.yaml
Last active April 28, 2020 16:14
Simple Rails and Sidekiq Deployment Spec
apiVersion: v1
kind: Secret
metadata:
name: redis-secret
type: Opaque
data:
REDIS_PASSWORD: Zm9vYmFy
---
apiVersion: apps/v1
kind: Deployment
@bgroupe
bgroupe / kubectl.md
Created December 9, 2019 23:23 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no

Keybase proof

I hereby claim:

  • I am bgroupe on github.
  • I am caseygrr (https://keybase.io/caseygrr) on keybase.
  • I have a public key ASBrgD2RuHemBzRIagVxI088OpBLpFMbHwQRbk0uap_7Owo

To claim this, I am signing this object:

@bgroupe
bgroupe / Procfile
Created January 20, 2017 20:37
hanami with sidekiq
myapp: bundle exec hanami server
sidekiq: bundle exec sidekiq -e development -r ./config/environment.rb
module HashExtensions
def symbolize_keys
inject({}) do |acc, (k,v)|
key = String === k ? k.to_sym : k
value = Hash === v ? v.symbolize_keys : v
acc[key] = value
acc
end
end
end