Skip to content

Instantly share code, notes, and snippets.

View tarampampam's full-sized avatar
🍻
go test && go build && go drink-beer

Pаramtamtām tarampampam

🍻
go test && go build && go drink-beer
View GitHub Profile
@tarampampam
tarampampam / change-dirs-locale-mint.md
Last active January 9, 2024 11:59
Change locale of the /home/user/ directories

Actual for linux mint 18.3 and others

Source: https://askubuntu.com/a/465679

$ echo 'en_US' > ~/.config/user-dirs.locale
$ LANG=C xdg-user-dirs-update --force
@tarampampam
tarampampam / fix-no-sound-after-suspending-mint.md
Last active January 9, 2024 11:59
Fixing "no sound after suspending" error for Linux Mint on Xiaomi Notebook 15 pro

Fast checking

After suspending (when your system cannot play any sounds) try to execute in your terminal (after sudo su):

$ lspci -D | grep -i Audio | awk '{print $1}'

And then:

@tarampampam
tarampampam / disable-grub-timeout-mint20.md
Last active January 9, 2024 11:58
Disabling grub timeout (Linux Mint 20.x and older)

Edit file:

$ sudo nano /etc/default/grub

Set (update) next values:

GRUB_DEFAULT=0
@tarampampam
tarampampam / syncmap.go
Last active July 7, 2022 17:34
Golang SyncMap (sync.Map with generics, type-safe)
package syncmap
import "sync"
// SyncMap is like a Go sync.Map but type-safe using generics.
//
// The zero SyncMap is empty and ready for use. A SyncMap must not be copied after first use.
type SyncMap[K comparable, V any] struct {
mu sync.Mutex
m map[K]V
@tarampampam
tarampampam / handlers.go
Last active January 6, 2023 10:25
Golang simple RPC client/server
package rpc
type (
API struct{}
LivenessArgs struct{}
LivenessReply struct{ Ok bool }
)
// NewAPI returns a new API instance.
@tarampampam
tarampampam / run.bash
Created December 15, 2023 08:31
Enable dark mode on linux, including Google Chrome
$ gsettings get org.gnome.desktop.interface color-scheme
# default
$ gsettings set org.gnome.desktop.interface color-scheme prefer-dark
@tarampampam
tarampampam / .gitlab-ci.yml
Created May 6, 2024 09:04
FFmpeg static binary build using docker
# GitLab CI help: <https://docs.gitlab.com/ee/ci/yaml/>
# GitLab environments: <https://docs.gitlab.com/ee/ci/variables/>
variables:
GITLAB_IMAGE: $CI_REGISTRY_IMAGE
GITHUB_IMAGE: ...
stages:
- build