Skip to content

Instantly share code, notes, and snippets.

View moonglum's full-sized avatar

Lucas Dohmen moonglum

View GitHub Profile

Lucas Dohmen

Contact details

Speaker bio

I’m a member of the core team of the NoSQL database project ArangoDB where I work on the graph functionality, tools for the Ruby community to use the database and Foxx. Furthermore I contribute to various open source projects like hacken.in (an event calender for nerds in my hometown written in Rails) and projects related to ArangoDB. You can find me listening or speaking at our local usergroups for Ruby, JavaScript, NoSQL and (as a coach for) Rails Girls and Coder Dojo.

@moonglum
moonglum / log.txt
Created May 12, 2014 22:21
Log Output from `vagrant up` after `vagrant destroy` in Hacken.in
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: hcking_default_1399932017650_56132
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
@moonglum
moonglum / graph.js
Created November 25, 2014 09:37
Short demonstration of using prefixed collections when using graph stuff in Foxx
var relationName = applicationContext.collectionName("containsX");
var vertexCollectionName = applicationContext.collectionName("X");
var graph_module = require("org/arangodb/general-graph");
var sampleGraph = graph_module._graph("sampleGraph");
var contactSpaceGraph = graph_module._graph("sampleGraph");
var vertex = contactSpaceGraph._getVertexCollectionByName(vertexCollectionName);
var edge = contactSpaceGraph._getEdgeCollectionByName(relationName);
var Foxx = require("org/arangodb/foxx");
var controller = new Foxx.Controller(applicationContext);
@moonglum
moonglum / books.js
Created December 8, 2014 14:33
Foxx Example App from the Blog Series on the ArangoDB Blog.
/*jslint indent: 2, nomen: true, maxlen: 100 */
/*global require, applicationContext, Joi */
(function () {
'use strict';
var FoxxGenerator = require('foxx_generator').Generator,
Joi = require('joi'),
generator;
generator = new FoxxGenerator('books', {

Keybase proof

I hereby claim:

  • I am moonglum on github.
  • I am moonglum (https://keybase.io/moonglum) on keybase.
  • I have a public key whose fingerprint is 1EEF 0573 E355 33E8 1722 042F E203 C1DA 52DA 2D13

To claim this, I am signing this object:

@moonglum
moonglum / static.ru
Created March 29, 2011 10:35
Serve static files
root=Dir.pwd
puts ">>> Serving: #{root}"
run Rack::Directory.new("#{root}")

magic-warden ideas

This Document is based on a document by Tobias Eilert, creator and maintainer of magic-warden

Setup

First, you need to install magic-warden.

gem install magic-warden
@moonglum
moonglum / fixtures_vs_factories.mdown
Created June 24, 2011 09:42
Fixtures vs. Factories from Ruby Rogues June, 24. 2011

Aaron Patterson:

  • Fixtures are faster than Factories (generated data is cached)
  • I don't know... I like them... ;)

Peter Cooper

  • DHH uses Fixtures, they must be good ;)
  • I used Fixtures on old projects, but they are not for me now
@moonglum
moonglum / .gitignore
Created July 6, 2011 14:56
This is a simple nested SVG Zoom and Pan Demo. Icons from Raphael.js
.DS_Store
@moonglum
moonglum / program.rb
Created December 13, 2011 10:58
MiniTest Expectation for Output of a codeblock. Captures everything that goes to stdout and lets you assert what it should be. Includes Expectation Syntax and a little Input helper.
def greet_world
puts "Hello World"
end
def greet_user
username = gets
puts "Hello #{username}"
end