HowTo: How to use your jack audio card with pulseaudio in Fedora 20 2

I, honestly, don’t know what happens here. I dunno if you’re delegating pulseaudio to jack or viseversa. Anyway, I use this method to enable my Focusrite Scarlett 18i20 in Fedora 20. I hope it helps out:


#!/usr/bin/env bash

pulseaudio -k
pulseaudio -k
pulseaudio -k

pactl load-module module-jack-source;
pactl load-module module-jack-sink

After that (in GNOME 3), just go to Settings > Sound > Output and choose “Jack sink” as the default device. It should now work as your main audio output device.

Let me know, with your comments, of any success stories or feedback you might provide.

HowTo: Change your css according to client’s time

I am no fan of javascript. In fact, I despise it. But, recently, it occured to me that it would be cool to change the CSS theme according to the client’s time.

Here’s how:

function change_css_according_to_time() {
    var d = new Date();
    var h = d.getHours();

    if ( h >= 7 && h <= 19 ) {
        console.log( 'Good day!' );
        document.getElementById("mainStyle").href = '/css/default-day.css';
    } else {
        console.log( 'Good evening!' );



Check out the default.js. It’s as simple as that.

Also, you just need the VanillaJS framework:

Have fun!

HowTo: Cómo poder ver The Pirate Bay si tu país está bloqueando el acceso

Hoy, tras leer:, me dió por ponerme de subversivo.

No me gusta cuando un país hace cosas en favor de los intereses comerciales de empresas con moral distraída.

Así que, ahí van algunas técnicas para que puedas esquivar los intentos de bloqueo de tu país:

Acceso por medio del PirateBrowser

Si descargas el navegador, podrás accesar sin problemas:

IP en tu archivo hosts

Para los que preferimos seguir usando nuestro navegador, y si tu ISP está bloqueando por medio de DNS, solo debes agregar la IP de en tu archivo de hosts. Actualmente, la IP es: pero puede cambiar. Para averiguarla, busca un servicio de dig online.

Solo pon el dominio y te dará la IP. Luego, es fácil de agregar a tu archivo de hosts.

Para GNU & Linux:

    # agrega la IP a tu archivo /etc/hosts (en Fedora, necesitas tener bind-tools instalado)
    echo $( dig @ +short ) > /etc/hosts

Si eso no funciona, edita, como root, el archivo /etc/hosts y agrega la entrada:

Es posible que tengas que actualizar manualmente la IP de vez en cuando. Solo repite los pasos y ya.

Para usuarios de mac o windows, sigue los pasos provistos acá; pero usando el mismo tipo de entrada expuesto en este artículo:

HowTo: Create an interface configuration with nmcli on CentOS7 and Fedora 2

I ran through hell today!

I tried doing things the old way. You know; edit /etc/sysconfig/network-scripts/ifcfg-eth1 in order to set it to a static IP. Well, bad idea.

I had all kinds of problems when the two interfaces where online (eth0 and eth1). For example:

  • eth0, even having BOOTPROTO=dhcp, would get the static IP address of eth1.
  • eth1 would get an IPv6 address but not it’s static address.
  • network.service would NOT work at all.

So, my solution. Use NetworkManager.

I found that we have nmtui and nmcli. The former has a Terminal User Interface (TUI); which makes it friendlier to the average user. The former, is a CLI application; which makes it friendlier for scripting and nerds.

I preferred nmcli; since I like remembering stuff in scripts. So, here is how to do it:

nmcli c add type ethernet ifname eth1 con-name private autoconnect yes save yes ip4
nmcli c modify eth1 ipv4.ignore-auto-routes yes ipv4.ignore-auto-dns yes ipv4.may-fail no

That command will and eth1 with “private” as it’s friendly anme and will connect on boot and persist in configuration. We, also, remove auto routes and auto dns; and make it fail loudly!

Check out the man page to add more stuff like default routes and stuff.

HowTo: Two different public IPs on a single server

Ok, today, I discovered I am still an idiot.

Yep, I tried to add 2 public networks to one of my CloudSigma servers and one of them didn’t work.

I thought everything was to blame but my configuration (as always). Well, I managed to discover what the problem was and how to correct it.

The problem is that since there is only one default route, packets going through eth1 didn’t know how to go back to where they came from. This is solved by adding a rule and telling the kernel where to look for info on those packets:


# first my NIC configuration
## cat /etc/sysconfig/network-scripts/ifcfg-eth0 

## cat /etc/sysconfig/network-scripts/ifcfg-eth1

# my routing table
## ip route dev eth0  proto kernel  scope link  src dev eth1  proto kernel  scope link  src dev eth0  scope link  metric 1002 dev eth1  scope link  metric 1003 
default via dev eth0 

# look for info on packets comming from network on table 1
ip rule add from tab 1 priority 500

# append to default gateway telling it to look for info on table 1
ip route add default via dev eth1 tab 1

# flush cache
ip route flush cache


So, eth0 ( is the default route. It is declared in ifcfg-eth0. If I do not declare DEFROUTE=no on eth1, then, the last NIC to become available becomes the default route. So, I specify which is the default so I can add rules later.

Then, there is eth1 ( which is a completely different network. We add the rules needed for the info of it to be found on it’s own table and we add it to the default.

This works ipso facto. I don’t know if it will survive a reboot, but, hey, I know my readers will tell me if it does or not.