Skip to content

Instantly share code, notes, and snippets.

View AndyA's full-sized avatar

Andy Armstrong AndyA

View GitHub Profile
@AndyA
AndyA / bootstrap.pl
Created July 5, 2012 19:40
FMS Bootstrap
[
{
flags => 0,
version => 0,
bs_version => 2,
drm_data => "",
bs_flags => 0,
segment_run_tables => [
{
flags => 0,
@AndyA
AndyA / bbc-svn-million
Created November 1, 2012 15:43
BBC FM svn commit 1,000,000.
------------------------------------------------------------------------
r1000000 | **** REDACTED ****
MMMMMMMMMMMMMMMMMMMMMMMM ~MMMMMMMMMMMMMMMMMMMMMMMM NMMMMMMMMMMMMMMMMMMMMMMM7
MMMMMMIIIIIINMMMMMMMMMMM ~MMMMMMIIIIIIMMMMMMMMMMMM NMMMMMMMMMM~ ?MMMMMMMM7
MMMMMM ,MMMMMMMM ~MMMMMM ZMMMMMMMM NMMMMMM. MMMMM7
MMMMMM MMMM ZMMMMMMM ~MMMMMM MMMM MMMMMMMM NMMMMM MMMMMMM? MMMMM7
MMMMMM MMMMZ :MMMMMMM ~MMMMMM MMMM NMMMMMMM NMMMM MMMMMMMMMMMMMMMM7
MMMMMM MMM= MMMMMMMM ~MMMMMM MMM. MMMMMMMM NMMM MMMMMMMMMMMMMMMMM7
MMMMMM +MMMMMMMM ~MMMMMM ZMMMMMMMM NMMM MMMMMMMMMMMMMMMMM7
@AndyA
AndyA / emitron.pl
Created December 7, 2012 02:05
Example Emitron main program
#!/usr/bin/env perl
use strict;
use warnings;
use Emitron::App root => '/tmp/emitron';
use Emitron::Logger;
use Emitron::Tool::Encoder;
use Emitron::Tool::Packager::HLS;
@AndyA
AndyA / emitron.js
Created December 7, 2012 02:09
Sample Emitron client application
var model = new JSONTrigger({});
$(function() {
var here = new URLParser(window.location.href);
var api = here.root() + '/api';
var ev = new EV(api + '/ev/');
// Boilerplate setup: will move out of here
ev.on('test', function(ev, data) {
console.log("Got message: " + ev + ": " + data.sequence);
@AndyA
AndyA / model.json
Created December 7, 2012 02:29
Example Emitron model
{
"config" : {
"paths" : {
"tmp" : "/tmp/emitron"
},
"profiles" : {
"config" : {
"pc" : {
"dog" : "/opt/newstream/art/thespace-dog.png",
"encodes" : [
@AndyA
AndyA / gist:5515504
Last active December 16, 2015 23:39
Barnes & Noble Order Confirmation
Dear Valued Customer,
Thank you for your purchase. We want to provide an update on your order.
You should expect to receive your NOOK® Simple Touch within the next
4-5 business days. We will email you parcel tracking information when
your NOOK has shipped.
Thank you,
The NOOK Support Team
@AndyA
AndyA / gist:5515516
Last active December 16, 2015 23:39
Barnes & Noble Cancel Order
Dear Valued Customer,
You recently received an email from NOOK customer service indicating
that your NOOK Simple Touch would be shipped shortly.
We apologize for this error but your credit card was not charged as NOOK
Simple Touch is temporarily out of stock. We’re pleased to let you
know that we do have inventory of NOOK Simple Touch GlowLight and you
may place an order by visiting http://uk.nook.com/.
@AndyA
AndyA / gist:5587779
Created May 15, 2013 22:02
AAC streaming via Icecast
#!/usr/bin/env perl
use strict;
use warnings;
use Net::Icecast::Source;
my $source = Net::Icecast::Source->new(
username => 'source',
password => 'secret',
@AndyA
AndyA / gist:5599982
Created May 17, 2013 15:49
HLS encoding on Raspberry Pi
#!/bin/bash
base="/usr/share/nginx/www"
set -x
rm -rf live live.h264 "$base/live"
mkdir -p live
ln -s "$PWD/live" "$base/live"
mkfifo live.h264
@AndyA
AndyA / gist:5608821
Created May 19, 2013 20:12
Quick and dirty temporal resampling on an ffmpeg image2pipe stream. Also an example of how to use it.
/* merge.c */
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define BMP_HEADER_SIZE 14