Send emails with Symfony and Mandrill

To send emails, I use Mandrill which is a service by MailChimp. It is a very useful (and powerful) tool which provide you with a smtp server for free until 12k emails / month and a very well designed dashboard.

Price are quite cheap when you need more:

In my Symfony install, I needed to send many emails. So I discovered that a nice bundle exists (isn’t it surprising?). So here is my way to proceed: Continue reading “Send emails with Symfony and Mandrill” »

How to go further after a basic installation of FosUserBundle

In this article, I suppose you have installed FosUserBundle (in composer.json : “friendsofsymfony/user-bundle”: “dev-master”).  I also suppose that your symfony project is working (services enabled, security.yml configured, your bundle extends FOSUserBundle etc.)

Continue reading “How to go further after a basic installation of FosUserBundle” »

Quick reminder for translations with catalogs and Twig


I recently had to translate a whole part of my website. Many reasons can conduct you to this need: internationalization, easy access and modification of hard written content, replication of your business in some other sectors etc.

Here are a few tips and structure I use to increase efficiency:

Continue reading “Quick reminder for translations with catalogs and Twig” »

Useful disk commands

I rarely use disk commands that why I often forget them and spend minutes to find the right command that I already used.

Here are some of the most useful disk commands I use:

# List all existing disks
fdisk -l
# Show mounted partitions, modify them in /etc/fstab, to mount use "-all" argument
# Build a RAID 1 from 2 disks /dev/sda3 & /dev/sdb3
mdadm -C /dev/md3 --level=raid1 --raid-devices=2 /dev/sda3 /dev/sdb3
# Details about RAID /dev/md3
mdadm --detail /dev/md3
# Update mdadm.conf, delete lines before
mdadm --examine --scan >> /etc/mdadm/mdadm.conf
# Format /dev/md3 in ext4
mke2fs -t ext4 /dev/md3

Iptables, the great danger


This afternoon I worked on munin (which I won’t document because so many good website exists, GIYF). Nevertheless, iptables is a higher level of difficulty. Why is that? Because you can lock yourself out of your server. No more connection won’t be accepted, the only solution is to restart it in rescue mode… Not fun, can take a long time.

Continue reading “Iptables, the great danger” »