Skip to content

Instantly share code, notes, and snippets.

View gabrielfalcao's full-sized avatar
👨‍💻
probably writing tests

Gabriel Falcão gabrielfalcao

👨‍💻
probably writing tests
View GitHub Profile
@gabrielfalcao
gabrielfalcao / Dockerfile
Created March 11, 2015 19:39
dynamodb-local docker image
FROM dockerfile/java
RUN /usr/bin/curl -L http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | /bin/tar xz
ENTRYPOINT ["/usr/bin/java", "-Djava.library.path=./DynamoDBLocal_lib", "-jar", "DynamoDBLocal.jar", "-port", "8967", "-inMemory"]
EXPOSE 8967
┏ ━ ━ ━ ━ ━ ━ ━ ━ ┓
Build Server
┃ ┃
┃ ◣◣◣◣◣◥◥◥◥◥ ┃──────────────┐
◉◉◉◉◉◉◉◉◉◉ │
┃ ◣◣◣◣◣◣◢◢◢◢ ┃ │
┗ ━ ━ ━ ━ ━ ━ ━ ━ ┛ │
@gabrielfalcao
gabrielfalcao / gist:5087abc4bc9d9a80b7fd
Last active August 29, 2015 14:22
jaci figlet fonts
_T /\ ( |
1row.flf
** **
// //
** ****** ***** **
/** //////** **///**/**
/** ******* /** // /**
**/** **////** /** **/**
agile==1.3.1
coloredlogs==1.0
coverage==3.7.1
curdling==0.4.0
distlib==0.1.2
Flask==0.10.1
Flask-Assets==0.10
Flask-SQLAlchemy==2.0
httpretty==0.8.10
humanfriendly==1.27
david ॐ mkvirtualenv david
New python executable in david/bin/python2.7
Also creating executable in david/bin/python
Installing setuptools, pip...done.
davidॐ make
pip install -U pip
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.0.3-py2.py3-none-any.whl#md5=6950e1d775fea7ea50af690f72589dbd
Using download cache from /var/folders/kr/rsjvm0652wx_cp5vcw9s93kh0000gn/T//pipcache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fpy2.py3%2Fp%2Fpip%2Fpip-7.0.3-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 1.5.6
davidॐ pip freeze
agile==1.3.1
coloredlogs==1.0
coverage==3.7.1
curdling==0.4.0
distlib==0.1.2
Flask==0.10.1
Flask-Assets==0.10
Flask-SQLAlchemy==2.0
httpretty==0.8.10
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from __future__ import unicode_literals
import os
import redis
conn = redis.Redis(os.environ['REDIS_HOST'])
gabriel@morena:~/Projetos/dead-parrot$ python setup.py test
running test
running egg_info
writing Dead_Parrot.egg-info/PKG-INFO
writing top-level names to Dead_Parrot.egg-info/top_level.txt
writing dependency_links to Dead_Parrot.egg-info/dependency_links.txt
reading manifest file 'Dead_Parrot.egg-info/SOURCES.txt'
writing manifest file 'Dead_Parrot.egg-info/SOURCES.txt'
running build_ext
test_relation_has_from_model_class_as_attribute (tests.test_relationships.TestForeignKey) ... ok
Traceback (most recent call last):
File "/usr/bin/pyccuracy_console", line 86, in <module>
main()
File "/usr/bin/pyccuracy_console", line 79, in main
should_throw=options.should_throw)
File "/var/lib/python-support/python2.5/pyccuracy/pyccuracy_core.py", line 182, in run_tests
results = self.context.story_runner.run_stories(self.context)
File "/var/lib/python-support/python2.5/pyccuracy/story_runner.py", line 46, in run_stories
self.__run_scenarios(current_story, context)
File "/var/lib/python-support/python2.5/pyccuracy/story_runner.py", line 65, in __run_scenarios
@gabrielfalcao
gabrielfalcao / gist:126019
Created June 8, 2009 19:53
My implementation of singleton
__SINGLETON_INSTANCES__ = {}
class Singleton(object):
def __new__(cls, *args, **kw):
key = cls.__name__, args, tuple(kw.values())
if key not in __SINGLETON_INSTANCES__.keys():
__SINGLETON_INSTANCES__[key] = super(type, cls).__new__(cls, *args, **kw)
return __SINGLETON_INSTANCES__[key]