Skip to content

Instantly share code, notes, and snippets.

View sagikazarmark's full-sized avatar

Márk Sági-Kazár sagikazarmark

View GitHub Profile
@sagikazarmark
sagikazarmark / dagsearch.sh
Created April 23, 2024 18:15
Look for Dagger modules from your terminal
dagsearch() {
open "https://daggerverse.dev/search?q=$1"
}
@sagikazarmark
sagikazarmark / constructor-structure.md
Last active March 6, 2024 16:57
Dagger module best practices

Constructor structure

Depending on the module you may want to write different module constructors, but I found that in most cases the following provides the most flexibility with a decent UX:

func New(
	// Version (image tag) to use from the official image repository as a base container.
	// +optional
	version string,
@sagikazarmark
sagikazarmark / input.yaml
Last active September 30, 2023 12:00
Generating and ingesting sample data with Benthos
input:
generate:
interval: "50ms" # Generate an event every 50ms
mapping: |
let max_subjects = 100
let event_type = "api-calls"
let source = "api-gateway"
let methods = ["GET", "POST"]
let paths = ["/", "/about", "/contact", "/pricing", "/docs"]
@sagikazarmark
sagikazarmark / README.md
Last active December 6, 2022 15:16
List all repositories on DockerHub

List all repositories on DockerHub

Go to DockerHub, specifically the repository list page.

The easiest way to grab repositories is by sending HTTP requests from the Network page of your inspector.

Look for a request URL like this: https://hub.docker.com/v2/repositories/ORGNAME/?page_size=25&page=1&ordering=last_updated

Edit and resend the request (or choose any other way you see fit) to download lists. The results are paginated, so you will have to adjust the page query variable.

@sagikazarmark
sagikazarmark / goci.yaml
Last active November 10, 2022 17:34
Go CI config
# Go version?
# Custom container image?
# Execute: goci build
# Runs: Go build
builds:
# CLI
- package: ./cmd/main
output: ./build/ # Write back to filesystem?
@sagikazarmark
sagikazarmark / curiefense-nginx-ingress-install.md
Last active December 23, 2021 12:59
Curiefense nginx ingress install

Install Curiefense with NGINX Ingress

Prerequisites

  • Kubernetes cluster (I have one running on AWS)
  • Bucket (I'll use S3)

Note: the Kubernetes cluster should be large enough to run all dependencies (including ElasticSearch).

Prepare a bucket

@sagikazarmark
sagikazarmark / 2021-08-26-banzai-cloud-helm-chart-repository-incident-postmortem.md
Last active August 26, 2021 22:58
2021-08-26 Banzai Cloud Helm Chart repository incident postmortem
@sagikazarmark
sagikazarmark / folder-icons.css
Created July 15, 2021 19:48
Obsidian folder icons
.nav-folder-title[data-path="archive"] .nav-folder-title-content::before {
content: "🗄️ ";
font-size:1.3em;
}
.nav-folder-title[data-path="areas"] .nav-folder-title-content::before,
.nav-folder-title[data-path="archive/areas"] .nav-folder-title-content::before {
content: "🗂️ ";
font-size:1.3em;
}
@sagikazarmark
sagikazarmark / integration_test.go
Created April 2, 2021 17:48
Go integration tests
package main
func TestIntegration(t *testing.T) {
if m := flag.Lookup("test.run").Value.String(); m == "" || !regexp.MustCompile(m).MatchString(t.Name()) {
t.Skip("skipping integration test as execution was not requested explicitly using go test -run")
}
t.Run("testCase", testCase)
@sagikazarmark
sagikazarmark / docker.yaml
Last active November 30, 2022 14:14
GitHub Actions Docker build complete workflow
name: Docker
on:
push:
branches:
- master
tags:
- v[0-9]+.[0-9]+.[0-9]+
pull_request: