Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / convert_to_burp.sh
Last active June 18, 2025 15:46
Mitmproxy / Burp Suite Certificate Copy to Android Emulators (LDPlayer, Nox Emulator, BlueStacks)
# import as CA Cert (DER)
openssl x509 -in mitmproxy-ca-cert.pem -outform DER -out mitmproxy-ca-cert.der
# import as private key (DER)
openssl rsa -in mitmproxy-private-key.pem -outform DER -out mitmproxy-private-key.der
@CypherpunkSamurai
CypherpunkSamurai / ScenarioCreator_for_VisualNovels.py
Created June 13, 2025 22:19
Scenario Creator for Visual Novels
import copy
import json
import random
from datetime import datetime
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
class ScenarioConfigManager:
"""Manages loading, saving, and validating scenario configurations"""
@CypherpunkSamurai
CypherpunkSamurai / storage.googleapis.com_bucket_client.py
Last active June 11, 2025 08:10
storage.googleapis.com storage bucket client
"""
Google Cloud Storage Bucket Browser Library
A Python library for browsing Google Cloud Storage buckets using the public API.
Provides an S3-like interface for listing and navigating bucket contents.
"""
import logging
from dataclasses import dataclass
from typing import Dict, Iterator, List, Optional, Union
@CypherpunkSamurai
CypherpunkSamurai / README.md
Last active June 11, 2025 07:02
synology c2 bucket boto3 working

Synology C2 S3 Bucket Boto3 Code

This code fixes the chunked encoding error from SYNOLOGY C2 S3 BUCKET in BOTO3

error: boto3.exceptions.S3UploadFailedError: Failed to upload requirements.txt to requirements.txt: An error occurred (NotImplemented) when calling the PutObject operation: Transfering payloads in multiple chunks using aws-chunked is not supported.

We need to disable chunked encoding as c2 synology has no chunked encoding support like aws s3 or recent minio versions.

Note: This was not AI generated

# Sample as to how to initialize s3 client to work with Minio API compatible - https://github.com/minio/minio
# AWS CLI counterpart - https://docs.minio.io/docs/aws-cli-with-minio
import boto3
s3 = boto3.resource('s3',
endpoint_url='http://<minio_IP>:9000',
config=boto3.session.Config(signature_version='s3v4')
)
@CypherpunkSamurai
CypherpunkSamurai / create_venv_miniforge.bat
Created May 18, 2025 10:27
Create a Venv with Miniforge
conda create --prefix ./.venv python=3.5 uv -y
@CypherpunkSamurai
CypherpunkSamurai / README.md
Last active May 15, 2025 13:04
CGo FFmpeg LibAV Desktop Duplication Capture Screen on Windows

FFmpeg Libav Desktop Duplication Capture Screen

How to build:

  1. Follow this cause we need msys2 with ffmpeg libraries so pkg-config tool can find the required libraries
  2. If you're using GoLang edit your build env var

We will need pkg-config tool to be able to find the required libraries, ie libavcodec.pc file. We need to make sure pkg-config looks in the right folders to find it.

set PKG_CONFIG_PATH env var pointing to the mingw64\lib\pkgconfig folder. For me msys2 is installed in C:\Tools so it pointed it to pkgconfig folder in the mingw64\lib\pkgconfig folder of msys2.

@CypherpunkSamurai
CypherpunkSamurai / README.md
Created May 15, 2025 07:53
How to Use FFmpeg Mailing List

How to Use FFmpeg Mailing List

Looking Up Questions Like Stack Overflow

  1. Open Archives
  2. Browse Question Threads and Followup Emails

Ask a Question

  1. Read Mailing List FAQ (no seriously, just search it for terms like "ask a question", or "join" or "subscribe" or "libav")
@CypherpunkSamurai
CypherpunkSamurai / CMakeLists.txt
Last active May 15, 2025 13:05
FFmpeg Desktop Duplication API Encoder
cmake_minimum_required(VERSION 3.10)
project(ffmpeg_desktop_try1 C)
set(CMAKE_C_STANDARD 11) # Or gnu17 if you prefer
find_package(PkgConfig REQUIRED)
pkg_check_modules(AVCODEC REQUIRED libavcodec)
pkg_check_modules(AVFORMAT REQUIRED libavformat)
pkg_check_modules(AVUTIL REQUIRED libavutil)
pkg_check_modules(SWSCALE REQUIRED libswscale)