Skip to content

Instantly share code, notes, and snippets.

@bobslaede
bobslaede / hyperion.config.json
Created February 19, 2015 20:37
hyperion.config.json
// Automatically generated configuration file for 'Hyperion daemon'
// Generated by: HyperCon (The Hyperion deamon configuration file builder
{
/// Device configuration contains the following fields:
/// * 'name' : The user friendly name of the device (only used for display purposes)
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806',
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none')
/// * 'output' : The output specification depends on selected device. This can for example be the
/// device specifier, device serial number, or the output file name
@bobslaede
bobslaede / modernizr.positionfixed.js
Created September 16, 2011 08:50
Modernizr position fixed check
;(function(Modernizr, window) {
Modernizr.addTest('positionfixed', function () {
var test = document.createElement('div'),
control = test.cloneNode(false),
fake = false,
root = document.body || (function () {
fake = true;
return document.documentElement.appendChild(document.createElement('body'));
}());
var shortUrlKey = function(salt,l,chars){
var out = '',
n = chars.length,
c,
i = 1;
while (i <= l) {
if (l > 0) {
c = ((salt / i) % n) >> 0;
out = chars[c] + out;
}