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
  • github@tarampamp.am
  • 127.0.0.1
  • 17:47 (UTC +04:00)
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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