Problems with Gmail in default Postfix configuration

| Comments

Recently I moved some of the sites to a new hosting. The previous server had Ubuntu 12.04 with Exim4 and I forgot how to configure them.

On a new server I installed Postfix with Ansible:

    - name: Set up Postfix to relay mail
      debconf: name=postfix
               question='{{ item.question }}'
               value='{{ item.value }}'
               vtype='{{ item.vtype }}'
      with_items:
        - { question: 'postfix/mailname', value: '{{ ansible_fqdn }}', vtype: 'string' }
        - { question: 'postfix/main_mailer_type', value: 'Internet Site', vtype: 'string' }

After that I started to receive the next delivery reports from Gmail:

Alfred Workflow to add an email from Mail.app to Todoist inbox

| Comments

There is a way to add an email to Todoist by sending it to a special address, the only thing that annoing me, that it doesn’t keep a link to the message in Mail.app.

I created a simple Alfred workflow, which takes the selected messages in Mail.app, creates a Markdown links as [email subject](message://message_id) and send it to Todoist Inbox using its API.

You can find the details about installation and usage in sneawo/mailapp-to-todoist repository.

Socket.IO in Docker Swarm

| Comments

Socket.IO requires the sticky sessions, so when it’s runned in Docker Swarm environment, the Swarm load balancer can forward the request to any node where the service is launched and there will be the 400 errors. The solution is to limit the number of nodes for Socket.IO service to one or to use another load balancer like Traefik or HAProxy.

Dump and restore commands for PostgreSQL in Docker

| Comments

Sometimes during development it’s necessary to share the db dump with colleagues. In the previous article i provided the commands for MySQL, here is the same for PostgreSQL.

DATE = $(shell date +%Y-%m-%d)
path ?= .

help: ## show this help
	@echo 'usage: make [target] ...'
	@echo ''
	@echo 'targets:'
	@egrep '^(.+)\:\ .*##\ (.+)' ${MAKEFILE_LIST} | sed 's/:.*##/#/' | column -t -c 2 -s '#'

dump: ## dump db, usage 'make dump path=/path/to/dumps'
	docker-compose exec --user postgres db pg_dumpall --clean | gzip > $(path)/project-$(DATE).sql.gz

restore: ## restore db from dump file, usage 'make restore dump=dump.sql.gz'
	docker-compose stop web
	gunzip -c $(dump) | docker exec -i --user postgres `docker-compose ps -q db` psql
	docker-compose start web

StackOverflow changes from 2013 to 2017

| Comments

Here is an update for StackOverflow statistics for the users with a reputation more than 300. The last measure was made in January 2013.

I almost stopped to answer from the beginning of 2014. At that time I had a reputation around 1600, now it’s 2630.

The number of users growed more than 3 times, but the distribution by reputation is mostly the same.

EuroPython 2017

| Comments

This year, as in previous, I missed the conference. This time I even bought the ticket, but had to return it. The refund process works well, but takes time. Fortunately, there are the live streams from all days, the only problem is to find a time to watch them.

« 2/7 »