Debian apt-pinning (Dotdeb, MariaDB, MongoDB, …)

Short post, I’d like to share my source lists for Debian 7.6, including apt-pinning for MariaDB / MySQL. It also includes all Packages from Dotdeb (Zabix, Redis, PHP, …).

Apt-pinning preference file for MariaDB / MySQL: /etc/apt/preferences.d/mariadb

node.js mysql close aborted connections

When using node.js with node-mysql, you may get aborted mysql connections when stopping the app by CTRL+C or otherwise.

This is because the mysql connection idles, and you have to implement a function to quit the connection for mysql not showing it as aborted. This event is triggered when a SIGINT signal is sent…

PHP elephant

Proper and easy use of MySQLi with PHP

I’d like to demonstrate how fetching data with mysqli works. What really got improved compared to mysql_ functions in mysqli or PDO is the variable binding. To bind variables, check this sample from my answer on