Skip to content

Instantly share code, notes, and snippets.

View rayansostenes's full-sized avatar

Rayan Sóstenes rayansostenes

View GitHub Profile
@antiops
antiops / human_readable.sh
Last active February 17, 2026 02:25 — forked from agunnerson-ibm/human_readable.sh
Bash function to convert bytes to human readable size
# Copyright 2015 Andrew Gunnerson <andrewgunnerson@gmail.com>
# Copyright 2024 antiops@github
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@balazs-endresz
balazs-endresz / models.py
Last active April 3, 2024 22:58
analyze explain django queryset
from django.db import connections
from django.db.models.query import QuerySet
def explain(self):
cursor = connections[self.db].cursor()
cursor.execute('set enable_seqscan = off')
query, params = self.query.sql_with_params()
print(query % params)
cursor.execute('EXPLAIN ANALYZE %s' % query, params)

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links