How to make Firefox faster / lower memory footprint for Firefox

Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
Right Click in the page and select New -> Boolean.
In the box that pops up enter config.trim_on_minimize -> Press Enter.
Now select True and then press Enter.

As long as your are there, search and change the following variables:

browser.sessionhistory.max_entries 0
browser.sessionhistory.max_total_viewers 0

In the default setting, the first one is set to 50 entries and the second one to -1, which means it adepts automatically.

Type pipelining in the filter bar.
Double-click on network.http.pipelining to set its value to TRUE.
Double-click on network.http.pipelining.maxrequests and change its value to 12 or more if you have broadband.

Remember to restart Firefox.

Perl DBI Last Insert ID

Recently I was re-searching for an Perl DBI corenspondent for PHP’s last_insert_id(), so here’s what I’ve found:

$dbh->do('INSERT INTO some_table ...');
my $id = $dbh->last_insert_id(undef, undef, qw(some_table some_table_id)) or die "can not get it?";

Another way:

my $id = $dbh->{ q{mysql_insertid}};

The two undefs are for catalog and schema which don’t appear to be necessary. The DBI docs say they can be ignored for MySQL so you might not even need the table and field parameters.

Statia de metrou de la Universitate e in process de vidanjare

Astazi am trecut prin statia de metrou de la Universitate, statie care pentru cei ce nu o stiu, a fost un amestec de McDonalds, anticariat, mizerie, bar, cafenea, vanzatori ambulanti de nimicuri, afise lipite pe stalpi, mizerie, inghesuiala.

Ei bine, astazi toate constructiile, chichinetzele, magazinasele, toxinfectiile alimentare erau daramate iar niste gardieni publici pazeau lucrarea. Desigur, mizerie, praf, inghesuiala, dar parca un optimism pluteste in aer, o fi aeru schimbarii.

In sfarsit, dupa N ani. Si-a dat Romanul seama ca libertate nu inseamna mizerie / impertinenta  /jecmaneala  /dezgust / WC public?

How to speed up execution of mysql INSERT statements

A very good approach to speed up the execution of an INSERT statement
is to temporarly disable the keys (when executing your query), this
will help MySQL to concetrate on the INSERT and not building indexes at the same
time. Also you should LOCK your tables.

The basic syntax of such a simple operation is listed below:



LOAD DATA INFILE file_name INTO TABLE table_name



Unable to load Selinux Policy. Machine is in enforcing mode

Something that happened to me in the last days, after I’ve removed /etc/selinux 🙂

If you a get and boot error like :
“Unable to load Selinux Policy. Machine is in enforcing mode. Halting now. Kernel Panic!”

Boot with enforcing=0 at the grub boot menu [Edit the boot line to append ‘enforcing=0’].

Then once the system is up, edit /etc/grub.conf to include the appending.

goana dupa optiuni

Astazi sotia mea a primit un SMS de la Orange, “sunteti cu Orange de 2 ani! de acum primiti lunar 15 minute-cadou nationale. Pachetul dvs va avea 15 min.”

Primul gand care iti vine, “uraaaaa, am inca 15min, vine chiar acum cand ma gandeam sa renunt la abonamentu curent si sa iau unul nou din oferta care are mult mai multe minute incluse, kickass”, apoi te ia cu intrebari:

“Oare o sa am 15 min (cat e abonamentu) + 10 min (bonusu care era pana acum) + 15 (bonus dupa 2 ani) = 40 min @ 6$ SAU 15 + 15 = 30 min, gandind ca dupa 2 ani in care am avut bonusu de 10 min (obtinut tocmai pt ca m-am abonat pentru 2 ani) ei mi lau luat si l-au inlocuit cu 15 min, practic au mai dat 5 minute obosite ?”

Partea a doua a rationamentului te enerveaza, “Asa isi trateaza ei clientii, le arunca un os mic (5 min) de rontzait, asta dupa 2 ani…. rusineeeee”.

Sfatul meu a fost sa sune la Relatii Clienti sa le dea astea 15 minute chinuite si sa ceara activarea Optiunii de Neplata a Facturii.

New napster/kazaa idea

It just hit me, instead of downloading stuff (movies/clips) why don’t we receive it by regular mail? Oh, you’ll say, “what the heck, you can do that if ur excentric”

No, just imagine, I have a bunch of movies on CDs/DVDs, and I know a friend of mine, A, wants to view/record them, I just pack them in a nice box, and send to him thru regular mail. He will receive them, either view/copy/etc, put inside his stuff also, or prepare 2 or more boxes, label them accordingly, like “This is blue box, contains CDs/DVDs with R’n’B, some concerts and stuff”, This is red box, with action movies. He will also send the boxes to 1/2/3 friends and etc…

Just imagine on day, receiving in your mail the receipt to pick up an box with all mafia movies, Godfather, Good fellas, Scarface, oh boy.

I know…. who will ever want to pay again and again for sending or receiving those, I can think that the one who received stuff should pay, but what if he doesn’t like what he gets, stuff will return..