Skip to content

Instantly share code, notes, and snippets.

View softwarerero's full-sized avatar

Stefan Undorf softwarerero

  • Paraguay
View GitHub Profile
@softwarerero
softwarerero / server.js
Last active January 28, 2016 04:25
Trying to use elasticsearch from a koa app
var app, distDir, elClient, koa, path, router, send;
path = require('path');
send = require('koa-send');
router = require('koa-router')();
koa = require('koa');
@softwarerero
softwarerero / gist:9324827
Created March 3, 2014 13:23
Calculate the distance between 2 points in km
class Geo
@radiusInMiles: 3956.0
@radiusInKilometers: 6367.0
@toRadian: (v) ->
v * (Math.PI / 180)
@diffRadian: (v1, v2) ->
@toRadian(v2) - @toRadian(v1)
@softwarerero
softwarerero / autoform02.html
Created December 9, 2013 15:13
Meteor Autoform - No update, no callback called.
<head>
<title>autoform02</title>
</head>
<body>
{{> consulta}}
</body>
<template name="consulta">
<p>The value ruc is never updated in the db. None of the callback on autoforms is called.</p>
@softwarerero
softwarerero / autoform.html
Last active December 30, 2015 14:09
Meteor Autoform not bound to Collection2 object
<head>
<title>autoform01</title>
</head>
<body>
{{> consulta}}
</body>
<template name="consulta">
<p>If the form is commented out the value of consulta.ruc is displayed.</p>
@softwarerero
softwarerero / Server.groovy
Last active December 19, 2015 05:49
Trying to connect to MySQL from vert.x 2.0.0-CR2-SNAPSHOT.
package de.suncom.cc.mdc
import groovy.sql.Sql
import org.vertx.groovy.platform.Verticle
class Server extends Verticle {
def config = [ address : 'test',
driver : 'com.mysql.jdbc.Driver',