Wednesday, December 31, 2014

Linux Docker containers - LAMP for web development

This is a straight forward guide for configuring Docker to have a Debian LAMP workstation:
This guide should work on any Debian-based distro.
Please read carefully the entire post if you are new to docker.

Install docker: sudo apt-get install docker 
Download debian Docker image: sudo docker pull debian 
Run root shell inside container: sudo docker run -i -t debian /bin/bash
Now you're inside the Debian image, execute the following commands:
apt-get update && apt-get install apache2
apt-get install mysql-server mysql-client
apt-get install php5 php5-mysql libapache2-mod-php5
apt-get install openssh-server
apt-get install vim
# I'm used to vim, you can omit this step
apt-get install git # I use git for version control. You can install subversion or omit this step
# Now let's autostart the services
echo service ssh start >> /etc/bash.bashrc
echo service mysql start >> /etc/bash.bashrc
echo service apache2 start >> /etc/bash.bashrc
# Back to your host

Now you can commit your changes to the image
Get container id: sudo docker ps -a
Commit the changes: sudo docker commit <id> <descr> # Replace <id> with the container id from previous step and <descr> with description of image.
Get image name: sudo docker images
Assign port forwarding for apache and ssh (replace port numbers as you see fit): sudo docker run -i -t -p 800:80 -p 2222:22 <image_name> /bin/bash
Commit again: sudo docker commit <id> <descr> 

That's it, to start the container again you need it's id (that can be obtained with the command "sudo docker ps -a")
sudo docker start <container id>
sudo docker attach <container id>

I use this one liner:
id=<container id>; sudo docker start $id && sudo docker attach $id

You don't necessarily need to attach to the container, but if you are going to commit changes and edit files in the container you'll need to.

It's important to note that "docker run" creates a new image without uncommitted changes. What you want to use most of the times is start & attach.

To access it's webserver, on a browser type "localhost:800", to log in via ssh on host/ip type localhost and use port 2222. This way you don't need to setup a static ip on the container, and if you're working alone it's the most convenient way to do it. You'll need to create a user for ssh login.

I made an alias of that one liner to start docker, so the development environment is up in the time it takes me to type a single word.

Thursday, December 11, 2014

Dual LM386 guitar power amplifier

This is a simple modification to the Dual Power King amplifier from
What's funny is that I have a motorboating sound from an LM380 amplifier and decide to build this dual power king and I ended up with the same problem. "Motorboating", oscilating.
That happens when you don't have a bypass capacitor between power and ground. So this one cap modification turns this dual power king into a usable amp.

With a tonemender as a preamp sounds really goood.

Monday, December 8, 2014

Analogue Drums BlackSmith drumkit in Hydrogen - Linux

Here's a script I've made that converts your BlackSmith Samples directory from this:

to this:

It categorize the samples in micking and round robin, so it's easier to import them from hydrogen.
That is, it adds the closemic, kicksubmic, overheadmic, roommic, smashmic and snarebottom, and inside those directories it adds folders for each round robin samples.

WARNING: Make sure you have a backup of the samples prior to execute this script. I'm not responsible if you loose your samples. This script is distributed without warranties.

The script can be customized to adapt to other Analogue drums kits. You can download it from here

You need to unzip the BlackSmith zip that Analogue drums provides you when you purchase the drum kit and change dir to BlackSmith/Samples from a terminal window, then copy this script to that directory and execute it. That's it. Now you can import the samples from Hydrogen in an easier way.

I'll see if I can make an scriptable Hydrogen drumkit generator for this drumkit. If not, a tutorial on how to do it will follow.

This post is really shallow, I'll make another one explaining the directory structure and how to pick the right sounds in instrument layers on Hydrogen.

Thursday, November 20, 2014

Things to know about the Line6 DL4 looper

Line6 DL4 it's an amazing pedal, the delay sounds and even the modulation effect is amazing, but if you are thinking of buying it mainly because of it's looper functionality then you need to know the following things that no one seems to mention:
  • Loop mode it's not true bypass and you'll hear your tone a little darker in this mode.
  • You can't use the delay modelers while on Looper mode, you can only use an echo provided with a few parameters to configure that you can't activate or deactivate with your feet.
  • You can't access looper mode while on stomp mode with your feet without modifications to the unit.
  • Your loops are not stored. If you go to stomp mode or you turn off the device your loops are lost for ever.

If you're cool with that you won't regret of getting this pedal.

Monday, November 17, 2014

Paramore Moving on - cover

This cover was played and recorded in one take with an android phone. Some eq. and reverb was added in Ardour DAW.

Not bad for the small amount of time invested.


Sunday, November 16, 2014

Music for programming

This site is awesome! It's a playlist with mixes that sound in the background while you're doing a specific task that requires concentration.

You can use them to help you sleep too ;)

Check them out

Saturday, November 8, 2014

Check if 2 binary files are exactly the same in linux

By comparing the md5sum of two files you can tell if those files have the exact same content or not.

Let's make a quick script:

md5sum $1 | cut -d' ' -f 1 > /tmp/j
md5sum $2 | cut -d' ' -f 1 > /tmp/k
diff -y /tmp/j /tmp/k

md5sum $1 | cut -d' ' -f 1 > /tmp/j
md5sum $2 | cut -d' ' -f 1 > /tmp/k

diff -y /tmp/j /tmp/k

And then we can call it like this bin1 bin2, where bin1 and bin2 are two files that we want to compare.

View binary file as hex in linux terminal - xxd

Straight from the man page:

 xxd  creates a hex dump of a given file or standard input.  It can also convert a hex dump back to its original binary form.

So a simple xdd file will output something like this:

Add -b flag for getting binary output instead of hex, -i flag to output as C include file style.

Sunday, November 2, 2014

Jorgeson 10/40G home studio diy - Industria argentina

Saturday, November 1, 2014

KDE network manager not remembering wpa password

I'm using Kxstudio on my desktop PC and it's great for my purposes, I highly recommend Kxstudio for home studio enthusiasts.
But there was a little problem that bugged me from the beginning, and that is that for some reason, the NetworkManager applet would not remember my wpa password.
Every time I turned on the PC I would have to enter the password manually, and that's a real pain with a 35 character password.
nmcli to the rescue!
Add the following line to a file called

sudo nmcli dev wifi con "My essid" password my_long_passphrase name "My connection name"
Then make the file executable with the following command
$ chmod +x

Then  we add this command to the sudoers file so that we don't have to insert a password every time we use nmcli.
Open the sudoers file with the following command:
$ visudo
And then add at the end of the file the following line:
youruser ALL=(ALL:ALL) NOPASSWD: /usr/bin/nmcli
Replacing youruser with your linux user name.

Finally we add the script to the autostart window located at SystemSettings -> startup & shutdown -> autostart -> Add Script... and navigate to the script file.

And that's it!

Monday, September 15, 2014

New version of Cobrets is out!

Cobrets updates one more time bringing an non-linear approach to selecting a brightness preset.

If you like the classic "state-machine" method you can still use it that way with the "Mode" switch.

Sunday, August 17, 2014


Small tools as building blocks

Saturday, July 19, 2014

Pen Paper Gimp 2

Monday, June 30, 2014

Pen Paper Gimp

Sunday, June 8, 2014

Cobrets update brings new features

Cobrets update brings one more brightness state, one more filter with configurable brightness and the widget's icon color is now configurable.

A safety feature is included as well that allows you to set filter opacity up to 85% and no more. This way you don't end with a one-color screen leaving you no option but to reboot the device.

Saturday, May 24, 2014

Cobrets update

I've added a configurable screen filter state to Cobrets app. Check it out!

Get it on Google Play

Wednesday, May 14, 2014

Working on Cobrets 2.0

I want to make the filter opacity configurable from the notification bar. When that's done I'll update it on google play. 

Saturday, May 10, 2014

Cobrets Android app

  Cobrets (Configurable brightness presets) is a widget that controls the screen brightness. It provides 3 configurable brightness presets plus Android's auto brightness setting (at the moment, brightness values in this state are not configurable)

  States are also configurable. You can add and remove states to the widget.

  It can be set to adapt best on different wallpapers by changing it's icon color to black, white or add a background to it.

Features in the works:
*- A screen filter state
*- Multiple independent widgets

Sun icon made by dAkirby309 from

Google play

Thursday, May 8, 2014

Android alarms shortcut

I wrote this app for having a shortcut to Android's default alarm manager.
Here's the code for making that happen:

Sorry for the image, I can't seem to get syntax highlighting to work. I'll fix that ASAP.

Play store link HERE.

Wednesday, May 7, 2014

Wifi Dell inspiron 3420 - chipset bcm43142 - Debian Wheezy

 After a Debian Wheezy netinstall, while connected through Ethernet  cable, I did the following steps in order to get my WiFi card working:
Download broadcom driver:
$ wget

Install dependencies:
# apt-get install linux-headers-generic build-essential dkms

Install downloaded driver:
# dpkg -i wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb

After a reboot my WiFi was working flawlessly.

Korg KRmini

  Not long ago I got my hands on a Korg KRmini, it's a small digital drum machine that sounds amazing.
Sounds loud enough to let you play along with an acoustic instrument without worries.
These are the downsides I see in it:
  • Creating a custom rhythm isn't as easy as it may be. The device turns into a drum pad and let's you play the pattern you want. The problem with this is that if you suck at playing drum pad then your custom rhythm will suck too. What I mean by this is that it doesn't provide some type of quantization.
  • It would be great if you could hook it up to your PC and program the patterns and songs there with a sequencer of some sorts, then go away and use the device to play those patterns.
  • Trying to get time signatures that aren't 4/4 is a pain

  It's fun to use it as a cool metronome or to play basic stuff but in reality a drum sequencer running on a computer is way better. I guess that I could, someday, learn how to use it in it's full potential but for now there are a few scenarios where this device comes in handy to me.

Internet comments

  I always read comments on GNU/Linux | FOSS | OS forums about how all developers are stupid because they don't all work in the same project. Because they fragment the software scene and they confuse the average user. Like releasing an Ubuntu based distro, or creating another music player for Linux.

  Come on guys, what the fuck?

  First of all, fuck the average user. If the average user doesn't want to learn and bitches about something being difficult, then don't use the software, as simple as that.

  The other thing is that developers do whatever they want on their free time.   If they want to make another text editor, another Ubuntu based distro with different background or another music player, that's absolutely fine.

  Why they should work on whatever you think they should work In Their Free Time?