Skip to content

Instantly share code, notes, and snippets.

:atom:
Data & Mathematics lover.

Leonardo Rifeli leonardorifeli

:atom:
Data & Mathematics lover.
View GitHub Profile
@leonardorifeli
leonardorifeli / People.php
Last active Sep 22, 2017
Working with annotations using the doctrine annotation reader
View People.php
<?php
/**
* @PeopleAnnotation(description="Get all information about a people", type="class")
*/
class People {
/**
* @PeopleAnnotation(description="Use to people name", type="attribute")
*/
@leonardorifeli
leonardorifeli / tagcloud.sh
Created Jan 17, 2016 — forked from karmi/tagcloud.sh
Simple tag cloud with ElasticSearch `terms` facet
View tagcloud.sh
# (Re)create the index
curl -X DELETE "http://localhost:9200/tagcloud"
curl -X PUT "http://localhost:9200/tagcloud"-d '{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
}
}'
@leonardorifeli
leonardorifeli / generator.php
Created Oct 15, 2015 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
View generator.php
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();
View gitcowsay.sh
git config --global alias.cowsay '!git commit -m "`fortune | cowsay -f tux`"'
@leonardorifeli
leonardorifeli / Users.class.php
Created Jun 21, 2014
88bit - Classe de usuários
View Users.class.php
<?php
class Users extends DataBase {
public $id;
public $email;
public $birthDate;
public $fullName;
public $city;
public $state;
You can’t perform that action at this time.