Skip to content

Instantly share code, notes, and snippets.

View RSheremeta's full-sized avatar
🇺🇦
Ukrainians resist

Roman Sheremeta RSheremeta

🇺🇦
Ukrainians resist
View GitHub Profile
@RSheremeta
RSheremeta / go_robust_runner_test.go
Last active January 11, 2024 01:44
Pure Go implementation of BeforeEach / AfterEach and BeforeSuite / AfterSuite testing mechanisms
// DISCLAIMER:
// ideally, this snippet shouldn't be used as a separate file
// all the stuff should be divided into kinda logical parts and stored in files respectively
// it's all gathered here in one single place for the demonstration purposes only
package go_medium
import (
"fmt"
"os"
@RSheremeta
RSheremeta / go_json_locale_encoder.go
Last active June 23, 2022 13:47
Encode Golang Struct to JSON based on locale
// Basic JSON encoder
// Encoding from Struct to JSON
// Supported types: string, bool, float64, int64
// Touch and play:
// https://go.dev/play/p/BJETEuu8k3K
// Author: https://github.com/RSheremeta
package main
@RSheremeta
RSheremeta / docker_cleanup.sh
Created August 21, 2023 09:36
a script for doing an annoying job - removing unused docker containers
# ! /bin/bash
if [ $# -eq 0 ]
then
echo "the docker target is not provided, aborting..."
exit 1
fi
target=$1