Skip to content

Instantly share code, notes, and snippets.

View giansegato's full-sized avatar

Gian Segato giansegato

View GitHub Profile
@giansegato
giansegato / .vimrc
Created October 26, 2020 07:47
Personal .vimrc config file
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
@giansegato
giansegato / tz
Created October 20, 2020 09:06
Python script to quickly deal with timezones
#!/usr/bin/env python3
"""
Author: Gian Segato
Usage:
tz 15 to pt
tz: exec name
@giansegato
giansegato / mov_to_gif.sh
Last active October 20, 2020 09:07
Mov to Gif script (amazingly useful for inline demos)
#!/bin/bash
# see: https://medium.com/@colten_jackson/doing-the-gif-thing-on-debian-82b9760a8483
SOURCE=$1
DESTINATION="${SOURCE%.*}.gif"
# Palette generation
ffmpeg -i $SOURCE -vf fps=7,scale=320:-1:flags=lanczos,palettegen temp_palette.png
# Conversion
@giansegato
giansegato / kaltura_file_download.md
Created September 5, 2020 14:20
How to download a video from Kaltura video service

Kaltura Video Downloader

Also known as: find and merge m3u8 files

⚠️ WARNING ⚠️ → use this guide at your sole discretion.

Check the copyright laws and the term of service before using it. You might be breaking the law!


  1. Open the Network tab of the Chrome Inspector
@giansegato
giansegato / mp4tomp3.sh
Created September 4, 2020 15:34
mp4 → mp3
#!/bin/sh
for f in *.mp4; do
echo "Processing $f"
mkdir -p output;
ffmpeg -i "$f" "output/${f%}.mp3"
done