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
git_commits = { | |
mappings = { | |
i = { | |
[null] = function() | |
null | |
local selected_entry = action_state.get_selected_entry() | |
local value = selected_entry.value | |
null | |
vim.api.nvim_win_close(0, true) | |
vim.cmd(null) |
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
# git aliases | |
alias gc="git commit -sm" | |
alias gca="git commit -asm" | |
alias ga="git add" | |
alias gaa="git add ." | |
alias gp="git push" | |
alias gpa="git push -u origin (git rev-parse --abbrev-ref HEAD) --tags" | |
alias gm="git merge" | |
alias gch="git checkout" | |
alias gb="git branch" |
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 | |
import ( | |
"fmt" | |
) | |
type engineOption func(e *Engine) | |
func WithFuel(fuel float64) engineOption { | |
return func(e *Engine) { |
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 install github.com/psampaz/go-mod-outdated@latest | |
go list -u -m -json all | go-mod-outdated -direct -update |
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 | |
import ( | |
"context" | |
"fmt" | |
"time" | |
) | |
func ctxSafe(ctx context.Context) { | |
for { |
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 | |
import ( | |
"fmt" | |
) | |
type Contstraint[I, O any] interface { | |
Process(in I) (out O) | |
} |
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
version: "3.9" | |
services: | |
example-app: | |
image: example-app | |
environment: | |
KAFKA_BOOTSTRAP_SERVERS: "kafka:19092". # this setting is important: LISTENER_DOCKER_INTERNAL://kafka:19092 | |
KAFKA_TOPIC: "topic-name" | |
KAFKA_SCHEMA_REGISTRY_URL: "http://kafka-schema-registry:8081" | |
ports: | |
- "8002:8002" |
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 | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
) | |
func shutdown(ready chan bool) func(http.ResponseWriter, *http.Request) { | |
return func(w http.ResponseWriter, r *http.Request) { |
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: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: |
NewerOlder