Skip to content

Instantly share code, notes, and snippets.

View Alieff's full-sized avatar

Alieff

View GitHub Profile
@tomnomnom
tomnomnom / convert-mp4-to-gif.mkd
Last active December 4, 2022 09:59
Crop an mp4 and convert it to a gif

Because I'll forget how to do this...

Crop

crop=w:h:x:y

ffmpeg -i in.mp4 -filter:v "crop=900:700:0:50" out.mp4
@skriticos
skriticos / pygtk-cairo-opaque-xshape-window-from-png.py
Created April 17, 2009 21:06
Transparent, irregular edge splash screen with pyGTK and XShape.
""" Transparent, irregular edge splash screen with pyGTK and XShape.
Takes a png image with transparent section, creates a window with pyGTK, puts this image in
there with cairo and then trims the edges with X11 XShape clipping extension.
This file demonstrates a python script which loads a png image of size 800x650 and name base.png
Then it creates a GTK+/Cairo window with opaque settings from the png file and the transparent
portions cut out with a mask. Basic, but works and looks great.
Note: this is a proof of concept file. It works, but it is by no means production ready.
"""