Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Buckman benbuckman

View GitHub Profile
View ds214-ipkg-install
# How to install `ipkg` on a Synology DS214
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) for the DS214 too.
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.
## Guide
@drupol
drupol / distance.js
Created Jan 31, 2012
Reducing coordinate density in KML files. Original script by Ben Buckman.
View distance.js
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* Simple node js module to get distance between two coordinates. */
/* */
/* Code transformed from Chris Veness example code - please refer to his website for licensing */
/* questions. */
/* */
/* */
/* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2011 */
/* - www.movable-type.co.uk/scripts/latlong.html */
@kmpm
kmpm / map_reduce_stddev.js
Created Sep 12, 2011 — forked from dmitryame/Calculate standard deviation in mongo
mongo db Standard deviation calculation with map reduce using the Welford algoritm.
View map_reduce_stddev.js
/*
* (The MIT License)
*
* Copyright (c) 2011 Peter Magnusson <kmpm@birchroad.net>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
@pguillory
pguillory / gist:729616
Created Dec 5, 2010
Hooking into Node.js stdout
View gist:729616
var util = require('util')
function hook_stdout(callback) {
var old_write = process.stdout.write
process.stdout.write = (function(write) {
return function(string, encoding, fd) {
write.apply(process.stdout, arguments)
callback(string, encoding, fd)
}