Skip to content

Instantly share code, notes, and snippets.

View theruziev's full-sized avatar
🎷
Jazz things

Bakhtiyor Ruziev theruziev

🎷
Jazz things
View GitHub Profile
@theruziev
theruziev / 20min.sh
Created February 25, 2020 10:46
Cron for eyes
#!/bin/sh
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
#Code:
DISPLAY=:0 notify-send "Wink wink"
package logger
import (
"bytes"
"fmt"
"io"
"net/http"
"time"
"github.com/go-chi/chi/v5/middleware"
@theruziev
theruziev / closer.go
Last active January 7, 2024 21:12
Closer in go. I wrote a blog post about this code snippet. https://theruziev.com/blog/post/closer-go
package closer
import (
"context"
"errors"
"sync"
)
type closer func(ctx context.Context) error