Skip to content

Instantly share code, notes, and snippets.

View carlos-a-g-h's full-sized avatar
🌡️
self-diagnosed with YAML addiction, someone plz call a doctor

carlos-a-g-h

🌡️
self-diagnosed with YAML addiction, someone plz call a doctor
View GitHub Profile
#!/usr/bin/python3.9
# Extremely simple webserver made with the stdlib just for testing purposes
import time
import sys
from http.server import BaseHTTPRequestHandler, HTTPServer
try:
port=int(sys.argv[1])
#!/bin/bash
# Build and upload an image to Dockerhub
DH_USER="$1"
DH_PASS="$2"
DH_REPO="$3"
THE_DIR="$4"
RIGHT_NOW="$(date +%Y-%m-%d-%H-%M)"
#!/bin/bash
# Fetches a github repo
GH_TOKEN="$1"
GH_REPO_O="$2"
GH_REPO_N="$3"
GH_REPO_B="$4"
OUTDIR="$5"
name: Dockerhub Publisher
on:
workflow_dispatch:
inputs:
REPO_N:
description: Github and Dockerhub repo name (without user)
required: true
type: string
@carlos-a-g-h
carlos-a-g-h / script_GHWF_Build_with_PyInstaller.yml
Last active May 27, 2023 13:49
This is for python apps. Creates a github release and adds Windows and Linux binaries made with PyInstaller as release assets. Edit the env vars before using
name: Create release and binaries
on:
workflow_dispatch:
env:
TAGNAME: "tag-name-here"
FILE_REQ: "requirements.txt"
FILE_PY: "program.py"
NAME_LINUX: "linux-build.tar"
#!/bin/bash
# Enctool is a script for encrypting or decrypting a group of specific files using openssl
# Usage
# $ enctool.sh {ACTION} {PASSWORD}
# Requires a file in CSV format called "enctool.csv" among the target files
# For each row: the first column is the original filename and the second column is the encrypted filename
# The columns must be separated by a tab character
import asyncio
import logging
logging.getLogger()
async def sp_streamer(hook,dbg=False):
proc=hook["proc"]
if dbg:
printout=0
while True:
@carlos-a-g-h
carlos-a-g-h / script_GHWF_RustCargoTester.yml
Last active March 10, 2023 21:40
Runs a test for simple one-file-like rust programs
name: Run tests using cargo
on:
workflow_dispatch:
inputs:
RS_FILE:
description: Name of the RS file (without the .RS extension)
required: true
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
@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