Skip to content

Instantly share code, notes, and snippets.

@AdamCanady
AdamCanady / bst.py
Last active August 29, 2015 14:09
Quick Python BST
class Node(object):
def __init__(self,value):
self.value = value
self.right = None
self.left = None
def add(self, x):
if x.value == self.value: return "Value already in tree"
elif x.value < self.value:
'use strict';
module.exports = function(app) {
return function(req, res, next) {
app.service('things').Model.aggregate([{
$match: {}
}, {
$project: {
year: {
$year: '$createdAt'
[["synth",0,-99,1518496203735.999],["synth",-14,-0.2,1518496203736],["hat1",1,-0.6,1518496203736],["hat2",1,-0.6,1518496203736.1536],["hat2",1,-0.6,1518496203736.307],["hat1",1,-0.6,1518496203736.4614],["hat1",1,-0.6,1518496203736.6924],["hat1",1,-0.6,1518496203736.923],["hat1",1,-0.6,1518496203737.1538],["hat1",1,-0.6,1518496203737.3845],["hat1",1,-0.6,1518496203737.6155],["hat1",1,-0.6,1518496203737.8462],["hat1",1,-0.6,1518496203738.077],["hat1",1,-0.6,1518496203738.3076],["hat1",1,-0.6,1518496203738.5386],["hat1",1,-0.6,1518496203738.7693],["hat1",1,-0.6,1518496203739],["hat1",1,-0.6,1518496203739.2307],["hat1",1,-0.6,1518496203739.4614],["synth",0,-99,1518496203739.6914],["synth",-14,-0.2,1518496203739.6924],["bass",0,-99,1518496203739.6914],["bass",-2,-0.2,1518496203739.6924],["bass",0,-99,1518496203742.922],["bass",0,-0.2,1518496203742.923],["hat1",1,-0.6,1518496203739.6924],["hat2",1,-0.6,1518496203739.846],["hat2",1,-0.6,1518496203739.9993],["hat1",1,-0.6,1518496203740.1538],["hat1",1,-0.6,1518496203
@AdamCanady
AdamCanady / Dockerfile
Created May 3, 2018 05:22
report catcher
FROM node:8-alpine
COPY . /var/app
WORKDIR /var/app
VOLUME /var/app/report
CMD ["node", "index.js"]