Skip to content

Instantly share code, notes, and snippets.

@RLovelett
RLovelett / AVCodec.swift
Last active December 15, 2015 16:12
Allow `withUnsafePointer` to not mark `struct` function as `mutating`
extension AVCodec {
mutating func profileName(profile: Int32) -> String? {
let result = withUnsafePointer(&self) { (codecPointer) in
return av_get_profile_name(codecPointer, profile)
}
return String.fromCString(result)
}
}
@RLovelett
RLovelett / initial-tuning-data.txt
Last active November 22, 2015 19:10
Linux TV zap and MPlayer Configs
#------------------------------------------------------------------------------
# file automatically generated by w_scan
# (http://wirbel.htpc-forum.de/w_scan/index2.html)
#! <w_scan> 20141122 1 0 TERRCABLE_ATSC US </w_scan>
#------------------------------------------------------------------------------
# location and provider: <add description here>
# date (yyyy-mm-dd) : 2015-11-22
# provided by (opt) : <your name or email here>
#
# A[2] <freq> <mod> [# comment]
@RLovelett
RLovelett / README.md
Last active October 17, 2015 02:15 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@RLovelett
RLovelett / gist:6791bde80575fc412983
Created October 14, 2015 00:50 — forked from chrislavender/gist:cad26500c9655627544f
HTTP Live Streaming Tutorial

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

@RLovelett
RLovelett / run.sh
Last active August 29, 2015 14:10
Pool Predictors
#!/usr/bin/env bash
if [ -a /home/ryan/bin/weka/weka-3-7-11/weka.jar ]
then
export CLASSPATH=/home/ryan/bin/weka/weka-3-7-11/weka.jar:/home/ryan/Source/student-filters/StudentFilters.jar:.
else
export CLASSPATH=/Applications/weka-3-7-11/weka.jar:.
fi
if [ "$(uname)" == "Darwin" ]
@RLovelett
RLovelett / delete.sh
Created July 2, 2014 20:07
Delete ZFS snapshots from dataset one-liner
zfs list -r -H -t snapshot -o name stream/lxc/stash | xargs -n1 zfs destroy