Skip to content

Instantly share code, notes, and snippets.

View ulexxander's full-sized avatar
💪
Workin hard

Alexander Ustyugov ulexxander

💪
Workin hard
  • Limitlex d.o.o.
  • Slovenia
View GitHub Profile
@ulexxander
ulexxander / wsl-setup.md
Last active July 17, 2023 08:14
Setting up and troubleshooting WSL2 development environment.
@ulexxander
ulexxander / envcompare_test.go
Created January 16, 2023 13:50
Comparing few Go libraries for scanning environment variables into structs
package envcompare_test
import (
"net"
"testing"
"github.com/caarlos0/env/v6"
envsimpler "github.com/go-simpler/env"
"github.com/kelseyhightower/envconfig"
"github.com/sirupsen/logrus"
@ulexxander
ulexxander / algs_test.go
Last active January 14, 2023 18:29
Go JWT library `golang-jwt/jwt` comparison of different signing algorithms
//nolint:forbidigo,dupl
package jwt_test
import (
"crypto/ecdsa"
"crypto/ed25519"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@ulexxander
ulexxander / metrics.go
Created January 11, 2023 20:34
Go test utility to dump Prometheus metrics observed during the test.
package testutil
import (
"bytes"
"flag"
"os"
"testing"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/expfmt"
@ulexxander
ulexxander / user-data.yml
Created December 21, 2022 20:32
Cloud Init config that setups user, temporary password, SSH server settings, Docker and Node Exporter
#cloud-config
users:
- name: alex
groups: sudo, docker
shell: /bin/bash
lock_passwd: false
ssh_authorized_keys:
- ssh-ed25519 ???
@ulexxander
ulexxander / docker-compose.yml
Created December 4, 2022 10:08
EFK log collection stack (Elasticsearch, Fluent Bit, Kibana) setup for development.
version: "3.8"
services:
elasticsearch:
image: elasticsearch:8.5.2
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- discovery.type=single-node
@ulexxander
ulexxander / vscode.nemo_action
Created October 17, 2022 15:50
Nemo file manager (Linux Mint) action for VSCode (appears in context menu)
[Nemo Action]
Name=Open in VSCode
Comment=Open in VSCode
Exec=code %F
Icon-Name=window-new
Selection=Any
Extensions=dir;exe;dll;zip;gz;7z;rar;
@ulexxander
ulexxander / cv.md
Last active April 14, 2025 14:22
My CV on January 2025.

CV January 2025

Fullstack developer, DevOps, system administrator with 4 years of experience working in fintech blockchain oriented company and 3 years of experience working in IoT oriented startup.

@ulexxander
ulexxander / assertions.go
Created June 28, 2022 10:26
Go decimal.Decimal equality tests assertion workaround - UnscaleDecimals.
package requirex
import (
"testing"
"github.com/stretchr/testify/require"
)
// Equal wraps require.Equal and adds unscaling of decimal.Decimal values.
// It prevents tests from failing if expected and actual decimal.Decimal values
@ulexxander
ulexxander / env.go
Created June 23, 2022 18:58
Simple Go environment variables parsing
type env struct {
logLevel string
httpAddr string
natsURL string
mongoURI string
mongoDatabase string
stripeAPIKey string
stripeWebhookSigningSecret string
stripeOpenWeatherSubscriptionPriceID string
stripeRedirectsURL string