Skip to content

Instantly share code, notes, and snippets.

View fabdrol's full-sized avatar

Fabian Tollenaar fabdrol

View GitHub Profile
@fabdrol
fabdrol / paths.json
Created July 1, 2016 17:06
Signal K paths
[
"/resources",
"/resources/charts",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/chartFormat",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/chartUrl",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/description",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/geohash",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/identifier",
"/resources/charts/(^[A-Za-z0-9_-]{8,}$)/name",
@fabdrol
fabdrol / example-4.json
Created April 26, 2016 07:40
Example showing the use of separate keys for greatCircle and Rhumbline, without implicit default
{
"vessels": {
"vessels.urn:mrn:imo:mmsi:230099999": {
"navigation": {
"course": {
"crossTrackError": {
"value": -8.67,
"timestamp": "(...)",
"$source": "(...)"
@fabdrol
fabdrol / example-3.json
Created April 26, 2016 07:39
Example showing greatCircle data as separate keys, with rhumbline as implicit default
{
"vessels": {
"vessels.urn:mrn:imo:mmsi:230099999": {
"navigation": {
"course": {
"crossTrackError": {
"value": -8.67,
"timestamp": "(...)",
"$source": "(...)"
@fabdrol
fabdrol / example-2.json
Created April 26, 2016 07:36
This example shows the use of an object containing the GreatCircle data
{
"vessels": {
"vessels.urn:mrn:imo:mmsi:230099999": {
"navigation": {
"course": {
"crossTrackError": {
"value": -8.67,
"timestamp": "(...)",
"$source": "(...)"
},
@fabdrol
fabdrol / example.json
Last active April 26, 2016 07:35
Full example, referencing routes/waypoints in resources
{
"vessels": {
"vessels.urn:mrn:imo:mmsi:230099999": {
"navigation": {
"course": {
"trackMode": "RhumbLine",
"crossTrackError": {
"value": -8.67,
"timestamp": "(...)",
@fabdrol
fabdrol / mongobackup.sh
Created February 15, 2016 20:35
Daily Mongodb backup (all databses) to S3 using AWS CLI
#!/bin/bash
# Lock DB
mongo admin --eval "printjson(db.fsyncLock())"
MONGO_DUMP="/usr/bin/mongodump"
MONGO_HOST="localhost"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
@fabdrol
fabdrol / output.log
Created May 12, 2012 21:43
Weird unexpected output
Error: HTTP Error: 404
at ClientRequest.<anonymous> (/Users/fabdrol/Desktop/Projects/Zwoeger/Zwoeger/node_modules/http-get/lib/http-get.js:493:16)
at ClientRequest.emit (events.js:67:17)
at HTTPParser.onIncoming (http.js:1261:11)
at HTTPParser.onHeadersComplete (http.js:102:31)
at Socket.ondata (http.js:1150:24)
at TCP.onread (net.js:374:27)
Error: HTTP Error: 404
at ClientRequest.<anonymous> (/Users/fabdrol/Desktop/Projects/Zwoeger/Zwoeger/node_modules/http-get/lib/http-get.js:493:16)
at ClientRequest.emit (events.js:67:17)
@fabdrol
fabdrol / download.js
Created May 12, 2012 21:42
Download worker
/** REQUIREMENTS **/
var Kue = require('kue')
, Http = require('http-get')
, Messenger = require('../lib/messenger')
, parse = require('../lib/parser')
, models = require('../models')
;
/** APP VARS **/
var jobs = Kue.createQueue()
@fabdrol
fabdrol / app.js
Created May 12, 2012 21:41
App.js,
/** REQUIREMENTS **/
var Step = require('step')
, Messenger = require('./lib/messenger')
, messenger = new Messenger()
, util = require('util')
, models = require('./models')
, queue = require('./queue')
;
var total = 0
@fabdrol
fabdrol / configure-log
Created May 6, 2012 11:51
configure log output
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cherokee configure '1.2.101', which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cherokee/1.2.101 --sysconfdir=/usr/local/etc --localstatedir=/usr/local/var/cherokee --with-wwwuser=fabdrol --with-wwwgroup=www --enable-internal-pcre
## --------- ##
## Platform. ##