Skip to content

Instantly share code, notes, and snippets.

View jpauwels's full-sized avatar

Johan Pauwels jpauwels

View GitHub Profile
@askilondz
askilondz / gistlog.yml
Last active August 10, 2024 18:35
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@alexellis
alexellis / Dockerfile
Last active December 5, 2022 23:46
Run a one-shot job on Docker Swarm Mode
FROM golang:1.7.3
RUN mkdir -p /go/src/github.com/alexellis2/jaas
WORKDIR /go/src/github.com/alexellis2/jaas
COPY ./app.go ./
RUN go get -v -d
RUN go build
# Example animations using matplotlib's FuncAnimation
# Ken Hughes. 18 June 2016.
# For more detail, see
# https://brushingupscience.wordpress.com/2016/06/21/matplotlib-animations-the-easy-way/
# Examples include
# - line plot
# - pcolor plot
# - scatter plot
@marians
marians / CouchDB_Python.md
Last active September 1, 2024 00:19
The missing Python couchdb tutorial

This is an unofficial manual for the couchdb Python module I wish I had had.

Installation

pip install couchdb

Importing the module

@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active February 4, 2025 00:47
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@GOFAI
GOFAI / deepcl.rb
Created November 22, 2015 03:13
Finalized Homebrew Formula for DeepCL
class Deepcl < Formula
desc "OpenCL library to train deep convolutional neural networks"
homepage "https://github.com/hughperkins/DeepCL"
url "https://github.com/hughperkins/DeepCL/archive/v8.1.3.tar.gz"
sha256 "e0301ba5ae4464ae27a3ec2c777b77faa90b9ee6d1059b200f06a9100d182de1"
resource "EasyCL" do
url "https://github.com/hughperkins/EasyCL/archive/b9023cdf25c10524ad06227275d3756bbe0c0ed2.tar.gz"
sha256 "96c6061385e850081cfce17673353b41dbf470fc6b6f3a15e047b1d6506ba80e"
end
@imneme
imneme / randutils.hpp
Last active April 16, 2025 13:48
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Melissa E. O'Neill
*
@johnhany97
johnhany97 / gist:2e667d3a54b45b178aad
Created April 23, 2015 00:31
Batch Replace specific text in PDF automatically using pdftk
Create a file with this:
#!/bin/bash
oldtext=$1
newtext=$2
pdffile=$3
cp $pdffile $pdffile.bak
pdftk $pdffile output $pdffile.tmp uncompress
@joferkington
joferkington / point_drag_add_delete.py
Created March 26, 2015 13:46
General example of the type of framework you need to efficiently implement drawable/draggable/deleteable artists in matplotlib.
import numpy as np
import matplotlib.pyplot as plt
class DrawDragPoints(object):
"""
Demonstrates a basic example of the "scaffolding" you need to efficiently
blit drawable/draggable/deleteable artists on top of a background.
"""
def __init__(self):
self.fig, self.ax = self.setup_axes()
@jedi4ever
jedi4ever / gist:7677d62f1414c28a1a8c
Last active November 20, 2020 07:28
Some notes on travisci remote debugging via ssh or screenshot or remote desktop of Mac VM builds
Some notes on remote debugging mac builds on Travisci. It's hard to tell when something hangs what the cause it. Trial and error via commits is tedious. And on Mac , sometimes it's the gui asking for input. So I worked my around to get the access I needed for faster debugging a build.
#################################################
# Enable remote ssh access to travisci build for debugging
#################################################
# Add a key so we can login to travisci vm
- cat ssh/travisci.pub >> ~/.ssh/authorized_keys
- chmod 600 ssh/travisci
# Install netcat