Skip to content

Instantly share code, notes, and snippets.

Device
GET /device??q={search}&{params} # Lists ALL devices OR filters by search and/or params, if present
# params: vendor, dns, name, location, ip, description
# these can hopefully be autogenerated/parsed
POST /device # Creates a device.
GET /device/{ip} # Gets Device Generic Info
GET /device/{ip}/{query}
# query is one of:
# Details
@ollyg
ollyg / index.html
Last active December 27, 2017 08:41 — forked from donaldh/index.html
force with link labels
<html>
<head>
<title>Force with Labelled Links</title>
<script src="http://mbostock.github.com/d3/d3.js?2.9.2"></script>
<style type="text/css">
.node {
fill: #88f;
stroke: #44a;
stroke-width: 1px;
}
@ollyg
ollyg / clean-pause.pl
Last active July 11, 2016 12:52 — forked from xdg/clean-pause.pl
#!/usr/bin/env perl
# This code works for dagolden, based on a program originally by rjbs. It
# might not work for you. You are hereby empowered to do anything you want
# with this code, including fixing its bugs and redistributing it with your
# own license and API and whatever you want. It'd be nice if you mentioned
# dagolden and rjbs in your fork, but if you don't want to, that's just fine.
#
# The only thing you can't do is act like there's some guarantee that this
# code will actually work or even refrain from blowing stuff up. You're on
# your own. -- rjbs, 2014-04-23 and dagolden, 2016-07-06
#!/usr/bin/perl
use warnings;
use strict;
use lib '/var/lib/netdisco';
use netdisco qw/:all/;
config("/var/lib/netdisco/netdisco.conf");