Skip to content

Instantly share code, notes, and snippets.

View jgutix's full-sized avatar

Juan Gutiérrez jgutix

  • https://ojtli.app
  • ♫ Home is wherever I'm with you ♪
View GitHub Profile
@jgutix
jgutix / gist:71cbb8a9f5946ecd57328862154e3c15
Created June 5, 2020 14:55
Mongodb textScore for Loopback 4
import {DefaultCrudRepository} from '@loopback/repository';
import {Reference, ReferenceRelations} from '../models';
import {MongoDsDataSource} from '../datasources';
import {inject} from '@loopback/core';
export class ReferenceRepository extends DefaultCrudRepository<
Reference,
typeof Reference.prototype.id,
ReferenceRelations
> {
[
{
"name": "Reticulated Giraffe",
"species": "Giraffa camelopardalis reticulata",
"description": "The reticulated giraffe (Giraffa camelopardalis reticulata), also known as the Somali giraffe, is a subspecies of giraffe native to Somalia, southern Ethiopia, and northern Kenya. Reticulated giraffes can interbreed with other giraffe subspecies in captivity or if they come into contact with populations of other subspecies in the wild. \nThe reticulated giraffe is among the most well-known of the nine giraffe subspecies. Together with the Rothschild giraffe, it is by far the giraffe most commonly seen in zoos. Its coat consists of large, polygonal, liver-colored spots outlined by a network of bright-white lines. The blocks may sometimes appear deep red and may also cover the legs. The extraordinary height of giraffes is attributed to a ritual known as \"necking\", where two males fight for reproduction rights by slamming their necks into one another. The giraffes with the tallest and
@jgutix
jgutix / sdk_forward_declarations.h
Created April 15, 2015 00:32
This is required to compile Chromium v37 in Yosemite
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file contains forward declarations for items in later SDKs than the
// default one with which Chromium is built (currently 10.6).
// If you call any function from this header, be sure to check at runtime for
// respondsToSelector: before calling these functions (else your code will crash
// on older OS X versions that chrome still supports).
#ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
#define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_