Skip to content

Instantly share code, notes, and snippets.

View nullEuro's full-sized avatar

Mark Dresselhaus nullEuro

View GitHub Profile
@nullEuro
nullEuro / installation.js
Created December 6, 2014 00:49
loopback-component-push installation model access control
// ...
function checkBelongsTo(installationId, userId, cb) {
Installation.findById(installationId, function (err, inst) {
cb(err, !err && inst && inst.userId == userId);
});
}
var ERR_403 = new Error("Forbidden");
ERR_403.status = ERR_403.statusCode = 403;
@nullEuro
nullEuro / apply-equalizer.py
Last active August 29, 2015 13:57
python programm that activates or deactivates pulseaudio-equalizer based on output port (headphones or speakers)
# DEPRICATED
# new repository: https://github.com/nullEuro/apply-equalizer
@nullEuro
nullEuro / findpath.php
Created March 25, 2013 14:11
Find a random path in a pixel grid
<?php
/**
* some backtrack magic to find a random path
* */
class Point {
public $x, $y;
function __construct ($x, $y) {
$this->x = $x;