All posts by celogeek

Perl Jedi Plugin Auth

Jedi::Plugin::Auth is an authentication plugin for Jedi. It handle the authentication for you, saving using info in his database, and returning the full profile in a session when the user identify himself properly. The plugin provide : jedi_auth_signin jedi_auth_signout jedi_auth_login jedi_auth_logout jedi_auth_update jedi_auth_users_with_role jedi_auth_users_count jedi_auth_users So you can add an user, remote it, log the … Continue reading Perl Jedi Plugin Auth

Perl – Understand List, Unary operation and Array in scalar context

The common misunderstanding in Perl is the difference between : A list : (1, 2, 3) An array : @my_array containing (1, 2, 3) The unary operation coma ‘,’: $operation1, $operation2, $operation3 Perl use the context to act practically over logically. That lead to unexpected behavior if you mislead each of this concept. The 3 … Continue reading Perl – Understand List, Unary operation and Array in scalar context

Proper usage of the roles in Perl

For everyone who doesn’t know it yet, you have to take care where you use “Moo::Role” (or Mouse::Role or Moose::Role). Moo::Role will export all methods that is declared after his declaration. Let me show an example : If you do :

and in your class :

You will have those methods injected : … Continue reading Proper usage of the roles in Perl

How to build a new kernel (custom) for OVH servers

I’m dealing with TC and shorewall. And based ovh kernel lack of some builtin modules. So to be short :

Don’t forget to cross your fingers. If anything goes wrong, just reboot in rescue, and fix the kernel. Source : http://fr.wikitwist.com/ovh-compiler-kernel-personnalise/#axzz2eJVwnpqG Enjoy ! Celogeek

To handle multiple public ip on one linux router

Let say we have at least 3 connections. One private, one public (default outgoing), and a second public. This is a typical config in your ‘/etc/network/interfaces’ :

And you will need additional route table, edit ‘/etc/iproute2/rt_tables’ and add :

So this config, create a second route table ‘public2’. Any incoming connection that pass … Continue reading To handle multiple public ip on one linux router

How to rename your linux network card (eth0, eth1 …) into a custom name

If you want to give a name to your network card on linux, you can ! By default it’s eth0, then eth1 …

Replace the ATTR{address} by the “mac” address of your card (use ifconfig for this purpose). Then reboot. Now you can do “ifconfig private” instead of “ifconfig eth0”.