Skip to content

Instantly share code, notes, and snippets.

@elyssonmr
elyssonmr / log
Created January 22, 2015 17:08
last log entry
Opening config file: /etc/tsuru/tsuru.conf
Done reading config file: /etc/tsuru/tsuru.conf
Using mongodb database "tsurudb" from the server "127.0.0.1:27017".
Using hipache router "10.0.2.15.nip.io" with redis at "localhost:6379".
Using "docker" provisioner.
Cluster Storage: Unable to connect to mongodb: no reachable servers (docker:cluster:mongo-url = "127.0.0.1:27017"; docker:cluster:mongo-database = "dockercluster")
@elyssonmr
elyssonmr / Tsuru.conf
Created January 22, 2015 16:25
Tsuru.conf
listen: "0.0.0.0:8080"
host: http://10.0.2.15:8080
debug: true
admin-team: admin
database:
url: 127.0.0.1:27017
name: tsurudb
git:
@elyssonmr
elyssonmr / gist:6689242
Last active December 23, 2015 20:19
Comparador de "Googlon" do Curso Python para Zumbis. OBS: Código para Python3
class GooglonComparador:
def __init__(self, obj, *args):
self.obj = obj
self.ordem_dict = {}
for i, letra in enumerate('zmbtshjpnwlrcxkqvdgf'):
self.ordem_dict[letra] = i
# Menor que = Less than
def __lt__(self, other):
return self._comparar(self.obj, other.obj) < 0
# Maior que = Greater than