Duplicate Email Finder

After importing all my emails from Gmail to my self-hosted IMAP Server (a post about it will follow) with Thunderbird, I’ve noticed that many emails were duplicate.

I’ve searched a bit and I found out that the IMAP implementation of Gmail has the emails catalogued for every label in the respective directory.

As you can imagine every email that had more than one label was copied twice in my IMAP server.

I’ve tried to delete all duplicate messages using the Remove Duplicate Messages Thunderbird add-on, but it didn’t remove all duplicate emails.

I found two identical emails and compared them using a diff tool and the only thing that has different were some headers.

That’s why I decided to build a CLI tool to remove all duplicate emails from the Maildir directory and I built it in PHP, because I’ve more experience in this language.

The project is hosted in GitLab, as I wanted automated testing and GitLab’s CI/CD seems quite easy.

-> You can find it here <-.

There are some features I want to implement, but it worked fine and I managed to delete more than 1000 emails!

Installing Sass on Ubuntu 14.04

Like every web developer I wanted to install Sass on my old Ubuntu 14.04.

When trying to install Sass I got errors, first because I didn’t have a ruby-dev version installed, and then because the ruby version was older than 2.0

So with a little help of this StackOverflow post

$ sudo apt-add-repository ppa:brightbox/ruby-ng
$ sudo apt-get update
$ sudo apt-get install ruby2.4
$ sudo apt-get install ruby2.4-dev

$ ruby -v                         
$ ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux-gnu]

$ sudo gem install sass
$ sass -v
$ Sass 3.5.5 (Bleeding Edge)

[fixed] SQL Server Management Studio – Unrecognized configuration section system.serviceModel

If you get the error Unrecognized configuration section system.serviceModel then probably the configuration file of .Net Framework 2 “machine.config” is corrupt.

The Solution

Replace the “machine.config” file with one from another computer, or download the file I’ve attached. The “machine.config” file is located at “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG”.

That’s all!

How You can Write Quicker and Better PHP Applications

A web developer who is developing applications in Php & MySql spends the most of his time developing functions and libraries to support his applications. You should not reinvent the wheel, because that takes time and time as we know means money. Your project will have a deadline far more than expected and your boss or employer will be angry.

Continue reading How You can Write Quicker and Better PHP Applications