Skip to content

Instantly share code, notes, and snippets.

View kaatinga's full-sized avatar
😎
Learning

Michael Gunkoff kaatinga

😎
Learning
View GitHub Profile
@kaatinga
kaatinga / wacom.md
Created February 9, 2023 12:42
wacom tablet freezes on macOS

Sometimes it happens that cursor freezes on macOS few seconds and also you can find in the activity monitor that the wacom driver is utilizing 80-90% of you CPU at the moment when cursor is frozen.

If you are facing this issue, a simple solution will help you. Follow these steps to resolve the issue:

  1. Open the System Preferences and navigate to Security & Privacy.
  2. In the Privacy tab, locate the Accessibility and Input Monitoring sections.
  3. Remove any rights assigned to the Wacom driver in these sections.
  4. Re-grant the rights to the Wacom driver.
  5. Restart your computer.
@kaatinga
kaatinga / ieee 754 floating point numbers.md
Last active June 1, 2022 12:35
Deep understanding of IEEE754 floating point numbers

Preface

In this article, we will take a closer look at the storage details of floating-point numbers in the go language

What is the result of the following simple program 0.3 + 0.6?Some would naively assume 0.9, but the actual output is 0.899999999999 (go 1.13.5)

    var f1 float64 = 0.3
    var f2 float64 = 0.6
    fmt.Println(f1 + f2)
@kaatinga
kaatinga / test_data_sql.md
Created May 23, 2022 14:18
fast way to add a lot of data to a database
insert into attribute_allowed_lists (attributeid, allowedvalue) select 2, md5(generate_series::text) from generate_series(1, 100000);

or

insert into test3 (id, name) select generate_series, gen_random_uuid() from generate_series(1, 1000);
@kaatinga
kaatinga / how_to_add_heroku_repo.md
Last active March 11, 2024 21:19
add heroku repository
heroku git:remote -a <app name>

for abc:

heroku git:remote -a abc

@kaatinga
kaatinga / Host_key_verification_failed.md
Last active February 2, 2022 09:18
Resolving `Host key verification failed`

If you see message when update dependecies in Go or in another cases when update git repositories:

Host key verification failed.
fatal: Could not read from remote repository.
	
Please make sure you have the correct access rights
and the repository exists.
@kaatinga
kaatinga / gist:ae88cd5fe3174f5b1d566c4c47e56168
Created December 9, 2021 15:36
docker: delete all volumes
docker volume prune -f
@kaatinga
kaatinga / gist:2549927978f7b1d7876906cc10dd80ec
Created October 20, 2021 06:11
How to get access to virtual box shared folders
In case we enabled auto-mounting on creating a shared folder from the Virtual Box Manager those shared folders will automatically be mounted in the guest with mount point /media/sf_<name_of_folder>. To have access to these folders users in the guest need to be a member of the group vboxsf.
sudo usermod -aG vboxsf <userName>

First, generate a new RSA key pair, like this: ssh-keygen -t rsa -f test_server (the both files will appear in ~/.ssh folder).

Second, send your RSA key to the target server, ssh-copy-id -i test_server user@1.1.1.1. A note. The name of the file must be pointed out prior the address.

The last step, you have to indicate to the ssh utility which key to use if you connect to the 1.1.1.1 server. Edit the config file in the ~/.ssh folder like this:

#test server
Host 1.1.1.1
 HostName 1.1.1.1
go get -u github.com/golang/protobuf/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
download protoc utility for Golang
https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0
put protoc binary somewhere in the PATH
Sometimes it is recommended to change `autocrlf` option that actually is not correct way if your team works on Windows and Unix-like operation systems.
A special setting `core.safecrlf` can be turned off `git config --global core.safecrlf false`. It will turn off only these warning, not the feature itself.