profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/stokito/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sergey Ponomarev stokito Krivoy Rog, Ukraine https://www.linkedin.com/in/stokito/ An experienced Java / Web developer with a focus on code quality, security and performance

artyushov/idea-jmh-plugin 329

Plugin for Itellij IDEA to make benchmarking with JMH easier.

ponomandr/jmeter-idea-plugin 23

Open JMeter files with JMeter in Intellij IDEA

stokito/deflate 2

deflate is low level gzip utility based on zlib to create a deflate streams i.e. gzip without checksum

stokito/delphi-goodnes 1

Old time Delphi units with some useful functions

stokito/ebpf-test 1

Extended Berkeley Packet Filter - HTTP parser

maxifelix/langSelector 0

grails-lang-selector plugin

issue commentbcicen/ctop

Legend of CTOP

well, basically this is still an issue because it must be documented somewhere. At least in README or better in the ctop itself

alex-v-jc

comment created time in 9 hours

issue commentbcicen/ctop

Legend of CTOP

The plus sign means that the container is healthy. A container may declare a HEALTHCHECK command to allow the docker to check if everything all right. For example connection to a database is fine and not closed. Please note that in latest version of ctop the status mark was changed to https://github.com/bcicen/ctop/pull/236/files#diff-41b85fed80e92edd718149bfff7e5e72c61514e00fe3d19f129db3dd3461f280L11

alex-v-jc

comment created time in 16 hours

push eventstokito/go

Sergey Ponomarev

commit sha 112dd96110a849688c649b6727d15ce37fd4aebf

Do not add headers with an empty value

view details

push time in 5 days

create barnchstokito/go

branch : header

created branch time in 5 days

issue commentsystemd/systemd

journald: provide a journal distinction per unit file / service for vacuum / disk-size

Just for the record: TODO has a corresponding item https://github.com/systemd/systemd/blob/61233823aa4b0fe9605e0a7cd77261b3c5bca8e9/TODO#L502 Also there is a discussion https://unix.stackexchange.com/questions/296453/how-to-configure-per-unit-log-storage-policy-with-journald

docent-net

comment created time in 5 days

push eventstokito/go

Sergey Ponomarev

commit sha 13e94a4e31f03cd7710fe64642cf2b45fa301d44

server.go: Date header: don't generate if it was set to an empty string

view details

push time in 5 days

fork stokito/go

The Go programming language

https://golang.org

fork in 5 days

delete branch stokito/dnscache

delete branch : dial_context

delete time in 5 days

PR closed rs/dnscache

README.md: imporove example

The net.SplitHostPort() expects that addr is a host with port but:

  • The host can be not just a domain but also IPv4 or IPv6 address
  • Port may be undefined

In our case port is always specified so we can safely take a last part after the colon ':' and this will work even for IPv6. Also in fact we expect only a domain and if the addr is already IP then the DNS lookup can be skipped. You can add a check if host is already an IP and skip it but I didn't found an easy solution and I expect this to be a rare case.

+5 -5

0 comment

1 changed file

stokito

pr closed time in 5 days

Pull request review commentrs/dnscache

README.md: imporove example

 If you are using an `http.Transport`, you can use this cache by specifying a `Di r := &dnscache.Resolver{} t := &http.Transport{     DialContext: func(ctx context.Context, network string, addr string) (conn net.Conn, err error) {-        host, port, err := net.SplitHostPort(addr)-        if err != nil {-            return nil, err-        }-        ips, err := r.LookupHost(ctx, host)+        // addr has form host:port and the port is 80 by default+        colonPos := strings.LastIndexByte(addr, ':')

ok I tested and all works fine but anyway I created a more clean commit in #16

stokito

comment created time in 5 days

PullRequestReviewEvent

push eventstokito/dnscache

Sergey Ponomarev

commit sha 827f609efc1af7e984bdb26e5462a240f52512c7

DialContext: optimize The net.SplitHostPort() is not needed because port is always present, so we can easily take it from the end after a colon.

view details

push time in 5 days

create barnchstokito/dnscache

branch : dial_context

created branch time in 5 days

issue closedrs/dnscache

DialContext function

It would be great to add the code snippet from docs into library itself and cover with a test:

    DialContext: func(ctx context.Context, network string, addr string) (conn net.Conn, err error) {
        host, port, err := net.SplitHostPort(addr)
        if err != nil {
            return nil, err
        }
        ips, err := r.LookupHost(ctx, host)
        if err != nil {
            return nil, err
        }
        for _, ip := range ips {
            var dialer net.Dialer
            conn, err = dialer.DialContext(ctx, network, net.JoinHostPort(ip, port))
            if err == nil {
                break
            }
        }
        return
    },

So users may just use it direcly instead of copying from docs.

closed time in 6 days

stokito

issue commentrs/dnscache

DialContext function

created a PR

stokito

comment created time in 6 days

PR opened rs/dnscache

Add DialContext function

#16

+31 -0

0 comment

2 changed files

pr created time in 6 days

create barnchstokito/dnscache

branch : dial

created branch time in 6 days

startedorganicmaps/organicmaps

started time in 9 days

started0install/0install

started time in 9 days

started0install/apps

started time in 9 days

issue openedrs/dnscache

DialContext function

It would be great to add the code snippet from docs into library itself and cover with a test:

    DialContext: func(ctx context.Context, network string, addr string) (conn net.Conn, err error) {
        host, port, err := net.SplitHostPort(addr)
        if err != nil {
            return nil, err
        }
        ips, err := r.LookupHost(ctx, host)
        if err != nil {
            return nil, err
        }
        for _, ip := range ips {
            var dialer net.Dialer
            conn, err = dialer.DialContext(ctx, network, net.JoinHostPort(ip, port))
            if err == nil {
                break
            }
        }
        return
    },

So users may just use it direcly instead of copying from docs.

created time in 9 days

PullRequestReviewEvent

Pull request review commentrs/dnscache

README.md: imporove example

 If you are using an `http.Transport`, you can use this cache by specifying a `Di r := &dnscache.Resolver{} t := &http.Transport{     DialContext: func(ctx context.Context, network string, addr string) (conn net.Conn, err error) {-        host, port, err := net.SplitHostPort(addr)-        if err != nil {-            return nil, err-        }-        ips, err := r.LookupHost(ctx, host)+        // addr has form host:port and the port is 80 by default+        colonPos := strings.LastIndexByte(addr, ':')

The LastIndexByte() returns a position of only last colon from right so the parsing will work correctly even for IPv6. So the SplitHostPort() is not needed here But if the host is already an IP (both 4 and 6) then during call resolver.LookupHost we'll get an error. This is actually a bug because hosts with plain IP won't work now.

stokito

comment created time in 9 days

PR opened rs/dnscache

README.md: imporove example

The net.SplitHostPort() expects that addr is a host with port but:

  • The host can be not just a domain but also IPv4 or IPv6 address
  • Port may be undefined

In our case port is always specified so we can safely take a last part after the colon ':' and this will work even for IPv6. Also in fact we expect only a domain and if the addr is already IP then the DNS lookup can be skipped. You can add a check if host is already an IP and skip it but I didn't found an easy solution and I expect this to be a rare case.

+5 -5

0 comment

1 changed file

pr created time in 9 days

push eventstokito/dnscache

Sergey Ponomarev

commit sha b8ed69764fc9b63f2f8dfa6fc735f4b8b0b689d1

README.md: imporove example The `net.SplitHostPort()` expects that addr is a host with port but: * The host can be not just a domain but also IPv4 or IPv6 address * Port may be undefined In our case port is always specified so we can safely take a last part after the colon ':' and this will work even for IPv6. Also in fact we expect only a domain and if the addr is already IP then the DNS lookup can be skipped. You can add a check if host is already an IP and skip it but I didn't found an easy solution and I expect this to be a rare case.

view details

push time in 9 days

fork stokito/dnscache

DNS lookup cache for Go

fork in 9 days

issue openedrcrowley/go-metrics

Difference with official Prometheus library github.com/prometheus/prometheus

Could you please explain a difference with the official prometheus library? Except of that I need to use an additional exporter to prometheus. I have a 3rd party library that uses go-metrics but for my app I just used the official library because found their tutorial first. But I writing a service that should work as fast as possible and now I revising all dependencies. So will be the go-metrics + go-metrics-prometheus work faster than official github.com/prometheus/prometheus library?

created time in 10 days

startedrs/dnscache

started time in 12 days

startedlandley/toybox

started time in 16 days

starteddustinrue/ControlPlane

started time in 18 days