Replacing a failed RAID5 disk in debian

Posted in Linux on January 30th, 2016
So, one of the discs in your RAID has failed and has been automatically removed from the array. In my case, it’s a 3 drive RAID5 array with 3 Tb sized discs (sdb-d). The new drive should be at least of the same size of the initial drives. If it’s larger, the excess will simply not be...   Read more

Raspberry Pi wifi hotspot

Posted in Linux on April 22nd, 2015
In this tutorial you’ll learn how to setup a headless Raspberry Pi wifi hotspot. The new Raspberry Pi board can operate as a wifi hotspot with the appropiate usb wifi dongle. A sure bet is to use an Atheros based dongle, like the TP-LINK TP-WN722N I’ll be using on this tutorial. I’ll be also using the new Raspbian...   Read more

Local DNS with AsusWRT-Merlin routers

Posted in Linux on March 22nd, 2015
Running your own local DNS server is not something everybody needs, but in some scenarios it can be quite usefull. One such scenario is a home network with several wired workstations, wifi-enabled devices and some services running at a home server. Linux, OSX and Windows allow a basic and local DNS configuration via hosts files,...   Read more

Create user and database in MySQL

Posted in SQL on March 11th, 2015
PhpMyAdmin is not always available or you may not want to install it. As with any web based app, it poses an unnecessary security risk, specially in production servers. PhpMyAdmin has had a fair share of security issues and if you just need to create a user and a database for the user, it’s quite...   Read more

Loading Angular 1.x with RequireJS

Posted in Javascript on March 2nd, 2015
Although Angular has a dependency injection system for modules, controllers, directives, etc, all injectables need to be loaded before the Angular app initialization. While it’s nice to have dependency injection, Angular’s approach has two drawbacks. First, you have to manually include script tags in your markup, which can become a headache in large projects, and...   Read more

The rules of “this”

Posted in Javascript on February 10th, 2015
Most object oriented programming languages have a this mechanism which usually refers to the container object. But in JavaScript this is a dynamic runtime context used inside functions, not a reference to the function itself nor the function’s scope. What this refers to in JavaScript depends entirely on the call-site of the function and a...   Read more