Welcome

Welcome to my site : QA.celogeek.com

The goal is to help each other. I will put there all my tutorials. You can blog anything you want, give some tips or express yourself.

Please register to my site. Register users won't have advertising.

PerlTalks - Parallele::ForkManager (case of usage)

Hi, I have realized a slide for "Mongueurs of Paris" Juanary session. I'm talking about Parallel::ForkManager.

I present you case of usage. In the slide you got :

PerlTalks - Slides

Here all my slide (html5 / css3) about perl. I realize this slides for "Mongueurs of Paris" show.

Try to draw - Maliki

Hi, I'm training to draw stuff. Here 2 stuffs from Maliki: (click to enlarge)

    

I'm not just a geek :)

Celogeek

SafeNet Token and Openvpn on Oneiric ? SOLVED !

Hi, my co-worker has found a way to make it work !

sudo apt-get remove --purge libpcsclite1 pcscd
sudo apt-get clean
sudo apt-get install pcscd libpcsclite1 
sudo dpkg -i SafenetAuthenticationClient-8.0.5-0_amd64.deb
wget http://mirror.ovh.net/ubuntu//pool/main/p/pkcs11-helper/libpkcs11-helper1_1.09-1_amd64.deb
sudo dpkg -i libpkcs11-helper1_1.09-1_amd64.deb
cat <<EOF | sudo tee /etc/ld.so.conf.d/etoken.conf
/usr/lib64
EOF
sudo ldconfig
sudo reboot

For PKIMonitor and autolaunch in user mode, I have follow this guide :

MySQL 4 - Indexes issues

Well, I have to use MySQL 4 in production at work, and well, they is something weird about this.

To speed up copy process I create table without indexes. It really speed up copy, 6x times faster or more (5 min instead of 1h) !

Just before using in compute process, I add the indexes I need :

ALTER TABLE my_table ADD INDEX(a,b,c), ADD INDEX(a,d,e) ...

Seems ok, so now I do my request.

First weird think, MySQL don't always use the best index. Ex :

Perl - How to call a static method ?

Well, sometime we define static method in a class, and outside the scope we want to call it,

They is many way to do it :

package t;
use Moo;

sub my_static_method {
  my ($test) = @_;
  print "Test : $test\n";
}

1;

#first method
t::my_static_method("Test"); #Test: Test

#method 2 with instanciated class and method can
my $o = t->new;
$o->can('my_static_method')->("Test"); #Test: Test

Enjoy :)

Celogeek

Perl - How to generate package on the fly ?

It is a real question, I want to be able to do something like that :

sub generate_package {
 my ($package_name) = @_;
 return q{
   package t;
   use }.$package_name.q{;
   use MooX::Option;

   has 'test' => (is => 'ro');
   1
 }
}

{
  eval(generate_package('Moo'));
  t->new_with_options();
}

I have seen some stuff, like define directly ISA : *{"t::ISA"} = 't';

But how can I add my compiled code ?

If anybody can help me on this, thanks !

perl MooX::Option - Command line tools with Mo/Moo/Mouse/Moose

I have made "MooX::Option". This add "option" and "new_with_options" keyword to your module.

You will be available to easily create a command line tools in Modern Perl.

Example :

perl Moo::Getopt - Command line tools with Moo

Well, I have made another module. If you want to use Moo and purpose a command line, try my module.

An example of usage :

Pages

Subscribe to QA from Celogeek RSS