Skip to content

Instantly share code, notes, and snippets.

View lentzi90's full-sized avatar

Lennart Jern lentzi90

  • Ericsson Software Technology
  • Raseborg, Finland
View GitHub Profile
@lentzi90
lentzi90 / go-mod.md
Last active February 9, 2023 11:07
Golang gists

Using go mod edit -replace to point to a fork/branch:

go mod edit -replace=github.com/old/package=github.com/org/new@git-sha
go mod tidy
# Example
go mod edit -replace=github.com/gophercloud/utils=github.com/Nordix/utils@15c0993ad12ecbb108cf1f81b1b3da451bbefdad
@lentzi90
lentzi90 / pandoc-container.md
Created December 7, 2021 10:58
Use pandoc in a container to generate Reveal.js slides from markdown files.

Reveal.js using pandoc in a container

This uses the official pandoc containers.

docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/latex:2.16 -t revealjs -s -o slides.html slides.md -V revealjs-url=https://unpkg.com/reveal.js

See the Pandoc manual for how to write the slides.

@lentzi90
lentzi90 / README.md
Last active February 15, 2020 08:24
Rebase conflict example

Rebase conflict example

When rebasing instead of merging, you may run into "strange" conflicts where you get the "same" conflict again and again. This is an attempt to explain one reason why you may run into this and how to properly solve them.

The code we are starting out with looks like this:

one + on eqvals three

The goal is to fix it so that it looks like this, while learning some git:

@lentzi90
lentzi90 / keybase.md
Created December 13, 2019 19:19
Keybase proof

Keybase proof

I hereby claim:

  • I am lentzi90 on github.
  • I am lennartj (https://keybase.io/lennartj) on keybase.
  • I have a public key ASB2qsfaCQL-Q46pJZBSxGq3_MuAu5ZxO3IG1vY8yaAuYAo

To claim this, I am signing this object:

@lentzi90
lentzi90 / kubectl-tips.md
Last active December 23, 2021 07:08
Tips and tricks with kubectl

Kubectl tips and tricks

Auth

Can the service account test-sa in namespace test create pods in the namespace test?

kubectl auth can-i create pods --namespace test --as system:serviceaccount:test:test-sa

What can the service account test in namespace test do in namespace test?

kubectl -n test run test --image ubuntu -it --rm
# Inside pod
apt update
apt install -y curl iputils-ping dnsutils netcat-openbsd redis-tools