Skip to content

Instantly share code, notes, and snippets.

@sabberworm
sabberworm / .gitattributes
Created November 27, 2016 09:07 — forked from wizardishungry/.gitattributes
Apple's .plist files have two equivalent on-disk representations, binary and xml. These snippets help keep binary crap out of your repository.
*.plist filter=xmlplist
# surprise! Quartz patches are plists, too!
*.qtz filter=xmlplist
@sabberworm
sabberworm / videojs.hls.js
Last active May 23, 2016 13:33
HLS 0.17.9
/*! videojs-contrib-hls - v0.17.9 - 2015-11-16
* Copyright (c) 2015 Brightcove; Licensed */
(function(window, videojs, document, undefined) {
'use strict';
var
// a fudge factor to apply to advertised playlist bitrates to account for
// temporary flucations in client bandwidth
bandwidthVariance = 1.1,
/*! videojs-contrib-media-sources - v2.4.0 - 2015-11-16
* Copyright (c) 2015 Brightcove; Licensed */
/**
* mux.js
*
* Copyright (c) 2014 Brightcove
* All rights reserved.
*
* A lightweight readable stream implemention that handles event dispatching.
* Objects that inherit from streams should call init in their constructors.
@sabberworm
sabberworm / DisableFuckingFlashHlsFallback.js
Last active May 23, 2016 13:34
Disable Flash-HLS Hack
if(videojs.Hls) {
videojs.Flash.isSupported = function() {
// Only support Flash if no HTML5 is available
return !videojs.Html5.isSupported();
};
videojs.Hls.isSupported = function() {
return videojs.Hls.supportsNativeHls;
};
}
@sabberworm
sabberworm / .gitignore
Last active December 31, 2023 00:05
Maloney
cache
error.log
@sabberworm
sabberworm / x
Created January 19, 2009 11:38
UnitConversion Ubiquity command (uses GNU Units)
var UnitConversion = {};
UnitConversion.convert = function(from, to, callback) {
jQuery.get('http://www.sabberworm.com/get_file/units/', {from: from, to: to}, callback);
};
UnitConversion.conversionFinished = function(data, textStatus) {
if(data.indexOf('invalid') !== -1) {
displayMessage(data);
return;