Skip to main content

Posts

Showing posts from 2013

Munin CPU Disk Throughput reduction load average

The System I run Munin 2.0.16 on CentOS 6 to monitor about 30 hosts. I mostly monitor 25-30 parameters per host (this depends to the running services) About half of the hosts are nearby (with a LAN latency) the other part is far (with about 250ms network latency). The facts I have noticed "munin-graph" and "munin-html" took a long time. Long enough to overlap themselves if I keep the interval default (5 minutes). I also noticed a huge "load average" One of the most annoying thing is the Munin cronjob exiting with error (leading to a mail sent to the administrators) because a lock file (the one of the previous launch) still existing. This is very noise generator and lead to lower the importance of messages sent by munin... Some solutions I was helped by this detailed post about Munin performance . And I decided to put both /var/lib/munin and /var/www/html/munin in tmpfs. In order to reduce the data loss when rebooting, I make an hourly du

Principe clé de Cfengine

Pour comprendre et utiliser CFengine correctement, il faut apréhender ses principes: CFengine permet de faire des promesses sur l'état du système. Ainsi, avec CFEngine, on ne liste pas des actions mais des promesses . On ne dit pas Ajouter la ligne XXXXX à un fichier Ajouter l'utilisateur YYYY Lancer Apache Mais plutot S'assurer que la ligne XXX est présente dans le fichier S'assurer que YYYY existe S'assurer qu'Apache est lancé De ce fait, Si la ligne XXXX est supprimée du fichier, CFengine la remettra Si l'utilisateur YYYY se fait supprimer,    CFengine le remettra Si Apache se fait tuer, CFEngine le relancera

munin apache server-status

When you want to monitor Apache with Munin, you have to let Munin node access the extended server status. The server status is available on http://server/server-status and it has to be secured. Firts, enble Extended Server Status. In httpd.conf (or whatever is used by you installation) ExtendedStatus On Second, in the same file: <Location /server-status>     SetHandler server-status     Order deny,allow     Deny from all     Allow from 127.0.0.1 </Location> With these settings, you should get Apache accesses graph on Munin.

CentOS6 packaging basic environment

When working on packaging some unpackaged yet software for CentOS, I often start with a clean minimal VM and then setup a new development+packaging environment. This becomes repetitive so that I needed a memo in order to just copy/paste. Note that this is just the very basic packaging tools I need and this does not override any official packaging guide. sudo yum -y install rpm-build rpmdevtools redhat-rpm-config make gcc autoconf automake gcc-c++ yum-utils sudo yum -y groupinstall "Development Tools" Then I install the complete build dependencies depending on the package I want to build. After this, I have to setup a minimal build environment: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros When building with "rpmbuild" I might encouter some insatisfied build dependencies. This is solved with  yum-builddep /path/to/package.spec

Libvirt KVM fixed IP address

When playing with KVM LibVirt Vms, I often need them to have fixed IP address. Ironically, I enjoy fixing them with DHCP. Here is the “default” configuration I use in order to fix them. Redefining the "default" network is done with: virsh --connect qemu:///system net-destroy default virsh --connect qemu:///system net-undefine default virsh --connect qemu:///system net-define /tmp/network.xml virsh --connect qemu:///system net-start default Feel free to get inspiration: < network > < name >default</ name > < uuid >7efbc96f-94e8-443f-820c-615d2e0331d5</ uuid > < forward mode = 'nat' /> < bridge name = 'virbr0' stp = 'on' delay = '0' /> < ip address = '192.168.122.1' netmask = '255.255.255.0' >

Le cout de la vie à Madagascar

Il paraît que c'est moins cher à Madagascar Dans plusieurs conversation sur la comparaison entre Madagascar et l'Europe en général, j'ai entendu que le cout de la vie à Madagascar était inférieur à celui en Europe. Mes calculs personnels indiquent pourtant le contraire. J'ai investigué et suis arrivé à une conclusion, que j'argumente dans ce billet. Les profils rencontrés à Madagascar Madagascar est une destination prisée par les entrepreneurs qui souhaitent externaliser de la main d’œuvre (qualifiée ou non) de la France. Ceci parce que c'est un pays francophone et qu'une forte proportion d'étudiants malgaches poursuivent leur études supérieures en France pour « revenir » au pays par la suite. Compte tenu de ces éléments, on se retrouve avec une population composée de dirigeants d’entreprise d'origine française à la recherche et de la main d’œuvre « pas chère » d'un coté, et de l'autre coté de jeunes diplomés formés e

iptables unknown option sport

When playing with iptables, you might encouter this message: iptables v1.4.7: unknown option `--sport' Try `iptables -h' or 'iptables --help' for more information. This is because you have used the "--sport" option without having specified which protocol it applies to. You have to tell wether you want to apply this on TCP or UDP. The behaviour of iptables is not to assume you want to apply this to both.

ocaml list directory

Goals The goal with this very simple script is to list a directory and find who is a directory, who is a file. The secondary goal (for me) is to run it as a script. I dont want to compile it but just run it as I would run bash, Perl or PHP script. The code This is how I do it : #!/ usr / bin / ocamlrun / usr / bin / ocaml #load "unix.cma" ;; print_string "Loaded Unix\n" ;; let tmp_dir = Unix .opendir "/tmp" ;; print_string "opened /tmp\n" ;; (* let tmp_dir_files = Unix.readdir tmp_dir;; *) let print_type a_thing = match Sys .is_directory ( "/tmp/" ^ a_thing ) with | true -> print_string ( "Dir:\t" ^ a_thing ^ "/\n" ) | false -> print_string ( "File:\t" ^ a_thing ^ "\n" );; print_type ( Unix .readdir tmp_dir );; print_type ( Unix .readdir tmp_dir );; print_type ( Unix .readdir tmp_dir );; print_type ( Unix .readdir tm

instal tomcat6 on centos6 using yum

Install Tomcat After some experimentation, I found that I had to issue this install command to get a begining working Tomcat: sudo yum install tomcat6.noarch tomcat6-webapps.noarch tomcat6-servlet-2.5-api.noarch tomcat6-jsp-2.1-api.noarch tomcat6-admin-webapps.noarch tomcat-native Dependencies Just be carefull that this will bring a lot of dependencies: ==================================================================================================================================== Package Arch Version Repository Size ==================================================================================================================================== Installing: tomcat-native x86_64 1.1.24-1.el6 epel 56 k tomcat6 noarch 6.0.24-45.el6

lookup reverse ip

Reverse IP Reverse lookup is needed for several uses. To check what is the reverse of an IP address, one can issue: dig -t PTR +short 99.123.204.41.in-addr.arpa. Easily reverse an IP Using "awk", reversing an IP address can be done with $ echo "41.204.123.99" | awk -F "." '{for (i=NF;i>=1;i--) printf $i"."; print "in-addr.arpa."}' Or putting this in a simple SHELL script (i.e "flip-ip.sh"): #!/bin/bash echo $1 | awk -F "." '{for (i=NF;i>=1;i--) printf $i"."; print "in-addr.arpa."}' and calling it: $ ./flip-ip.sh 41.204.123.99 Used in one line with "dig": $ dig -t PTR +short $(flip-ip.sh 41.204.123.99)

no switchport mode dynamic desirable

mode access to mode trunk I got a Cisco 2950 swicth where a port is configured "access vlan 54". I want to make vlan 54 native on this and put a vlan 150 over it. I then have to enter something like: interface FastEthernet0/4 description vers switch admin1 fa0/17 switchport trunk encapsulation dot1q switchport trunk native vlan 54 switchport trunk allowed vlan 54,150 no cdp enable Unfortunately, when runnnig the configuration, I get: interface FastEthernet0/4 description vers switch admin1 fa0/17 switchport trunk encapsulation dot1q switchport trunk native vlan 54 switchport trunk allowed vlan 54,150 switchport mode dynamic desirable no cdp enable Whatever I tried, I always got the "switchport mode dynamic desirable"... no, then mode trunk The solution was to negate the dynamic and directly force trunk. I entered the configuration in this order: interface FastEthernet0/4 no switchport mode dynamic desirable switchport mode trunk switchport t

ezpublish add siteaccess

Goal I first wanted to install ezteamroom on my ezpublish 4.3, but it requires me to have created "siteaccess" before. This is how to create "siteaccesses" Documentation There is an existing documentation , but guess why screenshots did not match my installation. Download requirements I had to install ezwebin, and as I am there, I also installed all the ezteamroom requirements: git clone https://github.com/ezsystems/ezwebin.git ezwebin git clone https://github.com/ezsystems/ezlightbox.git ezlightbox git clone https://github.com/ezsystems/ezxmlinstaller.git ezxmlinstaller git clone https://github.com/ezsystems/ezteamroom.git ezteamroom git clone https://github.com/ezsystems/ezevent.git ezevent Then following the documentation is OK, but you just dont need to swap the "Home" page because the root node is already a folder. What's next Let's install ezteamroom, then...

tarifs 4G blueline

Offre Blueline à Madagascar Pour ceux qui se posent la question, à ce jour (voir date de ce message) voici les prix de l'offre 4G de blueline. On a 2 options: louer ou acheter l'équipement (le modem). Les offres sont plus chères en location type mise en service frais mensuels 40h/mois à 512Kbps 99000 99000 "illimité" à 512Kbps 99000 149000 "illimité" à 1Mbps 99000 249000 "illimité" à 2Mbps 0 390000 "illimité" à 4Mbps 0 690000 C'est juste un résumé, moi ce n'est que Internet qui m'interesse, mais dans les offres il y a une carte SIM "Blueline" et un pack de chaines TV différent selon les offres prises. Les prix sont en MGA, TTC. Il y a engagements sur 24 mois.

KVM Ubuntu

Installer KVM # aptitude install kvm libvirt-bin virt-manager virt-viewer python-libvirt python-virtinst bridge-utils Mettre l'utilisateur courant dans le bon groupe: # adduser `id -un` libvirtd Configurer le réseau de la machine hôte: auto eth0 iface eth0 inet manual auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address 192.168.1.13 netmask 255.255.255.0 gateway 192.168.1.254 bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0 Lancer l'installation d'une machine: virt-install --connect qemu:///system \ -n debian-testing-i386-003 \ -r 1024 \ -f /data/vm-hd/debian-i386-003.qcow2 \ -s 12 \ -c /data/vm-isos/debian-testing-i386-netinst.iso \ -k fr \ --accelerate \ --noautoconsole \ --network=bridge:br0

arandr quick fix invalid literal for int with base 10

Very dirty fix If you ever get this, be aware that it's a known bug, and it's because of the "i" in: [mihamina@dell-f17 ~]$ xrandr -q Screen 0: minimum 320 x 200, current 2390 x 768, maximum 8192 x 8192 LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 1366x768 60.1*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1024x768+1366+0 (normal left inverted right x axis y axis) 0mm x 0mm 800x600 60.3 + 85.1 72.2 75.0 56.2 1280x1024 60.0 1280x960 60.0 1280x800 74.9 59.8 1152x864 75.0 70.0 1280x768 74.9 59.9 1024x768 85.0* 75.1 70.1 60.0 1024x768i 43.5 <========== THERE!! 1024x576 60.0 848x480 60.0 640x480 85.0 72.8 75.0 60.0 720x400 85.0 70.1 640x40

kvm ksm tuning

Context I am running a no-brand machine,  CentOS 6.3 2 cores 8GB RAM 1 SATA disk On this I fired 6 virtual machines 2 Centos 6, 1GB RAM each 4 Windows XP, 2GB RAM each The reader probably noticed I overbooked RAM: If all the VM will use the available RAM it will fill up to 10GB. I wanted to test the KSM effect on this. The default KSM settings on this OS is: KSM_MONITOR_INTERVAL=60 KSM_SLEEP_MSEC=100 KSM_NPAGES_MAX=1500 The result I got is: Memory usage fits in RAM (very low swap usage Too high CPU usage for scanning "same pages" (constantly using the equivalent of 70% of 1 core) Disk IO is reasonnable, but on the other hand load average is high (10) The Windows XP VM are desperately slow (not a surprise) Tuning Before tuning, I collected what ressource I could use more This machine can bear more disk IO: I can use swap and RAM a bit more This weak CPU should be a bit more used by VMs instead of KSM My fisrt idea is to make KSM check less often.

upgraded to fedora 17

I just switched to fedora 17 and noticed no major problems. Note that my upgrade method is about to make a clean install and then upgrade then restore several configuration one by one. The typical example is on Firefox and Thunderbird where the "cache" space is 2GB for the latter. Noticeable facts are that boot time is faster (comfortable on a laptop I use to completely shutdown ratehr than going in sleep or suspend state), and EMacs 24! I espacially thank all the community around Fedora so that I have a great bunch of software to work with.

sas 02 et HTTP

HTTP avant tout Avant de se lancer dans le développement web, il est absolument necessaire de se familiariser avec HTTP. HTTP dans le sas de formation 02 J'ai donc demandé aux stagiaires du sas de formation 02 de s'auto documenter sur HTTP. Comment se sont passé les recherches sur HTTP? Quels mots clés ont apporté quelles réponses? A-t-il été facile de trouver l'information?

ocsigen css and javascript in head

Goal I would like to have this: < head > < title >a sample title< /title > < link href="style.css" type="text/css" rel="stylesheet" / > < script type="text/javascript" src="script.js">< / script > < / head > This would load one "style.css" file and one "script.js" from the HEAD tag. Recipe Static directory in configuration There must be a "static" directory from where we load the static files. In the "ocsigen.conf" file: < host > < site path="xxxx" > < static dir="/home/mihamina/public_html/static/" /> < eliom module="/xxx/xxx.cmo" /> < / site > < / host > The (Da Mihamina) code :-) open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml let main_handler sp () () =

difference entre logging et debugging

Debugging On "Debug" quand on souhaite maîtriser l'execution d'un script "fautif", en ayant un maximum d'information possible, comme: L'introspection de variable La possibilité d'introduire des breakpoints et de s'en servir Voir la call stack ... Dans les faits, Firebug a ces fonctionnalités, mais pour Javascript à la base. Rajouter FirePHP lui permet de se rapprocher du debuggage, mais ça n'en est pas. Logging FirePHP est un outil de Logging: Il permet de faire afficher des informations potentiellement utiles. Effectivement, on a l'introscpetion de variable et la visualisation de call stack, mais pas le contôle d'execution.

Comparison of OCaml and other languages

Rosetta and PLEAC When discovering OCaml and trying to introduce it to the people surrounding me, there is always a kind of contest about "who has the shortest". That lead me to find how to resolve common real-life and academic "problems" with my friend's preferred language and compare it with the OCaml solution. I found 2 ressources on the web about that: Rosetta Code 1 and Rosetta Code 2 PLEAC I am looking at more ressources like these ones, if you have some in your bookmarks, because I am going to teach and the new task I'm facing requires some comparisons.

j'ai suivi la formation drupal de drupalfrance

Intervenants Le formateur était Romain Jarraud . Nous étions 10 "élèves", composés de compétances diverses (graphistes, développeurs PHP,...) Salle de formation La salle de formation était une des salles de Media Site , qui sont des salles de grande qualité. La connectivité WiFi est cependant décevante. La formation proprement dite La formation a duré 3 jours. Avec pour thème "développeur Drupal". Il est clair pour chacun qu'en 3 jours il est impossible de faire de quelqu'un un développeur Drupal complet, mais Romain a fait ce qu'il a pu. Jour 1 Nous nous sommes attelé à l'installation d'une distribution Drupal que Romain a préparé pour nous. Nous avons installé des modules "contrib" utiles à la formation. Une mise au point: développer autour de Drupal c'est faire un ou des modules. Nous sommes partis dans la création de  notre module de base, qui pour l'occasion ne faisait pas grand chose à part se faire afficher da

ocaml pipe to a command

Context As Linux system administrator I sometimes need to use pipes. A simple example: $ echo "some content text" | mail -s "this is" mihamina@rktmb.org I wondered how to do it with OCaml. Pipe with Ocaml What should be done: Open the command as an output channel Send what you want to that channel How to: let buf = Unix.open_process_out "mail -s ddd mihamina@rktmb.org";; Pervasives.output_string buf "eeeeeeeeehol";; Pervasives.flush buf;; Unix.close_process_out buf;; And you're done!

sas 03 et HTML

Un professionel du web doit passer par la maîtrise de HTML et de CSS. Aussi bien pour obtenir un document HTML à partir d'un fichier Photoshop ou Gimp que pour ne pas défigurer une maquette HTML parceque les données à présenter dynamiquement ne sont pas uniformes, savoir maintenir le design d'un page HTML est important. Le sas de formation n° 03 est actuellement en approfondissement du HTML et des CSS. Que peut-on dire sur ce chapitre dit de "l'intégration HTML"? Qu'avez-vous appris ou découvert? Quelles certitudes sur le métier aviez-vous et sont remises en cause au fil de l'approfondissement?

sas 03 et Firebug, Javascript et DOM

L'étape de formation suivante porte sur Javascript. Par le (lointain) passé programmer en Javascript était une galère relative, surtout à cause de l'absence de debugger digne de ce nom. Actuellement, nous disposons de Firebug et ses nombreuses fonctionnalités Sa console avec séparation des niveaux (info, debug, warning) Ses breakpoints La manipulation du DOM avec Javascript est maintenant supportée par la plupart des navigateur, on peut obtenir des interfaces riches très interessantes avec Javascript. Aujourd'hui, Qu'avez-vous appris sur Javacript? Qu'avez-vous appris sur l'usage de Firebug dans le cadre de votre mini-projet?

vmdk to kvm

Context I have then to transfer the VMWare image to a temporary KVM host. We are on the path to move from RHEL to CentOS. And no, I'm not interested in OL . The current infrasctructure uses "one-file fixed 50GB image disk". Duh!. I want to move this temporarily to KVM, in order to reinstall hosts without braking the developpers work rythm. Documentation I found 2 usefull links for the migration . Tutorial Copy/pasting from the links above did not work, though. This is how I made it: sudo virt-install --import \ --disk path=/var/vmware/dev53/DEV53-flat.vmdk \ -n old-dev53 -r 1024

xdebug selinux

If you intend to use Xdebug, remember to make SELinux doesnt block Xdebug connections to the debugging client. I usually disable SELinux on my development server. This problem is stated on the Netbeans Wiki .

ocaml imap

I am still lookig for an IMAP module for OCaml. during my searches I saw how the POP module is implemented in OCamlNet and I think I could go from this to implement IMAP on OCamlnet Given the small knowledges I have, some help will always be welcomed, if any...

logrotate bzip2

Goal I want logrotate to use bzip2 instead of the traditional gzip Recipe In /etc/logrotate.conf : compress compresscmd /bin/bzip2 compressoptions --best compressext .bz2

delete email user

Deleting an "email user" After adding a user , I sometimes need to delete it. Using a shell script This is how I delete it #!/bin/bash EMAIL=$1 PASS=$2 EXIM_VIRT_DIR="/etc/exim4/virtual/" DOMAINE=$(echo ${EMAIL} | awk -F"@" '{print $2}') LOCALPART=$(echo ${EMAIL} | awk -F"@" '{print $1}') U=$(echo ${EMAIL} | sed 's/\./-/g' | sed 's/@/-/g') CRYPT1_PASS=$(mkpasswd ${PASS}) echo ${EMAIL} echo ${PASS} echo ${DOMAINE} echo ${LOCALPART} echo ${CRYPT1_PASS} echo ${U} userdel ${U} grep -v "${LOCALPART}:" ${EXIM_VIRT_DIR}${DOMAINE} > /tmp/${DOMAINE} cp /tmp/${DOMAINE} ${EXIM_VIRT_DIR} invoke-rc.d exim4 restart

twig inherit content in blocks

With Symfony & Twig, when you inherit a block you cannot put some texts outside the defined block. Let the "base.html.twig" (the one default in Symfony: <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>{% block title %}Welcome!{% endblock %}</title> {% block stylesheets %}{% endblock %} <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> </head> <body> {% block body %}{% endblock %} {% block javascripts %}{% endblock %} </body> </html> When you inherit this template, you can just fill the blocks sections. This will work: {% extends "::base.html.twig" %} {% block body %} Hello {{ name }}! {% endblock %} This wont work: {% extends "::base.html.twig" %} Extra text throwing error. {% block body %} Hello {{ name }}! {% endblock %}

shell random string

Goal Generate a random string picked from a pattern Recipe Build the pattern, the random letter will be taken from it. export ALPHABET="azertyuiopqsdfghjklmwxcvbn"; The length of the string mihamina@pbmiha:~$ echo ${#ALPHABET} 26 Generate a random RANK to pick RANK=$(($RANDOM % ${#ALPHABET})) Pick one random letter fro the pattern RANK=$(($RANDOM % ${#ALPHABET})); echo ${ALPHABET:$RANK:1} Build a 20 characters long random string from the pattern RANDSTRING=""; for I in $(seq 1 20) do RANK=$(($RANDOM % ${#ALPHABET})); RANDSTRING=${ALPHABET:$RANK:1}${RANDSTRING}; done; echo $RANDSTRING Make a function to summarize it function random_string () { ALPHABET="azertyuiopqsdfghjklmwxcvbn"; RANDSTRING=""; for I in $(seq 1 $1) do RANK=$(($RANDOM % ${#ALPHABET})); RANDSTRING=${ALPHABET:$RANK:1}${RANDSTRING}; done; } random_string 3 ; echo $RANDSTRING random_string 5 ; echo $RANDSTRING random_st

facebook mistake disable account

Context On my Android telephone, this afternoon, I tried to use my Facebook account to spend time... Acces denied. I used the FAcebook application from the market. Again, I tried: failure... Damn! I try via the Android web browser, and when I log in, they say something like: "Please use the desktop version of this website because your account has been disabled. After that you'll be able to use Facebook normally". Preceding facts Deveral months, my Facebook account has been "hacked" because of a weak password. But there is no relation with the current events. Several hours before that, I remember I seriously hurted the nuts of a poor young "teeny-hacker" on a Malagasy computing related group, and I knew there would be several actions from him and his friends. That's the way they are. Guess What I think that happened was the guys tried to bruteforce my account on Facebook. As they know I use my email address to log in. Facebook identified it

mon nouveau samsung galaxy s II

Content... "Fan" de Linux, et heureux propriétaire d'un Galaxy S GT-i9000, j'ai acquis un Samsung Galaxy S II. De ce que je sais, les Américain n'ont pu aussi en acheter que ce mois-ci . J'ai certainement tort, peu importe, il est là... avec moi. Et je suis content. Mon Samsung Galaxy S II Je ne suis pas spécialiste de la marque ni des détails, J'ai un Samsung Galaxy S II, GT-i9100. D'origine sous Android 2.3.3, Mais que je compte flasher rapidement en 2.3.5. Mon impression Je compare le nouveau S II à mon ancien S I. Ecran L'écran semble à priori plus "jaune" que celui de précédent. C'est juste un a priori, c'est en fait la gestion de la luminosité en fonction de la lumière ambiante qui est différente. La différence de taille par rapport à l'ancien n'est pas très sensible lors des pointages de boutons et de liens. Par contre, on sens un que finalement les boutons sont un peu plus grands sur le clavier virtuel. C'

my ocsigen project template

Context I often try to develop micro projects with Ocsigen. They are Quick and Dirty things without coplexity, just needing an admin login and deveral things. I mostly start with this Project Template, and clean it the step after. My Ocsigen Project template Its composed by: A main file: index.ml An utility file: gs.ml A Makefile Some tuning to the Ocsigen cofiguration file Some Debian/Ubuntu packages installed The main File open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml open Gs module Ep=Eliom_parameters;; let session_table = Eliom_sessions.create_volatile_table ();; let root_service = Eliom_services.new_service ~path:[""] ~get_params:Eliom_parameters.unit () ;; let root_service_with_post = Eliom_services.new_post_service ~fallback:root_service ~post_params:((Ep.string "login")**(Ep.string "password")) () ;; let logout_service = Eliom_serv

Gandi, Dotclear, bloGTK

Bien, C'est depuis un client XML-RPC que j'écris ce post: BloGTK. j'utilise le système de "blog" proposé "gratuitement" par mon hébergeur (de nom de domaine): dotclear. J'ai passé ma période de petit geek qui aime avoir un serveur dédié rien que pour mettre son site personnel. Comme je n'aime pas du tout Facebook, je préfère un blog, quand meme presque 10 ans apres leurs apparition.. Je vais tenter de récuperer le code de mes anciens tutoriaux et les coller ici. En attendant, c'est aprti pour une journée de travail passionnant

ocaml get the standard output of command

Context Nothing special, I just write i because I wrote a previousentry about "piping to a command" Get the output let buf = Unix.open_process_in "echo sdssdsdsdsds";; Pervasives.input_line buf;; Unix.close_process_in buf;;

compiler ocaml ocamlc ocamlfind

Pour compiler du code Ocaml, on peut utiliser ocamlc ou ocamlfind. Ocamlfind trouvera pour nous les bonnes inclusions et les bons flags qu'il faut. Cependant, comme j'aime bien rester générique, j'utilise l'option verbose de ocamlc pour faire affichier l'invocation entiere. Ceci me permet de rester avec mon ocamlc favori: ocamlfind ocamlc -verbose -package str,netcgi2,netcgi_apache,postgresql,mysql -linkpkg -o params.cgi params.ml Donne ocamlc -verbose -o params.cgi \ -I /usr/lib/ocaml/3.10.2/pcre -ccopt -I/usr/lib/ocaml/3.10.2/pcre \ -I /usr/lib/ocaml/3.10.2/netsys -ccopt -I/usr/lib/ocaml/3.10.2/netsys \ -I /usr/lib/ocaml/3.10.2/netstring -ccopt -I/usr/lib/ocaml/3.10.2/netstring \ -I /usr/lib/ocaml/3.10.2/netcgi2 -ccopt -I/usr/lib/ocaml/3.10.2/netcgi2 \ -I /usr/lib/ocaml/3.10.2/netcgi_apache -ccopt -I/usr/lib/ocaml/3.10.2/netcgi_apache \ -ccopt -L/usr/lib/ocaml/3.10.2/pcre \ -ccopt -L/usr/lib/ocaml/3.10.2/netsys \ -ccopt -L/usr/lib/ocaml/3.1

sas 03 et HTTP

Les bases Avec le sas 03, nous venons de commencer une nouvelle session de formation. Puisque nous faisons du développement Web, nous avons commencé par les bases: HTTP. Qu'est-ce que vous avez appris sur HTTP? Que pensez-vous connaître en arrivant dans le sas que finalement vous ne maîtrisiez pas tant que ça? Que vous a apporté les discussions sur HTTP que vous avez eu avec le formateur?

headers check for mailing list and autoreply

Autoresponder and mailing lists I am subscribed to much mailing lists, and espacially on holidays, I notice many people set their autoresponders to reply to the mailing list. It's annoying and whenever possible should be avoided, by checking several headers befor autoreplying. Headers to check and patterns Mailing lists have pretty verbose footprints. Unfortunately, There is no standard I know about that, but there is a simple enumeration of what headers and patterns a mailing list has. Return-Path: and Sender: Return-Path: and Sender: match owner\-\.+@ , ^\.+\-request@ , and ^\.+\--bounces@ List-ID: or X-Mailing-List: If there is a List-ID: or X-Mailing-List: header, it's probably from a mailing list! To: or Cc: If you receive an email, but you're not in the To: or Cc: , then you probably should avoid autoreplying. "Precedence: Bulk" or "Precedence: List" A little documentation about the "Precedence:" header where we see that &

Mihamina Rakotomandimby on Internet

Profiles Google+ (Google Plus) profile LinkedIn profile Viadeo profile Stack Overflow profile LaunchPad profile Delicio.us bookmarks: http://www.delicious.com/rakotomandimby Identi.ca flow http://identi.ca/rakotomandimby Twitter flow http://twitter.com/#!/rktmb Code repository Google Code SVN repository , for some example and demonstration pieces of code More... Perform a Google Search on "Mihamina Rakotomandimby" Perform a Yahoo search on "Mihamina Rakoromandimby"

CV, Contact Mihamina Rakotomandimby

Personnals Name : Rakotomandimby Mihamina Origin : Madagascar Current location : Madagascar Background : Mathematics, Computer Science Summary IT Engineering team lead Project manager Open source software developper Linux distribution packager Linux system & network administrator  eXtreme programmer,  Functional and Technical documentation writer.  Framework user: Jelix, OCsigen, Django, Zope Languages C,  OCaml,  Python,  Perl,  Javascript,  PHP Mastered softwares by category UNIX System Administrator and Architect: Virtualization: KVM , LXC and OpenVZ Storage: NFS, RAID, LVM, AOE Mail Server: Postfix, Exim, Courier POP/IMAP, Dovecot FreeRADIUS Accounting Database: PostGreSQL, MySQL Directory: OpenLDAP Research & Development: Python: Web and System PHP: Web OCaml: Web and System Perl: System SHELL Scripts: System Experience Training, Recruitement and Development Manager at Ideo Neov August 2011 - Currently : Manage

Mihamina Rakotomandimby on Internet

Profiles Google+ (Google Plus) profile LinkedIn profile Viadeo profile Stack Overflow profile LaunchPad profile Delicio.us bookmarks: http://www.delicious.com/rakotomandimby Identi.ca flow http://identi.ca/rakotomandimby Twitter flow http://twitter.com/#!/rktmb Code repository Google Code SVN repository , for some example and demonstration pieces of code More... Perform a Google Search on "Mihamina Rakotomandimby" Perform a Yahoo search on "Mihamina Rakoromandimby"

Situation légale Internet Madagascar

Plusieurs FAI Comme nous le savons, il y a plusieurs fournisseur d'accès à Internet à Madagascar. Blueline (pour lequel j'ai travaillé dans le passé) Orange (aussi connu sous l'acronyme OMA pour "Orange MAdagascar") Telma (propriétaire de Moov et DTS) Life Tous n'ont pas l'autorisation de commercialiser de l'accès à internet au particulier. Voir les documents suivants: Aout 2010 , Communiqué OMERT Sept 2010 , Communiqué OMERT Sept 2010 , Article Midi Madagasikara Je vous invite à commenter ces documents via le formulaire ci dessous.

update LILO GRUB2

But Les serveurs OVH sont installés avec LILO par défaut, je souhaite installer GRUB2 à la place. Je suis sous Ubuntu Karmic. Prérequis Il faut au prealable installer GRUB1 apt-get install grub et le configurer: grub-install /dev/sda Recette Installer GRUB2, et les package ne s'appelle pas "GRUB2": apt-get install grub-pc Catte installation va mettre en place une étape de transition GRUB1 -> GRUB2. Modifier: nano -w /etc/default/grub Enlever l'étape de transition par GRUB1 upgrade-from-grub-legacy Vérifier que tout s'est bien passé nano -w /boot/grub/grub.cfg Supprimer LILO apt-get remove lilo Rebooter reboot

huawei e1552 orange ubuntu debian

Orange Madagascar This internet access provider had initially provided a USB Huawei E160 . Then, then switched to the USB Huawei E1552 device. The modem is composed by A modem. (Why not?) An USB mass storage, read-only, containing Windows drivers Funny Windows After I got the USB Huawei E1552 , I wanted to to try it out on a spare Laptop running Microsoft Windows 7 32bits. I failed, because the driver provided on the USB stick is XP/Vista only, and known to be weird on Microsoft Windows 7 32bits. On Linux If the usb-modeswitch package is not installed, when plugging the modem, only the USB mass storage part is detected: usb 1-2: new high speed USB device using ehci_hcd and address 3 Initializing USB Mass Storage driver... scsi6 : usb-storage 1-2:1.0 scsi7 : usb-storage 1-2:1.1 usbcore: registered new interface driver usb-storage USB Mass Storage support registered. After installing usb-modeswitch and without any setup, when plugging the modem, the the USB mass st

bash fichiers avec tiret

Problème J'ai plein ed fichiers avec un "-" dans le nom, et pas partout dnas lenom mais au debut. Un "ls *" s'y perd, considérant ces fichiers comme des "options" de ligne de commande. Dans les faits meme un "mv" et un "cp" s'y perdent aussi. Solution D'apres un message sur stackoverflow , il suffit de mettre un "--", qui indique la fin des options transmises.

ecrire un email

C'est quoi le problème? Il y a un problème global: Les gens qui utilisent les emails ne savent pas utiliser les emails. Un email c'est un message: du contenu. Ce contenu doit être lisible le plus rapidement possible. Ecrire en HTML Ecrire un message en HTML, c'est utiliser sont Outlook ou Thunderbird dans sa cofiguration par défaut. Cela permet de faire des messages avec de la mise en forme, des couleurs, insérer des images,... Mais: On ne sait pas comment le destinataire va lire le message, on ne sait donc pas si l'HTML est supporté et par principe on utilise le plus petit dénominateur commun. Un message HTML prend trois fois plus de place au moins qu'un message en "texte brut", soit trois fois plus de bande passante (multiplié par les centaines d'aliases qu'on a dans une entrepise) De nombreux utilisateurs gardent les messages sur le disque pour pouvoir effectuer des recherches, en augmentant la taille par 3 on augmente d'autant le t