Skip to content

Instantly share code, notes, and snippets.

View mikaelhm's full-sized avatar

Mikael Møller mikaelhm

View GitHub Profile
@mikaelhm
mikaelhm / oenskeseddel.md
Created November 23, 2015 21:02
ønskeseddel
@mikaelhm
mikaelhm / pivot.js
Created July 24, 2014 01:19
Pivot operations from node.js
/**
* This file is a simplified version of https://github.com/nicolaskruchten/pivottable
* that does not depend on UI web components or jQuery/
*
* This makes it possible to run from node.js
*
* / Mikael
*/
var _ = require('lodash-node');
@mikaelhm
mikaelhm / mapModule.js
Created April 30, 2014 18:28
This is the output of grunt-browserify with browserify-shim for lodash
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.mapModule=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
var _ = (window._);
module.exports = _.map;
},{}]},{},[1])
(1)
});
@mikaelhm
mikaelhm / Database module interface.md
Last active January 2, 2016 13:39
Database Module Interface

Database Module Interface

find

find(query, return_obj, user_id, callback)
  • query is a js-obejct that contains the contrains on the data requested.
  • return_obj is a js-object specificaion of which data is requested, in respect to "the data schema"
  • user_id is just the users id and is used to query only the data that is within the users righs
  • callback is a javaScript function that will be call when the data is ready.
@mikaelhm
mikaelhm / Node.js development without Eclipse
Created December 2, 2013 21:44
Node.js Development without Eclipse
Node.js development without Eclipse
===================================
Currently, many Node.js developers use Eclipse with the Nodeclipse as an IDE for developing node.js applications. However, as some think that eclipse can be too bloated and it does not support all features for node.js, e.g. proper code-analysis/intelliSense does not work for javascript. Furthermore, alternatives are always good, here is a description of a development environment for node.js.
Content
-------
- Editor (for hacking javascript)
- Node Monitor (auto-restarting node.js on code changes)