Skip to content

Instantly share code, notes, and snippets.

View amcorreia's full-sized avatar
🎯
Focusing

Alessandro Madruga Correia amcorreia

🎯
Focusing
  • Depressive world
View GitHub Profile
@rponte
rponte / using-uuid-as-pk.md
Last active May 2, 2024 11:01
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@dariodip
dariodip / Dockerfile
Created September 21, 2017 09:45
Cython in a Docker container
FROM python:3.6
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
RUN python setup.py build_ext --inplace
ENTRYPOINT ["python"]
CMD ["app.py"]
@apokalyptik
apokalyptik / debian-jessie-kubernetes-1.3-manual-install-guide.md
Last active November 21, 2023 12:31
Set up Kubernetes on 3 Debian Jessie virtual machines -- No magic

The Goal

Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.

We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.

The Setup

@jakub-g
jakub-g / _1_"script async defer" blocks "load" event.md
Last active August 22, 2023 10:10
Beware of "script async defer" blocking HTML "load" event

Beware of <script async defer> blocking HTML "load" event

2015.10.07 t

On the importance of simulated latency testing, and bulletproofing your page from the third-party JS load failures

TL;DR

@jacobian
jacobian / models.py
Created February 15, 2011 18:11
An example of using many-to-many "through" to augment m2m relationships. See http://www.quora.com/How-do-you-query-with-a-condition-on-a-ManyToMany-model-in-Django for context.
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Meta:
ordering = ['name']
def __unicode__(self):