September 8, 2013 ademcan No comments

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

Source: New feed

August 27, 2013 ademcan No comments

[FR] Ce blog est non-fumeur

[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.
Source: New feed

July 19, 2013 ademcan No comments

Longer php sessions in Ubuntu

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 😉

Source: New feed

May 27, 2013 ademcan No comments

Keep SSH connection alive in OSX

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… 😉

Source: New feed

May 11, 2013 ademcan No comments

Add sub-domains to your server with Apache

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 ✅

Source: New feed

April 16, 2013 ademcan No comments

Blogotext’s Links, new section on the blog

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 😉

Source: New feed

April 14, 2013 ademcan No comments

Installing RStudio Server on Mac OS X Lion

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

Source: New feed

April 10, 2013 ademcan 6 comments

How to convert PDF to PNG from the command line on a Mac

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à 😉
UPDATE: this solution works for the first page of the PDF only (thanks Joe Papa for the feedback).


source
 : straylink
A.P. Lawrence

Source: New feed

April 7, 2013 ademcan No comments

Add tabulations in your articles with Blogotext

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('&nbsp;&nbsp;&nbsp;&nbsp;','','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 😉

Source: New feed

April 6, 2013 ademcan No comments

HyperSwitch, an interesting app switcher alternative for Mac

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

Source: New feed