Skip to content

Instantly share code, notes, and snippets.

View 8thgencore's full-sized avatar

8thgencore 8thgencore

View GitHub Profile
@yamanahlawat
yamanahlawat / upgrade_pyproject.py
Last active April 2, 2026 08:44
Upgrade all packages using uv
"""
Script to automatically update uv.lock and then update pyproject.toml dependencies.
Prerequisites:
1. Python 3.11+ (for tomllib)
2. tomli-w package (`pip install tomli-w`)
3. uv installed and available in PATH
Usage:
Run this script: `python upgrade_pyproject.py`
@artemonsh
artemonsh / s3_client.py
Created May 26, 2024 11:10
S3 Client Python class — Клиент для работы с S3 через Python + aiobotocore
import asyncio
from contextlib import asynccontextmanager
from aiobotocore.session import get_session
from botocore.exceptions import ClientError
class S3Client:
def __init__(
self,
@nkhitrov
nkhitrov / logger.py
Last active August 29, 2025 00:11
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat
@osipxd
osipxd / .editorconfig
Last active November 18, 2025 06:10
EditorConfig for Android projects with mapping to IntelliJ IDEA's config
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
@InJeCTrL
InJeCTrL / m3u8Downloader.py
Last active May 26, 2021 20:17
m3u8视频分段下载&合并
from concurrent.futures import ThreadPoolExecutor, wait, ALL_COMPLETED
from Crypto.Cipher import AES
import threading
import requests
import os
class m3u8_downloader:
'''
m3u8下载类
'''
@sergiks
sergiks / README.md
Last active February 20, 2026 17:29
Let's Encrypt wildcard certificates in docker

NGINX and Certbot example with CloudFlare API in Docker

Sample config files to demonstrate seup that creates and updates free SSL certificates from Let's Encrypt given that the domains are maintained at CloudFlare service.

How it works

Certbot verifies domains ownership by accessing CloudFlare API that adds temporary TXT DNS records. To enable it You must provide your CloudFlare API token. More details in documentation for dns-cloudflare Certbot plugin.

Certbot saves created certificates in Docker volume certbot_etc. Pay attention to output of the certbot run - it mentions path to the created certificates.

@ryo-ARAKI
ryo-ARAKI / starship.toml
Last active April 19, 2026 02:52
Starship configuration file
# ~/.config/starship.toml
"$schema" = "https://starship.rs/config-schema.json"
# NOTE: Emojis with variation selectors or unstable display widths may cause prompt rendering glitches.
# Examples include ⚔️ 🏎️ 🗃️ 🗑️ ✒️
# If layout breaks, prefer colourful emojis without variation selectors.
format = """
$username$hostname$directory$git_branch$git_commit$git_state$git_metrics$git_status$julia$python${custom.python_venv}$rust$typst$conda$direnv
$character"""
@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active February 25, 2026 16:48
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@zmts
zmts / tokens.md
Last active April 20, 2026 12:07
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов