Archives de catégorie : system

Notes to self for future breakage involving `intel-microcode` updates

The latest update of intel-microcode package on Ubuntu broke some systems (mine in particular), and was the occasion to learn a bit more about initrd images and Ubuntu boot procedure. So, here are some notes of things that may be … Continuer la lecture

Publié dans system | Laisser un commentaire

Configuring Linux VM with french MacBook Pro keyboard and VMware Fusion

At last, I found the right keyboard mapping for Linux VMs runing in VMware Fusion with a french MacBook Pro keyboard! [FR] $ sudo dpkg-reconfigure keyboard-configuration Modèle du clavier : « PC générique 105 touches (intl) » Pays d’origine du clavier : … Continuer la lecture

Publié dans system | Un commentaire

How to dump the content of PHP sessions files

Here is a handy CLI oneliner to inspect the content of a user’s session file: # php -r ‘session_start();session_decode(file_get_contents($argv[1]));var_export($_SESSION);’ /path/to/php/session/sess_707484e735ad7aa9a108b23ad20cc46f

Publié dans system | Laisser un commentaire

WDC WD1002FAEX-00Z3A0 with Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH)

Dear lazy web, Are there any known incompatibilities between Western Digital SATA disks (WD1002FAEX / Firmware version 05.01D05) and ICH9 SATA controlers? I have a remote server (don’t have physical access to it) with an ICH9 SATA controler and two different disks … Continuer la lecture

Publié dans system | Laisser un commentaire

Rollout your own DomainKeys-like signature verification in PHP

Reading documentation on DKIM I found it usefull to be able to distribute public keys through DNS to allow recipient to check signed content against it. So, here is a couple of DomainKeysSigner and DomainKeysVerifier PHP classes that implement the sign … Continuer la lecture

Publié dans code, system | Laisser un commentaire

Remotely open a session on a Ubuntu desktop from Mac OS X

You have an idle Ubuntu desktop machine running somewhere in your office, and you want to open-up an X session to run some Linux specific software, but you don’t want to physically be in front of the machine?

Publié dans network, system | Laisser un commentaire

Log PHP memory consumption on each Apache requests

Edit your Apache conf and and %{mod_php_memory_usage}n to the LogFormat directive to log the PHP memory consumption in bytes : LogFormat « %h %l %u %t \ »%r\ » %>s %b » %{mod_php_memory_usage}n Save and reload Apache.

Publié dans code, system | Laisser un commentaire

Setting Postgresql work_mem from PHP

I discovered that one can set the work_mem from PHP after connecting to the database and before issuing heavy requests : <?php $conn = pg_connect(« service=test »); // Set work_mem to 128MB $res = pg_query(sprintf(« SET work_mem = ‘%s' », pg_escape_string(‘128MB’))); // Run your query … Continuer la lecture

Publié dans code, system | Laisser un commentaire

Postgresql table and index size

Here is a Postgresql requests which will allows you to view the size of your tables with their idx_scan and seq_scan counts. SELECT s.schemaname, s.relname, c.oid, c.relfilenode, s.seq_scan,s.idx_scan, c.relpages AS pages FROM pg_stat_all_tables AS s, pg_class AS c WHERE s.relname … Continuer la lecture

Publié dans code, system | Laisser un commentaire

HTTPS/SSL MITM appliance

Suite à une discussion sur les possibilités d’intercepter silencieusement les communications HTTPS/SSL, quelques liens en relation avec un de mes précédent billet (Fortinet breaks HTTPS … but they are not the only one) : Law Enforcement Appliance Subverts SSL Certi ed … Continuer la lecture

Publié dans network, system | Laisser un commentaire