Skip to content

Instantly share code, notes, and snippets.

View carlos-a-g-h's full-sized avatar
🏠
"Working" from home sometimes

carlos-a-g-h

🏠
"Working" from home sometimes
View GitHub Profile
@carlos-a-g-h
carlos-a-g-h / config.toml
Created January 1, 2026 12:11
Personal helix config files
theme = "github_dark"
[editor]
mouse = false
bufferline = "multiple"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
@carlos-a-g-h
carlos-a-g-h / concha.py
Last active March 13, 2025 19:41
Script that can convert a file with youtube chapter format into FFmpeg chapter format (FFMETADATA1)
#!/usr/bin/python3.9
from json import loads as json_loads
from subprocess import run as sub_run
from typing import Mapping,Optional,Union
from datetime import datetime,timedelta
from pathlib import Path
# FFMETADATA1 symbols
_SYM_START="START"
@carlos-a-g-h
carlos-a-g-h / share_variables_with_artifacts.yaml
Created May 27, 2024 17:14
GH Workflows: Sharing step output variables across jobs using artifacts
name: "test"
on:
[workflow_dispatch]
jobs:
first:
name: First Job
runs-on: ubuntu-latest
steps:
@carlos-a-g-h
carlos-a-g-h / generic_nuitka.yml
Created October 23, 2023 15:22
Github workflow for single-file Nuitka (python) executable binaries
name: (Generic) Nuitka
on:
workflow_dispatch:
inputs:
THE_NAME:
description: Repository name (without your username)
type: string
required: true
@carlos-a-g-h
carlos-a-g-h / pipkit.py
Last active April 21, 2024 17:48
don't ask why
#!/usr/bin/python3
from pathlib import Path
from subprocess import run as sub_run
from subprocess import PIPE as sub_PIPE
def pip_list(filepath:Path)->bool:
print("\nObtaining list of packages...")
proc=sub_run(
@carlos-a-g-h
carlos-a-g-h / fftoolkit.py
Last active October 14, 2023 14:50
FFmpeg python script for some common tasks. Requires FFmpeg installed
#!/usr/bin/python3.9
import json
import subprocess
from datetime import datetime
from pathlib import Path
# FFToolkit by t.me/CarlosAGH
def util_match_language(filestem):
@carlos-a-g-h
carlos-a-g-h / mount-debian-dvds.sh
Created May 31, 2023 19:56
Script for mounting Debian DVDs and adding them to /etc/sources.list
#!/bin/bash
DVDs_DIRPATH="$1"
DVDs_PATTERN="$2"
TOTAL=$(ls "$DVDs_DIRPATH"|grep "$DVDs_PATTERN"|grep ".iso$"|wc -l)
INDEX=0
INDEX_MAX=$(expr $TOTAL + 1)
@carlos-a-g-h
carlos-a-g-h / cronjobtools.py
Last active May 20, 2023 05:06
A small module for interacting with existing cron jobs using the cron-job.org API
#!/usr/bin/python3.9
import asyncio
import aiohttp
async def cronjob_patch(session:aiohttp.ClientSession,cronjob_apikey:str,cronjob_jid:str,cronjob_data:dict)->bool:
ts=False
if not session:
ts=True
@carlos-a-g-h
carlos-a-g-h / mirroring.yml
Last active August 24, 2023 23:15
Download a file and upload as a github release (THIS IS NOT LEGAL)
# WARNING: This is not how you should use a CI/CD plaftform, use privately and at your own risk
name: URL uploader
on:
workflow_dispatch:
inputs:
LINK:
type: string
required: true
FILENAME:
type: string
https://stackoverflow.com/questions/16523746/ffmpeg-hangs-when-run-in-background#16527559
https://www.dacast.com/blog/how-to-broadcast-live-stream-using-ffmpeg
https://cloud.tencent.com