Best practices I collected during writing my Dagger modules.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dagsearch() { | |
open "https://daggerverse.dev/search?q=$1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go version? | |
# Custom container image? | |
# Execute: goci build | |
# Runs: Go build | |
builds: | |
# CLI | |
- package: ./cmd/main | |
output: ./build/ # Write back to filesystem? | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
pull_request: |
NewerOlder