Skip to content

Instantly share code, notes, and snippets.

View g1ibby's full-sized avatar
🎯
Focusing

Sergei Varibrus g1ibby

🎯
Focusing
View GitHub Profile
@g1ibby
g1ibby / docker-compose.yml
Created July 26, 2020 06:22
docker-compose + traefik v2 + http->https redirect + whoami
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
@g1ibby
g1ibby / docker-compose.yml
Created July 26, 2020 06:31
Firefox sync self hosted: docker-compose + traefik v2
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
## Trafik Multi Network Deployment
1. Create Traefik network
` # docker network create --driver=bridge --attachable --internal=false traefik `
2. Edit `traefik2/docker-compose.yml`
- Change ACME email
- Change --providers.docker.network=traefik value if you created different network then `traefik`
@g1ibby
g1ibby / ethereum-dev-net.yml
Created October 26, 2020 12:18
Ethereum dev network: ganache + docker-compose
version: "3.8"
volumes:
ganache:
services:
ganache-cli:
image: "trufflesuite/ganache-cli:v6.12.0"
container_name: ganache-cli
restart: always
@g1ibby
g1ibby / ethereum-methods.go
Created October 27, 2020 09:59
Base functions for working with the ethereum network
package activity
import (
"context"
"crypto/ecdsa"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/powerman/structlog"
)
from telegram import Update
from telegram.ext import Application, CommandHandler, ContextTypes
from telegram.constants import ParseMode # Corrected import here
import subprocess
import re
import os
def get_log_status():
log_file = '/tmp/erigon.log'
try:
@g1ibby
g1ibby / rust-cli-guide.md
Created April 23, 2025 03:29
Guide: Building Beautiful & User-Friendly Rust CLI Tools

Guide: Building Beautiful & User-Friendly Rust CLI Tools

This guide provides best practices and patterns for developing sophisticated, user-friendly command-line interface (CLI) tools in Rust, drawing examples from the sapphire-cli project.

Core Principles of a Good CLI

  • Discoverability: Easy to find commands and options (e.g., --help).
  • Feedback: Keep the user informed about what's happening (e.g., spinners, progress bars, status messages).
  • Clarity: Use clear language, consistent terminology, and well-formatted output.
  • Robustness: Handle errors gracefully and provide informative error messages.