Parental control for Linux Mint

Time limiter with UI — Timekpr (https://www.linuxuprising.com/2019/11/timekpr-next-is-linux-parental-control.html) Domain blocker — Mintnanny (https://www.reallinuxuser.com/how-to-setup-parental-control-in-linux-mint/), too simple.

Nullable fields in json generated from protobuf file

Null for nil value my.proto

go mapper

Which will lead to this json response

Omit a field with nil value If you want to omit the field completely, you can use oneof approach proto

go mapper

More info on json options for grpc — https://blog.bullgare.com/2020/07/complete-list-of-swagger-options-to-protobuf-file/

Using tcpdump for k8s pods

You need wireshark to be installed on your local machine — download (more on this below). If you don’t have tcpdump installed inside the pod, you can install it with

Then, on your local machine:

If you want to see packets in grpc/http2, you can add a rule in Wireshark. For this, click …

Read more

Talk about pros and cons of GraphQL

Pros: Very flexible — clients decide which fields of which entities they need. Documentation and test UI are available by default. Cons: Code looks ugly. N+1 selects problem is hard to solve (most probably — with some ad-hoc). It’s harder to test as you don’t know all the use cases. Not a binary protocol — …

Read more

Datadog in a docker for integration tests and local dev

Run virtual machine Ubuntu/Windows on m1 macos

There is a program called UTM based on QEMU and developed for m1 MacBook virtualization. At least Ubuntu Server is working fine for me. https://mac.getutm.app/guide/. More info on this — https://eshop.macsales.com/blog/72081-utm-virtual-machine-on-m1-mac/

Debugging go app in Jetbrains Goland on m1

First download a proper version of GoLand here — select .dmg (MacOS Apple Silicon) here (direct link — https://www.jetbrains.com/go/download/download-thanks.html?type=eap&platform=macM1&build=211.6556.11&code=GO). Then make sure you are using arm version of go (go version go1.16.2 darwin/arm64). If not, download and install arm version of golang (like «go1.16.2.darwin-arm64.pkg») from the list here — https://golang.org/dl/. Now it should work. With …

Read more

Example of using embed in go

Nice article on using go templates with embed introduced in go1.16: https://philipptanlak.com/web-frontends-in-go/. That’s the code:

Run Steam on MacBook with m1 chip (apple silicon)

You need to install Crossover. Then you need to install Steam there. Good video explaining the process of installing Steam on Apple Silicon chips: https://www.youtube.com/watch?v=3TdCV7fn2CA Here is the list of supported games — https://applesilicongames.com/

Embedding assets to go binary in go 1.16

That’s how you can use it:

Or embedding one file directly into a variable:

More details — https://golang.org/pkg/embed/