Skip to content

Instantly share code, notes, and snippets.

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

Miquel Sabaté Solà mssola

🏠
Working from home
View GitHub Profile
@jordimassaguerpla
jordimassaguerpla / dockerfile
Last active December 1, 2015 14:22
netcat docker example
FROM opensuse:latest
MAINTAINER Jordi Massaguer "[email protected]"
RUN echo -e "#!/bin/sh\n \nnc -l 80" > /bin/hello-world-server
RUN chmod +x /bin/hello-world-server
RUN zypper -n install "netcat-openbsd"
EXPOSE 80
CMD /bin/hello-world-server
# test me with "telnet IP 80"
# get the ip with docker inspect CONTAINER

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg