This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.toRad = function() { // convert degrees to radians | |
return this * Math.PI / 180; | |
}; | |
var relativeHeading = function(obj) { | |
if(typeof obj !== 'object') { | |
return false; | |
} else { | |
return Math.atan2((Math.sin(obj.lon2-obj.lon1) * Math.cos(obj.lat2)), (Math.cos(obj.lat1) * Math.sin(obj.lat2) - Math.sin(obj.lat1) * Math.cos(obj.lat2) * Math.cos(obj.lon2-obj.lon1))) % (2 * Math.PI); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install -v cherokee | |
==> Downloading http://www.cherokee-project.com/download/1.2/1.2.101/cherokee-1.2.101.tar.gz | |
Already downloaded: /Users/fabdrol/Library/Caches/Homebrew/cherokee-1.2.101.tar.gz | |
/usr/bin/tar xf /Users/fabdrol/Library/Caches/Homebrew/cherokee-1.2.101.tar.gz | |
==> ./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 | |
./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 | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... ./install-sh -c -d | |
checking for gawk... no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew --config | |
HOMEBREW_VERSION: 0.9 | |
HEAD: 6be084295c0968348339a10a924be3666d5e7321 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: dual-core 64-bit penryn | |
OS X: 10.7.3 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew doctor | |
Your system is raring to brew. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** REQUIREMENTS **/ | |
var Step = require('step') | |
, Messenger = require('./lib/messenger') | |
, messenger = new Messenger() | |
, util = require('util') | |
, models = require('./models') | |
, queue = require('./queue') | |
; | |
var total = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vessels": { | |
"vessels.urn:mrn:imo:mmsi:230099999": { | |
"navigation": { | |
"course": { | |
"trackMode": "RhumbLine", | |
"crossTrackError": { | |
"value": -8.67, | |
"timestamp": "(...)", |
OlderNewer