Skip to content

Instantly share code, notes, and snippets.

View JosefJezek's full-sized avatar

Josef Ježek JosefJezek

  • Heart of Europe
View GitHub Profile
@JosefJezek
JosefJezek / ffmpeg GIF to MP4.MD
Created July 7, 2022 15:00 — forked from gvoze32/ffmpeg GIF to MP4.MD
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.

@JosefJezek
JosefJezek / README.md
Created February 15, 2016 10:03 — forked from datenimperator/README.md
Temporary fix for Gitlab sockets not working inside a LXC container on Proxmox 4.1

This is a temporary fix for a problem running Gitlab on Proxmox 4.1 inside a LXC container. Symptom: UNIX sockets created inside containers get wrong permissions. This seems to be related to AppArmor and the Debian kernel used by Proxmox. See this thread on the Proxmox forum for details.

Run apt-get install inotify-tools if you haven't installed inotifywait yet.

Place the first file in /usr/local/sbin/fix_gitlab.sh and make it executable: chmod 755 /usr/local/sbin/fix_gitlab.sh. Edit etc/rc.local to include it during boot.

@JosefJezek
JosefJezek / zenoss_json_api.sh
Last active February 26, 2018 01:23 — forked from cluther/zenoss-shell-functions
Zenoss JSON API Shell / Bash script
#!/bin/sh
# Zenoss JSON API Shell / Bash script
# Link: https://gist.github.com/8399651
# Resources
# http://wiki.zenoss.org/Working_with_the_JSON_API
# https://gist.github.com/cluther/1901884
# http://blog.remibergsma.com/2013/04/26/automatically-adding-and-editing-devices-in-zenoss-core-4-using-the-api

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: