Skip to content

Instantly share code, notes, and snippets.

Avatar

Lawrence Siden lsiden

View GitHub Profile
View mkcpanpkg
#!/usr/bin/env bash
# Make CPAN package.
# Usage: mkcpanpkg $dirname
# Run this in the parent directory of $dirname.
# $dirname must be a Git repository.
# It will create a file $dirname-$version.tar.gz containing all files tracked by Git.
function modname() {
perl -e "print join(q{::}, split(/-/, qw{$1}))"
@lsiden
lsiden / web-hybrid-solutions.md
Last active Apr 5, 2018
React Native - Web hybrid solutions
View web-hybrid-solutions.md
View webpack.config.js
const path = require('path')
module.exports = {
target: 'web',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: 'dist',
library: 'Alc',
libraryTarget: 'umd',
View webpack.config.js
const path = require('path')
module.exports = {
target: 'web',
entry: {
app: ['./demo/index.jsx']
},
devServer: {
contentBase: './demo/',
},
View gist:649d8ef9e02758ffde30b2b10fbac45a
#!/usr/bin/python
import gi
import sys
import threading
import time
from gi.repository import GObject
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GstController, GLib
def get_alpha_controller(pad):
View debug output for pipeline
2017-03-16 20:45:04,864, hls.py, DEBUG, hls.py, 72, videomixer name=mixer sink_0::zorder=0 sink_1::zorder=99
! videoconvert
! x264enc
! mpegtsmux name=muxer
! hlssink playlist-root=/hls-test
playlist-location=/tmp/hlsstreams/hls-test/playlist.m3u8
location=/tmp/hlsstreams/hls-test/seg%05d.ts
playlist-length=999
max-files=999
target-duration=3
@lsiden
lsiden / gist:c66ed5f35a00657c9225d1dc04f07b0c
Created Mar 13, 2017
Gst Pipeline demo with control source bound to 'alpha' property of videomixer sink
View gist:c66ed5f35a00657c9225d1dc04f07b0c
#!/usr/bin/python
import sys
import threading
import time
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject
from gi.repository import Gst, GstController, GLib
View gst-demo.py
#!/usr/bin/python
import gi
import sys
from gi.repository import GObject
gi.require_version('Gst', '1.0')
from gi.repository import Gst
from gi.repository import GstController
from gi.repository import GLib
GObject.threads_init()
View gist:11ee113b0798e19a255e5a88d9c984e3
==> moc-local2: Error: Execution of '/usr/local/rvm/bin/rvm install 2.3 ' returned 1: Searching for binary rubies, this might take some time.
==> moc-local2: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.3.0.tar.bz2
==> moc-local2: Checking requirements for ubuntu.
==> moc-local2: Installing requirements for ubuntu.
==> moc-local2: Updating system.........
==> moc-local2: Error running 'requirements_debian_update_system ruby-2.3.0',
==> moc-local2: showing last 15 lines of /usr/local/rvm/log/1476890187_ruby-2.3.0/update_system.log
==> moc-local2: ++ case "${TERM:-dumb}" in
==> moc-local2: ++ case "$1" in
==> moc-local2: ++ [[ -t 2 ]]
View view-video.html
<head>
<link href="http://vjs.zencdn.net/5.11.6/video-js.css" rel="stylesheet">
<!--[if IE 8]>
<script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>
<![endif]-->
<script src="http://vjs.zencdn.net/5.11.6/video.js"></script>
<script src="videojs-contrib-hls.min.js"></script>
</head>
You can’t perform that action at this time.