Skip to content

Instantly share code, notes, and snippets.

View BlackHacked's full-sized avatar
📷
Hello World

Latin BlackHacked

📷
Hello World
View GitHub Profile
@BlackHacked
BlackHacked / tar-progress.md
Created November 27, 2025 06:46 — forked from Kautenja/tar-progress.md
one-liners for using tar with gzip and pv for a progress bar

Compress

tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>

where:

  • `` is the root-mounted (i.e. starts with /) path to the files
@BlackHacked
BlackHacked / requirementstxt_to_uv_pyprojecttoml.py
Created August 5, 2025 07:32 — forked from rosmur/requirementstxt_to_uv_pyprojecttoml.py
requirements.txt to uv pyproject.toml dependencies convertor
#!/usr/bin/env python3
"""
Script to convert requirements.txt to dependencies list for pyproject.toml for uv project
Usage:
Execute the script with:
python3 requirementstxt_to_uv_pyprojecttoml.py path/to/requirements.txt
@BlackHacked
BlackHacked / install-poppler-ubuntu.md
Created May 16, 2025 09:34 — forked from Dayjo/install-poppler-ubuntu.md
How to install Poppler on Ubuntu

First install all these prerequisites for compiling:

sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev

First download the encoding files (no need to compile these) to the current working directory

wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz
@BlackHacked
BlackHacked / Dockerfile
Created May 13, 2025 10:33 — forked from jensmeder/Dockerfile
Hello World Example For .NET 4.5.2 Running With Wine in Ubuntu Docker Container
FROM ubuntu:18.04
# Install wget
RUN apt-get update
RUN apt-get install -y wget
# Add 32-bit architecture
RUN dpkg --add-architecture i386
RUN apt-get update
@BlackHacked
BlackHacked / Dockerfile
Created May 13, 2025 03:50 — forked from delagreen-v2/Dockerfile
Dockerfile
FROM ubuntu:20.04
USER root
WORKDIR /root
SHELL [ "/bin/bash", "-c" ]
ARG PYTHON_VERSION_TAG=3.10.5
ARG LINK_PYTHON_TO_PYTHON3=1
@BlackHacked
BlackHacked / .drone.yml
Created March 31, 2025 10:18 — forked from ondrejmo/.drone.yml
multi-architecture docker pipeline in Drone CI
---
kind: pipeline
type: docker
name: linux-amd64
trigger:
branch:
- myapp
event:
@BlackHacked
BlackHacked / README.md
Created March 24, 2025 08:55 — forked from gdamjan/README.md
fastapi and proxies

Quickstart

pdm install

These are equivalent (given the main.py code)

UVICORN_ROOT_PATH=/api/ pdm run uvicorn main:app
FASTAPI_ROOT_PATH=/api/ pdm run uvicorn main:app
@BlackHacked
BlackHacked / README.md
Created March 24, 2025 08:49 — forked from walnutwaldo/README.md
FastAPI Proxy

FastAPI HTTP Proxy Application

Introduction

This FastAPI application serves as an HTTP proxy, forwarding client requests to an upstream API server and relaying the server's response back to the client. It supports arbitrary paths and HTTP methods, providing a versatile proxy solution for various API interactions.

Requirements

  • Python 3.6 or higher
  • FastAPI
  • Uvicorn
  • HTTPX
@BlackHacked
BlackHacked / app.py
Created March 24, 2025 08:48 — forked from wwdegroot/app.py
FastApi proxy endpoint
# adapted from https://github.com/fastapi/fastapi/issues/1788
from fastapi import FastAPI
from starlette.requests import Request
from starlette.responses import StreamingResponse
from starlette.background import BackgroundTask
import uvicorn
import httpx
API_KEY = os.getenv('API_KEY')
@BlackHacked
BlackHacked / agent loop
Created March 11, 2025 01:06 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet