ademcan's blog http://www.ademcan.net/ ademcan, bio-informatics, biology, computational biology, science, howto, open-source, linux fr Ademcan Schrödinger's retrogene http://www.ademcan.net/?d=2014/03/05/08/31/19-schrodingers-retrogene http://www.ademcan.net/?d=2014/03/05/08/31/19-schrodingers-retrogene Wed, 05 Mar 2014 08:30:00 +0100 Schrödinger's retrogene
schrodingerRetrogene.png]]>
Save and share your snippets with canSnippet http://www.ademcan.net/?d=2014/01/16/08/47/25-save-and-share-your-snippets-with-cansnippet http://www.ademcan.net/?d=2014/01/16/08/47/25-save-and-share-your-snippets-with-cansnippet Sun, 19 Jan 2014 16:00:00 +0100 Save and share your snippets with canSnippet
canSnippetLogoBlack.png
UPDATE : canSnippet is not anymore on beta, I created a new page for the project.
canSnippet's project page.

    I am very happy today to introduce you to canSnippet. canSnippet is an open source web-based application to save and share your code snippets. It is my first “big” project, thus I would like to have as many comments and feedback as possible. Please don't hesitate to contact me for any question or remark, I will be happy to answer. For this project I used the CC BY license (I am also moving my whole blog under the same license), more information in the creative common by 4.0 page.
    I used the following technologies for canSnippet : HTML, PHP, Javascript and sqlite.

Author: ademcan (ademcan@ademcan.net)
Version: 1.0 beta
License: CC BY

canSnippet is an open source web-based application to save and share your snippets.
The advantages of canSnippet are :
- it's green (literally)
- open source (License CC BY)
- web-based
- easy installation process
- sqlite database
- syntax highlighting (based on prism.js)
- possibility to save private and public snippets
- unique link per snippet for easy sharing
- support many programming languages (html, css, javascript, python, java, php, ruby, c, c++, sql)
- rss feed
- search engine
- browse panel using AJAX
- responsive design
- it's flat-green :)

Todo :
- search API
- tags support
- including prismjs plugins and themes
- create new non-flat theme

Alternatives to canSnippet :
SnippetVamp

Installation :
- Download the latest canSnippet.zip file
- send the zip file to your server and unzip
- give the following rights
705 to folders
604 to files
- open the following URL in your web browser
http://[YOUR_DOMAIN]/canSnippet/
- Follow the unique instruction (i.e. fill in the form)
- Remove the install.php file for higher security
- You are done ! Now you canSnippet...

Screenshots:
http://ademcan.net/gallery/?dir=canSnippet

Demo :
http://ademcan.net/canSnippet/demo

Download :
GitHub : https://github.com/ademcan/canSnippet
zip | 7z (v1.0 beta – 22.01.2013)

I would also like to thank my two super beta-testers Yome and Bajazet, thank you guys !
Again : this is a beta. I am still working on the code to improve it as much as possible, and I am very open to any discussion about the code and the design :)

Enjoy !

]]>
The Y chromosome under review http://www.ademcan.net/?d=2014/01/16/08/19/50-the-y-chromosome-under-review http://www.ademcan.net/?d=2014/01/16/08/19/50-the-y-chromosome-under-review Thu, 16 Jan 2014 08:25:00 +0100 The Y chromosome under review
yUnderReview.png

my other drawings : http://ademcan.net/gallery/?dir=myDrawings

]]>
[FR] L'identité http://www.ademcan.net/?d=2013/10/04/14/32/19-fr-lidentite http://www.ademcan.net/?d=2013/10/04/14/32/19-fr-lidentite Tue, 10 Dec 2013 21:32:00 +0100 L'identité
Fingerprint_picturesvg.png J'ai écrit cette courte "histoire" pour ma participation au Prix de la Sorge 2013.
Merci à Yome et Yohan (le luxembourgeois) pour les corrections.


L'iDentité

« Chérie, je vais passer chez ma mère cet après-midi » s'exclama Christine.
« Fais-attention, tu ne devrais pas utiliser la iTransport si souvent, tu sais très bien que cette machine a causé des ennuis à certains de ses utilisateurs. »
    Christine ne l'écouta pas en rentrant dans sa iBeauty pour se préparer de la tête aux pieds en 30 secondes. John se méfiait encore plus chaque jour qui passe de toutes ces nouvelles technologies qui avaient désormais envahi leur vie quotidienne. Il ne pouvait pas non plus trop s'en plaindre, lui qui se rendait tous les jours avec la iTransport depuis chez lui de Sophia à l'Université de Boston où il était professeur en études génétiques. Il se tourna sans trop insister vers son écran géant pour terminer son projet, allongé sur son canapé, le tout transmis aux travers des iElectrodes posées dans son cerveau.
    La société Aplle, avait lancé la iTransport il y a cinq mois. Cette machine de téléportation permettait de se rendre en quelques secondes à n'importe quel endroit du globe disposant d'une autre iTransport. La technologie était basée sur la fission et la fusion des molécules composant le corps humain. Chris Temp était le chercheur qui s'occupait de ce projet au sein de la société. Il était vraiment fier de son dernier bijou. Il ne pouvait pas s'empêcher de penser à l'année 2001, l'année du séquençage du génome qui avait dû occuper pendant des années plusieurs groupes de recherche, dont le fameux Watson. Aujourd'hui, le séquençage d'un organisme entier ne prenait pas plus de 5 secondes...
    Avec la iTransport les notions de frontières, pays et nationalités avaient complètement disparu. Toutes les communes étaient au moins équipées d'une machine, ce qui permettait de se rendre à des milliers de kilomètres pour passer la soirée dans un restaurant à l'autre bout du monde. Dans la très grande majorité des cas, cette machine fonctionnait parfaitement. Cependant, il est arrivé que la iTransport ne fonctionne pas comme prévu dans certaines situations. Le système de téléportation est basé sur la fission des molécules au lieu de départ et leur fusion dans des proportions et positions exactes à la destination finale. Une simple erreur de proportion ou position d'une seule molécule a été fatale pour certains de ses utilisateurs. Néanmoins le leitmotiv de la compagnie Aplle était clair «Pas de progrès sans sacrifices» même si le sacrifice devait être une vie humaine. Il restait encore certaines personnes qui ne partageaient pas cette idéologie mais elles étaient trop facilement exclues de la société et considérées comme « attardées » pour être pris au sérieux. John ne faisait pas partie de ces « attardés » mais il les comprenait bien, lui, qui avait fait des études approfondies en génétique, réalisait bien que ce n'était pas une notion à prendre à la légère. Cependant, il ne se plaignait pas trop et utilisait la iTransport assez fréquemment. Il devait d'ailleurs se rendre à Oslo la semaine prochaine car il lui serait attribué le plus grand prix en génétique pour ses travaux de recherches. Il recevra le prix Krogel en génétique. C'est en particulier de ce fait qu'il était très occupé en ce moment, il devait finaliser ses analyses et surtout préparer un discours digne de ce nom, ce qui n'était pas chose facile, lui qui ne supporte pas d'être mis sur le devant de la scène.

    John sursauta. Il venait de faire un cauchemar, il se retrouvait dans les années 1990. Il vivait dans un bloc en béton et devait tout faire à la main : saisir du texte au clavier, utiliser la télécommande, ouvrir la porte, se doucher... S'il ne connaissait pas déjà toutes ces machines bizarres grâce à son arrière-arrière grand père il n'aurait jamais su à quoi elles servaient. Il aurait certainement eu l'impression de se retrouver sur une autre planète.
    Christine était de retour, elle apparut toute souriante au travers de la vitre de la iTransport.
« Bonjour chérie. »
« Salut, comment va ta mère ? »
« Elle va très bien figure-toi, elle m'a annoncé qu'elle participera à la remise des prix Krogel à Oslo. »
« Je ne pense pas que ce soit raisonnable qu'elle vienne. De plus, la cérémonie de remise des prix sera retransmise en direct par hologramme. »
« Je ne vois pas ce qui te pose problème, si elle participe, c'est pour te faire plaisir. »
« Oui, mais tu sais aussi très bien qu'elle n'a jamais utilisé la iTransport et que cette machine est fortement déconseillée aux personnes âgées. »
« Ah John ! Que puis-je te dire de plus... »
    John se retourna sans trop insister pour continuer son travail. Il devait terminer sa présentation le plus rapidement possible pour avoir le temps de répéter son discours. Il n'était vraiment pas doué pour parler en face d'un public, encore moins quand ce dernier était composé de grands chercheurs dont le professeur Temp.

    Christine se réveilla lentement de son second sommeil, servit son café et se prépara pour sortir chercher les enfants à l'école. Christine et John avaient deux adorables filles. Ils faisaient tout pour qu'elles grandissent dans de très bonnes conditions. C'est pour cela que John tenait aussi beaucoup à son prix Krogel. Le sommeil avait été étudié en profondeur et les chercheurs découvrirent que les humains disposaient plutôt d'un sommeil polyphasique alors que la société des années 1990 les avait rendu mono-phasique. Une simple sieste de vingt minutes toutes les quatre heures suffisait largement.

    John reçu un message télépathique de la part de l'un de ses collaborateurs Fredy Curck :
« John, il faut impérativement que tu me retrouves le manuscrit de thèse de ton ancien élève Greg. Je pense que celui-ci peut contenir des informations très importantes pour mener notre projet à bien. »
    John et Fredy étudiaient en secret la iTransport. Ils avaient prévu de la démonter et d'analyser en détails les technologies utilisées. Le but de John étant tout d'abord d'être sûr de son utilisation saine et pourquoi pas en faire une base pour ses futures analyses. John s'empressa de se rendre au sous-sol de sa maison où il conservait encore bizarrement des versions papier de certains documents, dont le fameux manuscrit de thèse. Le papier étant très cher, et tout le monde disposant d'espaces électroniques infinis pour sauvegarder leurs documents, il était très rare de trouver encore des documents au format papier, cela va s'en dire qu'il était encore plus difficile de trouver une imprimante. John était bricoleur et avait réussi à remettre en marche une imprimante qu'il avait retrouvé dans les objets de son arrière-arrière grand-père.
    Il retrouva très rapidement le manuscrit en question et s'empressa de le scanner au travers de ses lunettes pour le transmettre à Fredy. Il ne pouvait s'empêcher de se demander ce que Fredy pouvait trouver d'intéressant dans cette thèse. Il ne se souvient d'aucun résultat très important au sein de ce manuscrit qui pourrait leur permettre d'avancer dans l'analyse de la iTransport.
« Ok Fredy, voici donc le manuscrit que tu m'as demandé. Je peux savoir ce que tu cherches exactement ? »
« Pas maintenant John, il faut que je regarde cela rapidement. La cérémonie des Krogel à lieu dans moins d'une semaine. Tu imagines si nous pouvions avoir des résultats juste avant cette cérémonie ? »
« Oui effectivement ce serait une très bonne chose... »
« Papaaa, nous t'attendons pour manger ! » S'écria Sophie, la plus grande des deux filles.
« J'arrive mon amour ! Fredy, je dois y aller, tu sais que nous mangeons à table une fois par semaine, j'attends de tes nouvelles avec impatience, tiens-moi au courant dès que tu as du nouveau, salut. »

    Les capsules nourrissantes étaient largement suffisantes pour permettre au corps humain de s'approprier tous les éléments nécessaires. Néanmoins, Christine et John avaient décidé qu'ils mangeraient à table une fois par semaine, même si cela semblait très archaïque.

« John, nous avons un problème... », c'était Fredy, sa voix tremblait. John ne pouvait plus le joindre mais il appris rapidement que des forces de l'ordre avaient fait irruption à son domicile et récupéré tout le matériel nécessaire à l'étude de la iTransport. La société Aplle disposant de tous les droits sur le produit, il était formellement interdit d'analyser cette machine. Toute personne essayant de comprendre son fonctionnement risquait une peine très lourde. C'était horrible, qu'allez-t-il se passer maintenant ? John essayait en vain de joindre son ami et de faire quelque chose pour le sauver. Il se rendît chez lui où la femme de Fredy était seule et désespérée. Il savait pertinemment que Fredy lui aurait laissé un message, un signe. C'était bien le cas, certains documents très importants de Fredy étaient toujours gardés dans leur boîte secrète en commun. John ne risquait pas grand-chose, leurs discours avec Fredy étaient toujours chiffrés. Il n'était pas possible pour John de laisser tomber cette affaire. Avec tous les documents il se rendît chez lui pour continuer les travaux ; il ne lui restait plus que deux jours avant la cérémonie de remise des prix Krogel.

    Ces deux deniers jours, John ne respecta pas son cycle polyphasique de sommeil, il ne dormit pas du tout. En lisant les rapports de Fredy il réalisa pourquoi son ami lui avait demandé la thèse de son ancien élève. Il avait découvert une potentielle faille dans le système de la iTransport. Le court instant entre la fission et la fusion des particules composant le corps humain était le point faible de la machine. Il devait alors analyser ces ondes de très grandes amplitudes. La thèse en question correspondait tout à fait à ce qui pouvait aider John et Fredy à se faufiler au sein du mécanisme de fonctionnement de la iTransport. John s'empressa de relire la thèse de Greg et y retrouva effectivement un algorithme permettant la réception et la modification des ondes qui transportent les molécules, les mêmes utilisées dans la iTransport.
    John était tout excité, en plus de recevoir le prix Krogel, il pouvait devenir le chercheur le plus reconnu de la Terre s'il arrivait à se faufiler dans le système de la iTransport. Bien sûr tout cela n'était pas sans risque. Il pourrait même tout au contraire perdre son prix Krogel, mais rien ne pouvait arrêter John. Ce projet dépassait tout ce qu'il pouvait imaginer. Il se doutait que ce système possédait une voire plusieurs failles et c'est lui qui les découvrirait.

    John disposait de deux iTransports à son domicile, son salaire élevé lui permettait ce luxe. Il regroupa rapidement ses deux machines dans sa salle d'étude. Il lui fallait maintenant un cobaye, il ne pouvait pas risquer Katzy, sa chatte adorée, de plus ses filles ne le lui pardonneraient jamais s'il arrivait quoi que ce soit à Katzy. Il décida de se servir d'un simple objet et amena son imprimante avec lui. La iTransport disposait d'un système de reconnaissance et n'aurait jamais accepté de fonctionner avec un objet connu autre qu'une particule vivante, ce qui était la raison pour laquelle elle avait été créée. Un des rares objets qui ne serait pas reconnu et donc potentiellement rejeté par la iTransport était la vieille imprimante qui lui restait. C'est avec un pincement au cœur qu'il décida de l'utiliser en tant que cobaye.
    Il testa donc rapidement la téléportation de l'imprimante d'une iTransport vers l'autre. Le transfert était tellement rapide qu'il n'avait pas eu le temps d'intercepter d'ondes, mais comment Fredy avait-il fait ? En relisant rapidement les rapports de Fredy il réalisa que son ami avait travaillé dans une chambre froide pour ralentir naturellement les ondes pendant le transfert. John fît de même en se rendant dans le sous-sol de sa maison. En renouvelant le transfert avec toutes les machines en place il commença à apercevoir des signaux. L'écran affichait des nombres et des lettres qui n'avaient aucun sens tel quel. Il ne savait pas trop comment s'y prendre mais les notes de Fredy allaient lui être d'une aide exceptionnelle.
    Il installa rapidement l'algorithme d'identification des ondes sur l'ordinateur principal et répéta la manipulation de téléportation de son imprimante. L'écran affichait un message binaire, qui ne représentait rien aux yeux de John dans son état actuel. La section « Résultats » de la thèse de Greg contenait des informations à propos de cette séquence binaire. Il s'agissait en fait de la composition de l'imprimante. John s'arrêta. Que voulait dire la composition ? Une explication lui effleura l'esprit mais il ne voulait pas y croire. Il n'y avait qu'une seule solution pour pouvoir confirmer ses doutes, il devait essayer la machine avec un organisme vivant.
    Il courut au jardin et trouva une coccinelle sur une feuille de son prunier. John ne pouvait pas faire de mal à une fourmi mais cette fois c'était pour la bonne cause, il en était excusé. Il se précipita à nouveau dans le sous-sol de sa maison et répéta la manipulation avec la coccinelle. Les séquences binaires ne s'affichaient plus sur l'écran, il ne distinguait plus rien. Il répéta la manipulation une dizaine de fois avant de voir apparaître le premier signal. Il s'agissait d'une séquence, une suite de lettre cette fois-ci, John lisait
« A, A, C, T, A, G, T...mon Dieu ! » S'exclama-t-il, « ils n'ont pas osé... »
Il s'agissait de la séquence d'ADN de la coccinelle. John pouvait facilement distinguer tous les gênes de la petite bête. Il pouvait même en déduire le phénotype de celle-ci. John était ébahi, l'ADN, le code génétique était la dernière identité qu'il restait aux personnes. Plus rien n'était secret, les informations personnelles, le groupe sanguin, les empreintes digitales... il ne restait plus que l'ADN... mais cela n'était plus vrai désormais. John était persuadé que la iTransport utilisait uniquement les informations des molécules pour effectuer les réactions de fission et fusion. Il ne se doutait pas une seule seconde que tout le corps était scanné jusqu'au détail près du code génétique. En analysant en détails les données transmises il réalisa un lien vers une adresse internet : iDbD, il s'agissait certainement de la base de données où toutes les séquences étaient stockées.
John s'assis, il était tétanisé, il ne lui restait plus rien, il ne restait plus rien de l'humanité. La découverte qu'il venait de faire était une charge trop lourde pour lui. La cérémonie de remises des prix Krogel avait lieu dans moins de deux heures, qu'allait-il faire ?...

Image source : Fingerprint - wikimedia
]]>
Goodbye Piwik ! http://www.ademcan.net/?d=2013/09/18/14/48/56-goodbye-piwik http://www.ademcan.net/?d=2013/09/18/14/48/56-goodbye-piwik Fri, 11 Oct 2013 09:00:00 +0200 Goodbye Piwik !
    This is not an anti-Piwik article. I have started using Piwik a few months ago. I really liked it, it is a powerful and open-source analytics tool.
    If today I say "Goodbye" to Piwik, it is because I stopped using any analytic tool at all.
I was checking my stats very often, I was affected at some point, I couldn't stay without checking many times a day.

    A very interesting article from Ploum made me wonder about it.
I don't want to write articles or share links depending on the interest of my readers (of course I care about you), but I want you to read things I will write with pleasure, with love. I completely uninstalled Piwik, I don't know how many people are reading me, I only hope to be helpful to at least someone with my tutorials or information.
NB : You can also check your Ghostery, it says "No Trackers Found" 😉
Do the same, feel free.

]]>
Alternative to locate/find command line on mac http://www.ademcan.net/?d=2013/09/18/09/42/29-alternative-to-locatefind-command-line-on-mac http://www.ademcan.net/?d=2013/09/18/09/42/29-alternative-to-locatefind-command-line-on-mac Thu, 19 Sep 2013 14:00:00 +0200 Alternative to locate/find command line on mac
    In linux you can use the "find" or "locate" command to look for a specific file or folder. The best alternative I know on Mac is Spotlight. However Spotligh is based on a graphical interface and the "best" option is to show all the results on the Finder, which is not very handy if you work all the time on the command line. After some research, I found a way to use Spotlight from the command line and show the results as the find or locate command on linux.

    The main command to show Spotlight results on the terminal is :
    mdfind -name $NAME
where $NAME is the word you are looking for.

    To make it easier to use and remember, I put an alias on my bash
1 - Open the file ~/.bash_profile
2 - Add the following lines
    search()
    {
    mdfind -name $1
    }
    alias find=search

3 - Reload you bash
    source ~/.bash_profile

you can now use the "find $NAME" command within your terminal as you would use it on linux and enjoy the results 😉

Related links :
- Bash alias and parameters
- Search Spotlight from the osx terminal]]>
Getting rid of Google on Android http://www.ademcan.net/?d=2013/06/10/14/41/40-getting-rid-of-google-on-android http://www.ademcan.net/?d=2013/06/10/14/41/40-getting-rid-of-google-on-android Mon, 16 Sep 2013 11:20:00 +0200 Using Android without Google, it is possible !
noGoogleAndroid.jpg     I recently switched again to Android. I was getting very limited in iOS, it was a pain to do simple things that you would do easily with Android (file transfert, syncing with multiple computers, real Bluetooth...). However, there is a big problem with Android : Google...
    After receiving my second Androphone I realised that all the apps I installed in my first one were saved online on the Play Store. I knew the equation "Google != Privacy" and this was decisions' time for me. I will explain in this article how to use Android without getting annoyed even by the G of Google.
    I already stopped using any service from Google a few months ago. I am using owncloud for my contacts and calendars, Leed for my RSS feeds and Shaarli for my links (only private links). The biggest problem for me was to get rid of the Play Store. Luckily on Android it is possible to install third party apps without "jailbreaking" and many alternative app-stores exist.

    The first step when you get your Androphone is to install Cyanogenmod (a.k.a CM, or any other alternative ROM respecting your privacy). It is a very nice ROM running on multiple devices and always up-to-date with the latest version of Android. Although my device is a Nexus (and thus get all the latest version of Android), I still decided to install Cyanogenmod to get completely rid of Google. The installation is straightforward, everything is clearly described on the wiki page of your device. The idea of installing CM is to use a stock version of Android, even without the Google Apps, thus do not install the additional Google Apps package for CM, I will show you how to survive without them.

    First of all let's look at the Play Store alternatives, as we need somewhere to download interesting apps.
There are many options, I tried the following ones.
- F-Droid, an appstore containing only free and open-source softwares (FOSS) - F-Droid.apk -
- 1 Mobile Market, where you can find the majority of the Play Store apps - 1mobile.apk -
- SlideMe
- Amazon Android Appstore
- PandaApp - PandaApp.apk -
- GetJar
- Opera mobile store
- Firefox marketplace

    For some of the stores you will need to create an account. I recommend to use junk/fake email services such as yopmail which works very well. Discodog.fr presents a list of junk email alternatives, I didn't try all of them, be prudent and check by yourself first.

    You can also use the google play downloader app from Tuxicoman. It is a graphical interface written in Python which connects to the Play store and downloads all the apps you want to your computer. If you need and Android ID, you can use the android-checkin script to create one (using a fake gmail address). (thank you Tuxicoman for the tip)
Another option is the APK Downloader pugin, which is unfortunately only available for the Google Chrome browser.

IDEA: Why not create a web-app accessible from your Androphone to be able to download the .apk files directly in your smartphone instead of dealing with your computer? If someone else is interested, please let me know, we can do that 😉

    As we now have many Play Store alternatives, here are some alternatives for the original Google Apps.
First, try to get your own domain name, it is really cheap and very nice to have your email address like firstname@name.com. In this situation you also have all the control over your Privacy.
- K9-mail, this app is a must-have.
- Firefox, the Android app is very nice, I really enjoy using it (you can also access your apps downloaded from the Firefox Marketplace)
- Navit (I recently discovered OsmAnd which is better and work the same way with offline maps) as a Navigation system, it runs on multiple platforms and is based on OpenStreetMap maps. It works offline, the map is saved on your Smartphone and you won't need any data connection to use it. Please consider improving OSM maps, it is a very interesting experiment, start by reading the beginners' guide.
- Owncloud
- MuPDF a simple document viewer
- DuckDuckGo as your favorite search engine (.apk file link on the top of the page).
- Gibberbot, a chat client supporting the open XMPP protocol and OTR encryption. In addition, I recommend to install your personal XMPP server.

    So far so good, but I still miss the following features of iOS : by default support of calDAV and cardDAV, a nice reminders app (with calDAV support). There are some calDAV and cardDAV sync app but they are mainly not open-source (except caldav sync adapter) and they don't work as expected (automatic sync, two-ways sync...) -- I found DavDroid (carDAV and calDAV support) and Mirakel (task manager with calDAV sync) -- Google is unfortunately trying to force you to use your Google account, then everything is easier.

Interesting links :
- Me & My shadow
- Security in-a-box : How to use smartphones as securely as possible

Images :
- Google
- Android
- Peace Love and Happyness]]>
The Sebsauvage Effect http://www.ademcan.net/?d=2013/09/09/14/52/37-the-sebsauvage-effect http://www.ademcan.net/?d=2013/09/09/14/52/37-the-sebsauvage-effect Tue, 10 Sep 2013 09:00:00 +0200 The Sebsauvage Effect
sebsauvage effect (SE)  speaker.png [Ṧȅƃsọṿåij]
noun
1. Increase of Piwik's "Visits over time" counter
2. High score of sebsauvage.net in "Refferer Websites"
3. Suspect slow down on affected website

Origin :
This effect started approximately in the early 2012. It affected a very large number of blogs. The effect takes place once the affected blog/website is mentioned at Sebsauvage's Shaarli. Do not try to prevent the Sebsauvage effect, it is under no control. Simply enjoy it...

Representation :
piwik.png

Synonyms :
- There is no known synonym yet.

Idioms and Phrases :
- I have been sebsauvage'd.
- I got the SE !
- SE'd or not yet SE'd ?]]>
Install your personal XMPP server http://www.ademcan.net/?d=2013/06/17/13/51/17-install-your-personal-xmpp-server http://www.ademcan.net/?d=2013/06/17/13/51/17-install-your-personal-xmpp-server Sun, 08 Sep 2013 15:55:00 +0200 Install your personal XMPP server
XMPP_logo.png     Do you want to get rid of Whatsapp, Viber & co? Do you want to use an open protocol to communicate with your friends and family? Are you interested in encrypted communication? If yes, XMPP is what you are looking for.
    XMPP (or Jabber) is an open-source protocol for communication (a.k.a. chat). Many XMPP servers already exist, if you want to start using XMPP right now, you can register an account at dukgo.com. Otherwise, you can also install your own XMPP server and use it with your personal domain name, which is very nice and let you a complete control over your communication. You can even create XMPP accounts for your friends and family using your domain name. To do so, I will introduce you to the different steps to install ejabberd. Ejabberd is an open-source XMPP server written in Erlang and very well supported in Unix systems. I installed ejabberd on my server running Xubuntu and it is working very well.

1- Install ejabberd
    sudo apt-get install ejabberd

2- Once installed, you need to modify the configuration file:
    sudo emacs /etc/ejabberd/ejabberd.cfg

modify the line 58 to
    {acl, admin, {user, "[USERNAME]", "[DOMAIN]"}}.

and line 61 to
    {hosts, ["localhost","[DOMAIN]"]}.

3- Finally, you need to add an admin user from the command line
    ejabberctdk register USERNAME DOMAIN PASSWORD

restart your ejabberd server by typing
    sudo /etc/init.d/ejabberd start

You also need to open the ports 5222, 5280 and 5269 of your server to be able to access your account from outside.
To access the admin interface of your account go to
http://[DOMAIN]:5280/admin/

4- You can then use any chat client supporting the XMPP protocol to enjoy your new account 😉

For Desktop environment you can use Adium, Pidgin or Jitsi.
For mobile platforms, I recommend GibberBot and Beem (Android, available on F-Droid) or ChatSecure (iOS) both supporting OTR.

Useful link : JabberFr wiki (in French)
Image source : XMPP logo Wikimedia Commons

]]>
[FR] Ce blog est non-fumeur http://www.ademcan.net/?d=2013/08/26/13/34/10-fr-ce-blog-est-non-fumeur http://www.ademcan.net/?d=2013/08/26/13/34/10-fr-ce-blog-est-non-fumeur Tue, 27 Aug 2013 14:20:00 +0200 [FR] Ce blog est non-fumeur
noSmokingLogo.jpg     Quel est le problème de notre société avec la cigarette ? Je me demande toujours ce qui pousse autant de personnes à se "suicider" lentement. Oui, je pense que la cigarette est une sorte de suicide, un suicide "lent et doux".

    Pour les nerveux accros de la tétée nicotinisée qui me diront "Qu'est-ce ça peut te foutre espèce de puceaux de la cigarette ? Si je fume, je fume pour moi, et alors..." 😳
Je ne peux pas vous empêcher de faire ce que vous voulez de votre corps, de votre âme... c'est votre vie, faites-en ce que vous voulez. Mais ayez au moins la gentillesse, la politesse et le respect de laisser les non-fumeurs tranquille. Pourquoi suis-je obligé d'encaisser la fumée de votre cigarette, tous ces poisons que vous m'envoyez en plein dans la face, sans parler de l'odeur insupportable alors que je n'ai rien demandé.

-- Pour tous les autres fumeurs --
Je prends le train tous les jours pour me rendre au travail. Pourquoi attendez-vous devant la porte avec le briquet et la cigarette à la main l'ouverture de la porte pour vous empoisonner si impatiemment dès le prochain arrêt ?
Pourquoi en plein hiver, il faut impérativement que vous sortiez dehors vous gelez les coui...s pour pouvoir fumer ?
Pourquoi payez-vous autant d'argent pour mourir lentement ? N'y as-t-il pas d'autres moyens plus économiques (ceci est une blague bien évidemment) ?
Pourquoi empoisonnez-vous vos propres enfants ? Tous ces pauvres bébés qui naissent accro/toxicoman à cause de leur mère fumeuses (mon épouse étant infirmière en maternité je sais de quoi je parle). Et que dire des grands-parents qui dégoûtent leurs petits enfants avec leur odeur de cigarette (là aussi je sais de quoi je parle...)
Et vous les jeunes, est-ce vraiment un signe d'acceptation sociale que de fumer le plus tôt possible ? Bon j'arrête avec les jeunes, ça ne sert à rien, le problème venant de la source.
Des parents qui fument ne peuvent pas empêcher leurs enfants de fumer, ils n'en ont tout simplement pas le "droit". L'enfant aura simplement à dire : "Si fumer est si mauvais, pourquoi toi tu fumes alors ?"

    Est-ce si difficile d'arrêter ? Avez-vous déjà essayé ? Je veux dire essayer pour de vrai ? Pas comme ce camarade qui dit qu'il ne peut pas s'en passer plus de 2-3 heures et que quand le mois de ramadan arrive il est capable de ne pas fumer pendant toute une journée ? Peut-être n'avez-vous pas assez de convictions ? Je vais vous donner une bonne raison d'arrêter de fumer: la santé.
Ne vous gâchez pas la vie si vous avez la chance d'être en bonne santé. Dites-vous que d'autres personnes n'ont même pas cette chance et que si ces personnes étaient à votre place elles ne fumeraient pas de leur vie.

    Faites savoir à vos proches que vous voulez qu'elles arrêtent de fumer, dites-leur en insistant, encore et encore, sans en avoir marre, ne laissez pas tomber. Ne vous dites pas que c'est leur vie à eux et qu'ils en font ce qu'ils veulent (comme je le fais un peu plus haut pour me défendre des nerveux de la cigarette). Si les personnes que vous aimez sont mal, vous le serez aussi, tôt ou tard.

A.]]>
Longer php sessions in Ubuntu http://www.ademcan.net/?d=2013/05/26/09/12/42-longer-php-sessions-in-ubuntu http://www.ademcan.net/?d=2013/05/26/09/12/42-longer-php-sessions-in-ubuntu Fri, 19 Jul 2013 14:28:00 +0200 Longer php sessions in Ubuntu
    I just realized that the sessions of my web-apps were closing very rapidly, I had to login again every time I wanted to check my RSS (Leed) , my blog (Blogotext) or my links (Shaarli).
After some DDG search I managed to change the maximum lifetime of my sessions to remain connected for a longer period.
To do so open a terminal and run the following command
cd /usr/lib/php5/
You should see a file called maxlifetime, open it and modify the value of the max parameter (this value is in second). I changed it to 259200.

If you don't see the maxlifetime file, you can search for it by running
dpkg -L php5-common

Enjoy your web-apps without repetitive disconnections 😉

]]>
Keep SSH connection alive in OSX http://www.ademcan.net/?d=2013/05/26/09/39/38-keep-ssh-connection-alive-in-osx http://www.ademcan.net/?d=2013/05/26/09/39/38-keep-ssh-connection-alive-in-osx Mon, 27 May 2013 17:00:00 +0200 Keep SSH connection alive in OSX
    If you want to keep you SSH connection alive to avoid automatic disconnections it is very easy in OSX.
Open your terminal and run the following command:
cd ~/.ssh
Check if you have a file named "config". If not, run:
touch config 
to create the config file. Then, add the following line in the "config" file
ServerAliveInterval 60
With this command, the client (your computer) will send a null packet to the server every 60 seconds, thus keeping the SSH connection alive.
Enjoy your ∞ connection... 😉

]]>
Add sub-domains to your server with Apache http://www.ademcan.net/?d=2013/03/30/11/36/13-add-sub-domains-to-your-server-with-apache http://www.ademcan.net/?d=2013/03/30/11/36/13-add-sub-domains-to-your-server-with-apache Sat, 11 May 2013 11:46:00 +0200 Add sub-domains to your server with Apache
    If you have multiple services running on your server, and want to use sub-domains instead of sub-folders, here is a quick howto 😏
    I am running different services on my server at home, for example Shaarli and Leed. Instead of using different sub-folders of the main Apache /var/www/ folder, I preferred to use sub-domains. With sub-domains you obtain something like :
links.domain.com instead of domain.com/links
    To do so, you have to edit a file in the Apache configuration. In Ubuntu, the file is located under
/etc/apache2/sites-availabe/
Open the file named "default" with your preferred text editor and add the following lines at the end of the file
<VirtualHost *:80>
DocumentRoot /var/links/
ServerName links.domain.com
</VirtualHost>
The folder /var/links/ represent the installation folder of Shaarli.
Then, restart your Apache server
sudo /etc/init.d/apache2 restart
open your browser to links.domain.com
Enjoy ✅

]]>
Blogotext's Links, new section on the blog http://www.ademcan.net/?d=2013/04/16/05/23/13-blogotexts-links-new-section-on-the-blog http://www.ademcan.net/?d=2013/04/16/05/23/13-blogotexts-links-new-section-on-the-blog Tue, 16 Apr 2013 13:30:00 +0200 Blogotext's Links, new section on the blog
    I usually like to write detailed articles on my blog. However it often happens that I want to share a quick note, for example a basic command. In this situation, I am not going to write a complete article about how to use this command. That's why I decided to use Blogotext's (BT) Links as a links/notes sharing platform. BT Links is similar to Shaarli (installed on my own server for personal use).
    Here, I preferred BT Links instead of Shaarli because it fits better with my blog. I can manage my links from the blog's admin page, the graphical chart remains the same as on my blog and it is easier to use. From now on, you can follow my links/notes from my Links page, or using your favorite RSS reader from my Links RSS feed.
    I hope you'll enjoy 😉

]]>
Installing RStudio Server on Mac OS X Lion http://www.ademcan.net/?d=2013/04/05/20/25/28-installing-rstudio-server-on-mac-os-x-lion http://www.ademcan.net/?d=2013/04/05/20/25/28-installing-rstudio-server-on-mac-os-x-lion Sun, 14 Apr 2013 21:38:00 +0200 Installing RStudio Server on Mac OS X Lion
RStudio.png     RStudio is a great IDE for the R programming language. Two versions of RStudio are available, the desktop and the server edition. The desktop edition is a full version running locally and the server edition is running on a server with the graphical RStudio interface accessible from your web browser. At work I am using a Mac Pro as a personal server with all my data and my running scripts. To preserve my memory (RAM) on my laptop I wanted to run R from my server. Until now, I used the command line with ssh, but after testing RStudio I couldn't go back anymore :)
    You can install RStudio Server in any machine and access its graphical interface from any web browser. You will then access your normal IDE running R (on the server-side) with your Rhistory and R plots remaining there.
    Recently, I found the following tutorial about how to install RStudio server on Mac OS X Lion. It works very well, but I got an error at some point. After running the following command
sudo ./install-boost
    I got an error claiming that bootstrap.sh was not found. To continue the installation, you need to run bootstrap.sh by yourself. To do so, run the following commands from your terminal
cd $YOUR_RSTUDIO_INSTALLATION_FOLDER/dependencies/common/boost-build/boost_1_50_0
sudo ./bootstrap.sh
sudo ./bjam --prefix=/opt/rstudio-tools/boost/boost_1_50_0 toolset=clang variant=release threading=multi link=static install
    Of course, change the version of boost if your are using a more recent one. Don't forget to modify $YOUR_RSTUDIO_INSTALLATION_FOLDER by your Rstudio installation folder path.
Then, continue with the normal installation process, everything should go well.
    Browse to http://localhost:8787 login with your username and password you use for the computer where you installed RStudio server and enjoy ;)

image: rstudio.org

UPDATE: Opera is not supported by RStudio BUT works with IE if you install the Google Chrome Frame plugin. OMG :)

rstudioError.jpg

]]>
How to convert PDF to PNG from the command line on a Mac http://www.ademcan.net/?d=2013/04/10/14/23/32-how-to-convert-pdf-to-png-from-the-command-line-on-a-mac http://www.ademcan.net/?d=2013/04/10/14/23/32-how-to-convert-pdf-to-png-from-the-command-line-on-a-mac Wed, 10 Apr 2013 14:30:00 +0200 How to convert PDF to PNG from the command line on a Mac
    Instead of opening your PDF file with the Preview app (or other PDF reader) and export it to PNG, you can easily use the command line.
To do so, you need to use the sips (scriptable image processing system) command installed by default in Mac OS X. Open your terminal and run:
sips -s format png your_pdf_file.pdf --out your_png_file.png
The script also works for the jpeg format the same way.
Voilà ;)

source
 : straylink
A.P. Lawrence

]]>
Add tabulations in your articles with Blogotext http://www.ademcan.net/?d=2013/04/07/21/50/21-add-tabulations-in-your-articles-with-blogotext http://www.ademcan.net/?d=2013/04/07/21/50/21-add-tabulations-in-your-articles-with-blogotext Sun, 07 Apr 2013 23:25:00 +0200 Add tabulations in your articles with Blogotext
    I am using Blogotext as blog engine. It is a big pleasure to use it :) Blogotext is open-source, easy-to-use and very light, it works very well. I would like to thank again Timo for his great job.
    I am using paragraphs to organize my articles and make them clearer. In addition, I like to start each paragraph with a tabulation. Unfortunately, it is not easy to add tabulations using the default Blogotext editor. However, you can do it by forcing 4 spaces, such as
&nbsp;&nbsp;&nbsp;&nbsp;
    I wanted to make it easier, thus I decided to implement this option in my editor.
The default Blogotext editor's menu looks like :
BlogotextEditorWithoutIndent.jpg After implementing the tabulation option, you'll see an "indent" icon in the right-hand side of the "line-through" icon :
BlogotextEditorWithIndent.jpg

    To do so, you will have to modify two lines in two different files:

1 - First,
  • open the file /admin/form.php
  • go to line 581
  • add
    echo "\t".'<button id="button15" class="but" type="button" title="tab" onclick="insertTag(\'\&nb\s\p\;\&nb\s\p\;\&nb\s\p\;\&nb\s\p\;\',\'\',\'contenu\');"><span class="c"></span></button>'."\n";
2 - Second,
  • open the file /admin/style/style-ecrire.css
  • go to line 184
  • add
    #button15 span.c { background-image: url("format-bbcode/edit-indent.png"); }
If you want, you can modify the icon by choosing another one from your /admin/style/format-bbcode/ folder.
Enjoy ;)

]]>
HyperSwitch, an interesting app switcher alternative for Mac http://www.ademcan.net/?d=2013/04/06/01/55/46-hyperswitch-an-interesting-app-switcher-alternative-for-mac http://www.ademcan.net/?d=2013/04/06/01/55/46-hyperswitch-an-interesting-app-switcher-alternative-for-mac Sat, 06 Apr 2013 02:20:00 +0200 HyperSwitch, an interesting app switcher alternative for Mac
HyperSwitch.png     The default app switcher on Mac (cmd+tab) doesn't show the different opened windows for a given application. For example if you have multiple LibreOffice windows opened, you will only see one LibreOffice icon on the app switcher. I think this is a great productivity-killer :)
    When I was looking for an alternative, I first found Witch. Witch looks promising but it was too complicated for me. I also didn't like the vertical presentation of the app switcher.
    I then managed (I don't know how) to find Senebier :) I just don't understand what's written and didn't read any positive or negative comment about this app. I didn't installed it yet, but I contacted the author to ask if the source code will be available at any time or not.
    Finally, when following my feeds from LifeHacker, I stumbled upon an article about HyperSwitch. This app switcher is still in Beta but it actually works pretty well. Once you started the app switcher and moved to an app icon, you can:
  • press the down arrow to you see all the open windows and switch to one of them
  • press the up arrow to open a new window for that app or see the most recent files
    I am actually giving a try to HyperSwitch. It is a promising project, still in beta, but I am sure it will improve a lot very soon.

Source : HyperSwitch website
LifeHacker's article about HyperSwitch
Image : RoaringApps

]]>
Leed: your web-based open source RSS reader http://www.ademcan.net/?d=2013/02/25/10/08/41-leed-your-web-based-open-source-rss-reader http://www.ademcan.net/?d=2013/02/25/10/08/41-leed-your-web-based-open-source-rss-reader Wed, 03 Apr 2013 14:45:00 +0200 Leed: web-based open source RSS reader
Leeds logo     As you can see from my older posts, I am becoming more and more self-hosted every day :) I already have some interesting services running on my own server, don't worry I will write about all of them. Last time I wrote about Shaarli, a great and open source links managing tool. Today, I will introduce you to Leed (for Light Feed). Leed is an open source RSS reader alternative to Tiny Tiny RSS or RSS Lounge for example (and the almost dead Google Reader). I never tried any RSS readers before, I was mainly reading my feeds in Thunderbird, thus I cannot compare Leed to its existing alternatives. I can only say that Leed is great.

    I wanted a web-based RSS reader to access my feeds from any devices everywhere. I recently discovered Idleman's blog (in French) when he started his tutorials about the Raspberry Pi. Then I found his project's page and Leed.
Leed is an open source and light RSS feed reader. The installation is very easy.
The "only" requirements are:
- Apache server
- PHP 5.3
- MySQL

    Once installed, you can use crontab to automatically update your feeds, or you can do it manually if you don't want to deal with crontab. You can use keyboard shortcuts and personalize the interface using themes. You can easily implement your own themes. The default theme is responsive, thus you have an easy access and user-friendly interface in any of your devices (tablet, smartphone...).
One other great option is the link between Leed and Shaarli. If you are using Shaarli, you can automatically add any articles from your feeds to your Shaarli.
Leed is very simple and Leed works :)

When I was writing this post, I realized that Leed was only available in French. After asking the permission to the author (Idleman), I translated Leed and the installation process to English.

How to install Leed:
1 - Download the archive LeedEnglish.zip (Licence : CC by nc sa)
2 - Unzip and send the content to your server. Do a chmod 777 to the leed folder
3 - Go to the installation page http://mydomain.com/leed/install.php and follow the instructions
4 - Once the installation is finished, remove the install.php file for your security
5 - If you want to update automatically your feeds, put the following line into your crontab
Open crontab
sudo crontab -e
and add the following line for an hourly update :
0 * * * * wget -q -O /var/www/leed/logsCron "http://mydomain.com/leed/action.php?action=synchronize&code=your_synchronisation_code"
(adjust the link and your synchronisation code)
Be warn that too frequent updates can slow down the server.

Don't hesitate to ask if you have any question or remark ;)

A demo of Leed is available online here

]]>
Dynamic IP address with OVH http://www.ademcan.net/?d=2013/03/27/12/25/29-dynamic-ip-address-with-ovh http://www.ademcan.net/?d=2013/03/27/12/25/29-dynamic-ip-address-with-ovh Sat, 30 Mar 2013 11:35:00 +0100 Dynamic IP address with OVH

When I was configuring my server, I realized that I only had a dynamic IP address. At the time I had two options:
  • ask for a fixed IP address
  • deal with my dynamic IP address to get it updated when it changes
The first option was too expensive for me. Thus, I decided to go for the second one.

    Some tools exist to allow you to use a dynamic IP address with a specific domain name, such as DynDns or no.ip for example. Those tools provide scripts to update your IP address as soon as it changes. I could't find the free option for DynDns anymore, but there is a free option for no.ip with some limitations, but it should be find for a personal use.
    Before using one of the available general tools, I did some research about OVH (my registrar) and dynamic IP address. I then realized that OVH was providing some specific tools to update your IP information directly on your OVH manager. You can find more information in the DynHOST page.
    I am actually using the Ipcheck.py script available from the previous link. I just had to adapt the script for my own usage. I modified the dynhost script and changed the line
IP=`/sbin/ifconfig $IFACE | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "` 
(which was returning my local IP address)
to
IP=`/usr/bin/wget -qO- ipecho.net/plain`
to get the correct IP address used by OVH.
It actually works pretty well for me, Enjoy cool

]]>