J’ignore comment vous êtes arrivé là,
….mais après tout que puis-je y faire ?


Un monde de geeks, agrégation de flux des principaux sites sur les nouvelles technologies.

wml port update

I just finish my port update of wml. after several weeks working on It I’m ready for the final submission into the PR.

I think, if no problem was found - portlint say OK - it will be on the port tree at the begin of 2009, so happy new year guys.

· 2008/12/31 17:25 · ros

Flash on FreeBSD

The previous weeks, after the BSD chanel release on youtube, flash becomes a hot topic in FreeBSD. I don’t like flash too much, because it’s heave and uses to crash. But now I have to think about an alternative solution if I want to see the FreeBSD presentations…

I try to list here, some solutions to see the Youtube videos WITHOUT installing linux flash version on freeBDS.

Lire la suite...

· 2008/12/06 11:16 · ros

Protect your files against deletion

The other day, I accidentally delete all my documents in my computer.
This include pictures,emails and so on. The good think is I have a backup, the bad one is the backup has more than 6 months. A complete disaster!

I start moving all my private datas in a NAS server with NFS to be able to backup if. It takes a lot of time, a lot of disk space, and decrease the file access performances.

Today I think about another good and stupi idea, why don’t use ln? Think about it, if you make a hard link to a file (in the same FS of course) if tou delete one of the file, the other link remains, and the file is “backuped” right ? So if I script it, and do every two hours, make a hardlink to the files in my home directory, I can backup everything and it doesn’t cost too much. And if the files are big - videos and music - I won a lot, because those files never change, right ?

So, imagine a ./backup directory with directories like this :

./Backup/
  200808101100_backup/
    00001_inbox.dat
    00002_outbox.dat
    00003_IMG2421.jpg
    ....

· 2008/11/28 17:57 · ros

Ruby et BDB premiers pas

Je viens de me lancer ce soir dans l’exploration de BDb (Berkeley Database) en ruby. La documentation n’abonde pas, mes mes premiest tests sont follement prometteurs.

Sur la base des exemples fournis avec les module BDB deruby (/usr/local/share/examples/ruby18/bdb/basic.rb sur FreeBSD) j’ai modifié pour faire fonctionner le code ce qui donne ceci :

#!/usr/bin/ruby

require 'bdb'


db = BDB::Btree.open "./basic", nil, BDB::CREATE | BDB::TRUNCATE, 0644,
     "set_pagesize" => 1024, "set_cachesize" => [0, 32 * 1024, 0]
File.foreach("wordlist") do |line|
    line.chomp!
    db[line] = line.reverse
end
db.stat.each do |k, v|
    print "#{k}\t#{v}\n"
end
db.each do |k, v|
    if k != v.reverse
	print "ERROR : #{k} -- #{v}\n"
    #else
    #	print "#{k}\t#{v}\n"
    end
end
db.close

wordlist est un fichier texte contenant une liste de mots, avec un mot par ligne. L’exécution du code donne ceci :

%ruby basic.rb
bt_re_len       0
bt_ndata        10000
bt_magic        340322
bt_int_pg       18
bt_over_pg      0
bt_nkeys        10000
bt_leaf_pg      429
bt_int_pgfree   8244
bt_dup_pg       0
bt_version      9
bt_over_pgfree  0
bt_leaf_pgfree  129614
bt_pagesize     1024
bt_free 0
bt_nrecs        10000
bt_minkey       2
bt_re_pad        
bt_dup_pgfree   0
bt_levels       3

En sachant que

%wc -l wordlist 
   10000 wordlist

On en conclut que on à bien nos 10000 mots dans la base :) Il est possible de décommenter les deux lignes du else afin de voir apparaitre le contenu de la base.

Un lien intérésant pour en savoir plus sur BDB : http://www.oracle.com/technology/documentation/berkeley-db/db/index.html

· 2008/11/04 01:14 · ros

Implementing a waitingforsingleobject () call with pthread

Voici 8 heures que je lutte pour comprendre les thread posix, et enfin une implémentation qui semble marcher de la célèbre méthode waitingforsingleobject(), alors voici le code.

Pour le compiler un simple

cc fichier.c -o waitme -lpthread

Anciens billets >>




Tira Ecol


Promouvoir et soutenir le logiciel libre I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting