Skip to content

Instantly share code, notes, and snippets.

View jlopezr's full-sized avatar

Juan López Rubio jlopezr

View GitHub Profile
@jlopezr
jlopezr / generic-controller-example.ts
Created March 28, 2020 20:59
Example of a generic controller in TS
const message: string = 'hello world';
console.log(message);
class Person {
public name!: string;
public surname!: string;
public say() { console.log("person");}
}
class Car {
@jlopezr
jlopezr / recipes.js
Created July 3, 2014 11:34
Two level model for formage
var mongoose = require('mongoose'),
Types = mongoose.Schema.Types;
var Level2 = {
name : { type: String }
};
var Level1 = {
name : { type: String },
items : [ Level2 ]
@jlopezr
jlopezr / 0001-Making-scala-happy.patch
Created July 5, 2013 23:18
Patch for swagger-play
From 729edf3cceeb6284e48246aa680faac02f9b7fd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20L=C3=B3pez=20Rubio?= <j.lopez.r@gmail.com>
Date: Fri, 5 Jul 2013 18:40:33 -0400
Subject: [PATCH] Making scala happy
---
modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala | 3 ++-
modules/swagger-play/src/play/modules/swagger/HelpApi.scala | 4 ++--
modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
#include <czmq.h>
#include <assert.h>
int main() {
zctx_t* ctx = zctx_new();
void *client = zsocket_new (ctx, ZMQ_PAIR);
assert(client);
zsocket_destroy(ctx, &client);