Skip to content

Instantly share code, notes, and snippets.

View gregorym's full-sized avatar
🏠
Working from home

Gregory Marcilhacy gregorym

🏠
Working from home
View GitHub Profile
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active June 19, 2025 16:14
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@rabssm
rabssm / ffmpegtips.txt
Last active March 2, 2025 09:37
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Change the framerate (to 5 fps) of an input h264 raw video and convert to mkv
ffmpeg -r 5 -i input.h264 -vcodec copy output.mkv
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
@audioscavenger
audioscavenger / api_comfyui-img2img.py
Last active February 29, 2024 15:51
ComfyUI for stable diffusion: API call script to run automated workflows
# https://gist.github.com/audioscavenger/0471b389b88ce3a3998d510832affed9
# 1. install ComfyUI-Custom-Scripts: cd E:\GPT\ComfyUI\custom_nodes\ && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts
# 2. enable dev mode options
# 3. save workflow in API format
# 4. python api_comfyui-img2img.py -w E:\GPT\ComfyUI\output\ComfyUI-workflow-recolor-api.json -i E:\GPT\ComfyUI\output\image-grey.jpg -o outputPrefix
# NOTE: Saving image outside the output folder is not allowed.
import getopt, sys, os
import json, urllib, random
from urllib import request, parse
<svg width="300" height="300" viewBox="0 0 300 300">
<defs>
<filter id="paperEffect">
<feTurbulence
type="fractalNoise"
baseFrequency="0.04"
numOctaves="5"
result="noise"
/>
<feDiffuseLighting