Skip to content

Instantly share code, notes, and snippets.

View groovili's full-sized avatar

Maksym Ivanov groovili

  • Kyiv, Ukraine
View GitHub Profile
@groovili
groovili / dpgo.md
Created July 6, 2018 08:14 — forked from jsam/dpgo.md
dpgo

Design patterns with Go

Course Materials

  • Handouts / Worksheets
  • Slides
  • Code Examples
  • Videos

Course objectives

@groovili
groovili / singleton.go
Created July 6, 2018 08:14 — forked from jackypanster/singleton.go
singleton in golang
package singleton
import (
"sync"
)
type singleton struct {
}
var instance *singleton
@groovili
groovili / latency.txt
Created July 3, 2018 19:13 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@groovili
groovili / git-tags-add-and-delete.sh
Last active May 12, 2018 07:20 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# add tag
git tag 12345
# push tags to remote
git push --tags
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345