I hereby claim:
- I am neckro on github.
- I am neckro (https://keybase.io/neckro) on keybase.
- I have a public key whose fingerprint is C085 DF2B 8626 AB22 1BE5 9B68 2770 F2A3 7EF1 9C55
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
class Config { | |
public static $MusicFolder = "music"; | |
public static $MusicTypes = array("mp3", "mpeg3", "flac", "m4a", "aiff"); | |
public static $FolderImage = array("folder.jpg", "folder.png", "folder.gif"); | |
public static $AllowSymlinks = false; | |
} | |
$baseurl = explode("?", "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); |
var request = require('https').request; | |
var querystring = require('querystring'); | |
// logging | |
var format = require('util').format; | |
var log = require('util').log; | |
var _ = require('lodash'); | |
var Promise = require('bluebird'); |
// uses https://github.com/neckro/LPD8806 | |
#include "LPD8806.h" | |
#include "SPI.h" | |
// strip settings | |
const uint16_t PIXEL_LENGTH = 32; | |
// tracer settings | |
#define NUM_TRACERS 4 | |
const int16_t MIN_POSRATE = 2; |
<?php | |
/* Table schema | |
CREATE TABLE `params` ( | |
`key` varchar(255) NOT NULL DEFAULT '', | |
`value` varchar(255) NOT NULL DEFAULT '', | |
PRIMARY KEY (`key`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
*/ | |
// Settings |
<?php | |
$file = realpath(@$_GET['f']); | |
$p = pathinfo($file); | |
if (!$file || strtolower(@$p['extension']) !== 'md') { | |
http_response_code(403); | |
exit; | |
} | |
$cmd = sprintf( | |
'./md/peg-multimarkdown/multimarkdown "%s" --smart | sed "s/\–\;/\&mdash\;/g"', | |
escapeshellcmd($file) |
// State machine, for event handlers and other mischief | |
define([], function() { "use strict"; | |
/////////////////////// | |
var stateM = { | |
create: function(target, config) { | |
var instance = Object.create(stateM.proto); | |
instance.statesHash = {}; | |
instance.statesStack = []; | |
instance.begunStates = {}; | |
instance.listeners = []; |
// SVG helpers | |
define([], function() { "use strict"; | |
/////////////////////// | |
var Svg = (function(svg) { | |
svg.ns = { | |
svg: 'http://www.w3.org/2000/svg', | |
xlink: 'http://www.w3.org/1999/xlink' | |
}; | |
svg.create = function() { |
#!/usr/bin/env sh | |
IFS=$'\n' | |
export dest=$1 | |
revision=$2 | |
default_revision="HEAD~1" | |
function tar_upload() { | |
local server=${dest%:*} | |
local remote_dir=${dest#*:} | |
sed -e 's/^.*-\> //g' |\ |
/* Runs a stochastic dither animation on an 8x8 LED matrix. | |
23 December 2011 - neckro@gmail.com - No license. Do what thou wilt. | |
Requires a Maxim MAX7221 or MAX7219 LED controller. | |
Also requires LedControl library: http://www.arduino.cc/playground/Main/LedControl | |
Fills a row's array proportional to its distance from origin, | |
then applies a Fisher-Yates shuffle to randomize the order. | |
*/ | |
#include <LedControl.h> |