Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
: '
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@iSplasher
iSplasher / ripsubsfrommkv.py
Created June 5, 2016 06:49
RipSubsFromMKV
#!/usr/local/bin/python
#
# Script to rip srt/ssa subtitles out of .mkv files
# Usage: scriptname.py [filename.mkv]
# If the filename isn't specified all .mkv files in the current directory will be processed
# Developed with ffmpeg 2.1.1, you probably want that or higher if this doesn't work
#
import glob, re, argparse
from subprocess import call
@iSplasher
iSplasher / getVisibleIndexes.py
Created December 26, 2015 13:20
Get currently visible QModelIndexes in QListView, QTableView or QTreeView
# Put this in the class
def get_visible_indexes(self, column=0):
"find all galleries in viewport"
# used to find first index
gridW = self.W # width of single items
gridH = self.H # height of single items
region = self.viewport().visibleRegion()
idx_found = []
def idx_is_visible(idx):