Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Popravka popravich

View GitHub Profile
View pypy_list_pop.py
# $ python --version
#Python 3.5.3 (a39af0be3a22, Jun 05 2017, 20:18:00)
#[PyPy 5.8.0-beta0 with GCC 6.2.0 20160901]
#
# The problem has been discovered here:
# https://travis-ci.org/aio-libs/aioredis/jobs/245293341
#
# TL;DR:
# pop() call from a list object created in C-extension
# returns None for the first call,
@popravich
popravich / Vagrantfile
Last active May 19, 2016
vagga + ubuntu16.04 with kernel 4.6
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
$script = <<SCRIPT
echo "deb [trusted=true] http://ubuntu.zerogw.com vagga-testing main" | sudo tee /etc/apt/sources.list.d/vagga.list
@popravich
popravich / README.rst
Last active Nov 20, 2015
Injections extension for propagating deps into standalone functions
View README.rst

Dependency injections function decorator

Small extension for injections library.

Main idea for this kind of injections is to get rid from something like this:

@popravich
popravich / PostgreSQL_index_naming.rst
Last active May 9, 2022
PostgreSQL index naming convention to remember
View PostgreSQL_index_naming.rst

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;