Install Mailparse extension on PHP 7.0 + Apache + Vagrant (Ubuntu)

1. SSH into your server (Vagrant, Whatever)

vagrant ssh

# or

ssh [email protected]

2. Follow the following instruction:

cd /tmp

apt-get install php7.0-dev

pecl download mailparse

tar xvzf mailparse-3.0.2.tgz

cd mailparse-3.0.2



sed -i \
  's/^\(#error .* the mbstring extension!\)/\/\/\1/' \


make install
echo "" > \

service php7.0-fpm reload
echo "" > \ /etc/php/7.0/mods-available/mailparse.ini 
ln -s /etc/php/7.0/mods-available/mailparse.ini /etc/php/7.0/cli/conf.d/30-mailparse.ini 
ln -s /etc/php/7.0/mods-available/mailparse.ini /etc/php/7.0/cli/conf.d/30-mailparse.ini


Although I ended up adding manually (last step) maybe this can be a future reference for myself or any other developer.


First Ph.D. proposal

I just wrote my very first Ph.D. proposal. It’s about making a new UI that corresponds to user personality and preferences by not just looking at his/her profile but by scraping all available data from him/her all over the web. I think the final result can be super exciting and useful.
Imagine a UI that understand you are at work and hide some games and application from your phone. Or on a website that assumes you are on you’re studying and not disrupt your focusing time (for example, Twitter not suggesting meme on that particular time). Or a website that from the moment you entered, for example, your email, understand that you prefer a cozy dark theme over a comfortable, light theme.
Moreover, think about Netflix or PlayStation Store where if they could understand that I am on my off day and they can offer their new release or suggest to continue watching or playing.
All of the above can be obtained with lots of available public data. Still, a system to aggregate all data with privacy in mind and let each user remove/add preference can be a considerable improvement to user experience.


Certbot + Cloudflare

1. Install Certbot

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-apache


2. Make cloudflare.ini

Get your API key from:

# In ~/cloudflare.ini
# Cloudflare API credentials used by Certbot
dns_cloudflare_email = [email protected]
dns_cloudflare_api_key = 0123456789abcdef0123456789abcdef01234567

Secure cloudflare.ini file:

chmod 600 cloudflare.ini


3. Install Cloudflare plugin

sudo apt-get install certbot python3-certbot-dns-cloudflare


4. Activate SSL

Change and to your domains:

certbot certonly \
  --dns-cloudflare \
  --dns-cloudflare-credentials ~/cloudflare.ini \
  -d \