Skip to content

Instantly share code, notes, and snippets.

View jessecogollo's full-sized avatar
💭
#IamLibertarian

Jesse cogollo jessecogollo

💭
#IamLibertarian
View GitHub Profile
@jessecogollo
jessecogollo / index2djessecogollo
Last active August 29, 2015 14:03
Comandos para realizar consultas a campos con index 2d - 2dsphere en mongodb
db.nombrecoleccion.find({“campo”:{$near:[longitud,latitud],$maxDistance:distancia}})
db.nombrecoleccion.find({nombrecampo:{$geoWithin:{“$operador”:”coordenada”}}})
db.nombrecoleccion.find({nombrecampo:{$geoIntersects:{$geometry:{type:”GeoJSON”,coordinates:[longitud,latitud]}}}})
@jessecogollo
jessecogollo / index.html
Last active August 29, 2015 14:14
index.html (Proyecto base aurelia.io)
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="jspm_packages/github/twbs/bootstrap@3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="jspm_packages/npm/font-awesome@4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="styles/styles.css">
</head>
<body aurelia-app>
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
@jessecogollo
jessecogollo / welcome.js
Last active August 29, 2015 14:14
welcome.js (Proyecto base aurelia.io) Antes app.js
export class Welcome{
constructor(){
this.heading = 'Welcome to the Aurelia Navigation App!';
this.firstName = 'John';
this.lastName = 'Doe';
}
get fullName(){
return `${this.firstName} ${this.lastName}`;
}
@jessecogollo
jessecogollo / welcome.html
Last active August 29, 2015 14:14
welcome.html (Proyecto base aurelia.io) Antes app.html
<template>
<section>
<h2>${heading}</h2>
<form role="form" submit.delegate="welcome()">
<div class="form-group">
<label for="fn">First Name</label>
<input type="text" value.bind="firstName" class="form-control" id="fn" placeholder="first name">
</div>
<div class="form-group">
@jessecogollo
jessecogollo / app.js
Last active August 29, 2015 14:14
app.js router (Proyecto base aurelia.io)
import {Router} from 'aurelia-router';
export class App {
static inject() { return [Router]; }
constructor(router) {
this.router = router;
this.router.configure(config => {
config.title = 'Aurelia';
config.map([
{ route: ['','welcome'], moduleId: 'welcome', nav: true, title:'Welcome' },
@jessecogollo
jessecogollo / app.html
Created February 6, 2015 05:21
app.html router (Proyecto base aurelia.io)
<template>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="#">
<i class="fa fa-home"></i>
<span>${router.title}</span>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
@jessecogollo
jessecogollo / flickr.js
Created February 9, 2015 03:55
flickr.js (Proyecto base aurelia.io)
import {HttpClient} from 'aurelia-http-client';
var url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json';
export class Flickr{
static inject() { return [HttpClient]; }
constructor(http){
this.heading = 'Flickr';
this.images = [];
this.http = http;
@jessecogollo
jessecogollo / flickr.html
Created February 9, 2015 03:56
flickr.html (Proyecto base aurelia.io)
<template>
<section>
<h2>${heading}</h2>
<div class="row">
<div class="col-sm-6 col-md-3" repeat.for="image of images">
<a class="thumbnail">
<img style="width: 260px; height: 180px;" src.bind="image.media.m"/>
</a>
</div>
</div>
@jessecogollo
jessecogollo / app.html
Created February 11, 2015 04:51
app.html router (Proyecto base aurelia.io) Update
<template>
<import from='./nav-bar'></import>
<nav-bar router.bind="router"></nav-bar>
<div class="page-host">
<router-view></router-view>
</div>
</template>
@jessecogollo
jessecogollo / nav-bar.js
Created February 11, 2015 05:00
nav-bar.js (Proyecto base aurelia.io)
import {Behavior} from 'aurelia-framework';
export class NavBar {
static metadata(){ return Behavior.withProperty('router'); }
}