What is teamlead’s first duty

Sarah Mei «We think awful code is written by awful devs. But in reality, it’s written by reasonable devs in awful circumstances.» (source) So, teamlead is there to improve circumstances.

ORM for go

https://github.com/Masterminds/squirrel Never used it as we always write SQL queries manually. But looks okay for ORM (well, actually a query-builder).

Kubernetes’ cronjobs

That’s what it is — https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ Get all cronjobs in env:

Get info on exact cronjob:

Get pods with this cronjob:

Get logs of cronjob

you can add -f for live updating logs and -p for watching logs of previous pod.

Crontab time format

That’s about it: min hour day/month month day/week Execution time 30 0 1 1,6,12 * — 00:30 Hrs  on 1st of Jan, June & Dec. 0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct. 0 0 1,10,15 * * — midnight on 1st ,10th & 15th of month 5,10 0 10 …

Read more

How to make grpc call from shell

1 https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md

2 https://github.com/fullstorydev/grpcurl

How to analyze the performance of your go application in production

You should definitely use chi’s middleware for running pprof and stuff in your admin panel. That’s the repo — https://github.com/go-chi/chi That’s the profiler — https://github.com/go-chi/chi/blob/master/middleware/profiler.go After that you can run something like this in shell:

If you run into problems with graphviz like this Failed to execute dot. Is Graphviz installed? Error: exec: «dot»: …

Read more

Using GOPROXY with go mod

PostgreSQL: TOP slow queries

Nice list of image resizer libs in go

With speedtests and other nice things. https://github.com/fawick/speedtest-resize I tried these two: https://github.com/disintegration/imaging https://github.com/bamiaux/rez They are quite the same talking about file sizes and imaging is muuch easier to use.

Simple way to detect browser’s FPS via JS

It’s dumb and dead simple but works. You can even track browser’s metrics with that.