Skip to content

Instantly share code, notes, and snippets.

@dphov
dphov / tmux_build_from_source_CentOS.sh
Last active September 28, 2017 15:14 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.5
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@dphov
dphov / external.htm
Created October 11, 2017 08:55 — forked from bennadel/external.htm
Exploring Recursive Promises In JavaScript
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>
Exploring Recursive Promises In JavaScript
</title>
</head>
<body>
@dphov
dphov / .vimrc
Last active November 2, 2017 06:00
My vimrc for vim8
set nocompatible
syntax enable
set encoding=utf-8
set showcmd
filetype plugin indent on
""Whitespace
set nowrap "don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab "usespaces,nottabs(optional)
@dphov
dphov / GStreamer_cheatsheet.md
Created October 27, 2017 05:09
GStreamer 1.12.3, Mac OS Sierra 10.12.6

Video Test Source

To generate a test video stream use videotestsrc

gst-launch-1.0 videotestsrc ! glimagesink

Use the pattern property to select a specific pattern:

@dphov
dphov / macosx_gstreamer_plugins.md
Last active March 21, 2020 17:17
Mac OS X GSteamer brew install

gst-plugins-base

brew install gst-plugins-base --with-libogg --with-theora --with-libvorbis

gst-plugins-good

brew install gst-plugins-good --with-flac --with-taglib --with-libsoup --with-jpeg --with-libcaca --with-libshout --with-speex

gst-plugins-bad

brew install gst-plugins-bad --with-faad2 --with-libsndfile --with-libmms

gst-plugins-ugly

@dphov
dphov / 01-hello-world.py
Last active January 13, 2025 07:50
GStreamer mac os x hello world basic tutorial python pygobject
# coding=utf-8
# https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html
# Also big thanks to https://stackoverflow.com/questions/35137165/gstreamer-1-0-video-from-tutorials-is-not-playing-on-macos
import gi
gi.require_versions({'Gst': '1.0'})
from gi.repository import Gst, GLib
Gst.init(None)
@dphov
dphov / 02-gstreamer-concepts.py
Last active November 10, 2017 08:56
GStreamer mac os x python
# coding=utf-8
# https://gstreamer.freedesktop.org/documentation/tutorials/basic/concepts.html
# thanks to https://github.com/gkralik/python-gst-tutorial
import gi
# import sys
gi.require_versions({'Gtk': '3.0', 'Gst': '1.0'})
from gi.repository import Gst, GObject, GLib, Gtk
Gst.init(None)
@dphov
dphov / 03-dynamic-pipelines.py
Last active November 10, 2017 11:53
GStreamer Dynamic Hello World mac os x python
#!/usr/bin/env python3
# coding=utf-8
# https://gstreamer.freedesktop.org/documentation/tutorials/basic/dynamic-pipelines.html
import gi
gi.require_versions({'Gtk': '3.0', 'Gst': '1.0'})
from gi.repository import Gst, Gtk
Gst.init(None)
@dphov
dphov / 08-short-cutting-the-pipeline.py
Last active November 23, 2017 11:55
half working example of Basic tutorial 8: Short-cutting the pipeline. Any help will be very welcome! Special thanks to: https://github.com/rubenrua/GstreamerCodeSnippets/blob/master/Other/0.10/Python/pygst-sdk-tutorials/basic-tutorial-8.py Tags: GStreamer Python Mac OS X
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Basic tutorial 8: Short-cutting the pipeline
https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html
"""
import sys
import logging
import gi