Skip to content

Instantly share code, notes, and snippets.

View gustavofonseca's full-sized avatar

Gustavo Fonseca gustavofonseca

  • São Paulo, Brazil
View GitHub Profile
# reference: https://hub.docker.com/_/ubuntu/
FROM python:3.8-slim-buster
# Adds metadata to the image as a key value pair example LABEL version="1.0"
LABEL maintainer="Rafael Novello <rafa.reis.novello@gmail.com>"
# Set environment variables
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
@gustavofonseca
gustavofonseca / memento.py
Last active December 16, 2015 08:29 — forked from fabiobatalha/memento.py
Versão mais enxuta
# coding: utf-8
import copy
class MementoMixin(object):
def __init__(self, *args, **kwargs):
self._history = []
def commit(self):
self._history.append(copy.deepcopy(vars(self)))