Skip to content

Instantly share code, notes, and snippets.

View gkatsanos's full-sized avatar

George Katsanos gkatsanos

View GitHub Profile
@gkatsanos
gkatsanos / -
Created November 23, 2014 15:15
/**
* List of Messages
*/
var myCoords = [[[ 4.32, 50.84 ], [ 4.01, 50.1 ], [ 4.12, 50.84 ], [ 4.52, 51.84 ]]];
exports.list = function(req, res) { Message.find().where('location').within().geometry({ type: 'Polygon', coordinates: myCoords }).sort('-created').populate('user', 'displayName').exec(function(err, messages) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
@gkatsanos
gkatsanos / -
Created November 23, 2014 15:49
> db.messages.find().pretty();
{
"user" : ObjectId("544d08916e1b7a2e1619a13b"),
"_id" : ObjectId("5471febd49d9d4ce29482cb5"),
"created" : ISODate("2014-11-23T15:35:25.930Z"),
"location" : {
"lng" : 4.3515499,
"lat" : 50.842750099999996
},
"body" : "dsfdgfggf",
@gkatsanos
gkatsanos / -
Created November 23, 2014 16:05
var MessageSchema = new Schema({
body: {
type: String,
default: '',
trim: true
},
location: {
lng: {
type: Number
},
@gkatsanos
gkatsanos / post.phtml
Created August 22, 2016 09:43
post.phtml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="34px" height="25px" viewBox="0 0 34 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
<title>DD651E25-235D-41C6-9389-9F3CC582E451</title>
<desc>Created with sketchtool.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="5.2-IDNow-PostIdents" transform="translate(-803.000000, -297.000000)" fill="#bbbbbb">
<g id="PostID-BTN" transform="translate(690.000000, 274.000000)">
<g id="Page-1" transform="translate(113.000000, 23.000000)">
@gkatsanos
gkatsanos / _tabs.scss
Created August 22, 2016 09:59
_tabs.scss
.panel-tabs {
height: 400px;
}
.nav-tabs {
border: 0;
display: flex;
> li {
flex: 1;
@gkatsanos
gkatsanos / .gitignore_global
Created August 22, 2016 11:07
.gitignore_global
✘-1 ~/Development/rocket-internet/INTFIX [feature/INTFIX-51-identification-webcam|⚑ 2]
13:06 $ cat ~/.gitignore_global
.idea/*
.project
.buildpath
nbproject
*.zfproject.xml
.metadata
.idea
.tags
<?php
/**
* @author Rocket Internet SE
* @copyright Copyright (c) 2015 Rocket Internet SE, Johannisstraße 20, 10117 Berlin, http://www.rocket-internet.de
*/
namespace Intfix\Module\Frontend\Form;
use Common\Form\Validator\InclusionKey;
use Intfix\Common\BankAccount\Entity\BankAccountApplication;
use Intfix\Common\Form\AddressFormTrait;
public getDetailedInfo(card): Observable<Card> {
return this.http.get(`${this.privateUrl}${card.name}`)
.map(this.extractData)
.publishReplay(1)
.refCount();
}
private extractData(res: Response) {
let body = res.json();
return new Card(body.data.name, body.data.card_type, body.data.text);
onSelect(card: Card): void {
this.getDetailedInfo(card);
}
getDetailedInfo(card) {
this.cardService
.getDetailedInfo(card)
.subscribe((card: Card) => {
this.card = this.selectedCard = card;
$ npm install bootstrap-sass