lundi 1 juillet 2019

python, gcc, clang versions

Not always easy to know what are the versions that will be run. I add here some informations:

  py27-spyder has the following notes:
    To make the Python 2.7 version of spyder the one that is run  when you
    execute the commands without a version suffix, e.g. 'spyder', run:
    
    sudo port select --set spyder spyder-27
  py35-spyder has the following notes:
    To make the Python 3.5 version of spyder the one that is run  when you
    execute the commands without a version suffix, e.g. 'spyder', run:
    

    sudo port select --set spyder spyder-35

For gcc, situation is not very clear either:

(base) belinda:bin marcgirondot$ cd /usr/local/bin/

(base) belinda:bin marcgirondot$ gcc-7 --version
gcc-7 (Homebrew GCC 7.4.0_2) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(base) belinda:bin marcgirondot$ gcc-9 --version
gcc-9 (Homebrew GCC 9.1.0) 9.1.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(base) belinda:bin marcgirondot$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


jeudi 7 mars 2019

Snapz Pro sur un système français

Par défaut, lorsque Snapz pro d'Ambrosia Software tourne sur un système pour lequel il n'est pas localisé, il se met par défaut en russe !

Pour l'avoir en anglais, d'abord quitter l'application en passant par le moniteur d'application, faire un clic droit sur le nom de l'application et ouvrir le paquet.

Ouvrir le dossier Contents/Resources.

Dupliquer le dossier en.lproj et renommer le en fr.lproj

Redémarrer Snapz pro... et c'est bon.

Vous pouvez même vous amuser à traduire les chaînes de caractères en français.

jeudi 1 mars 2018

Accès aux chaînes de la FREEBOX sur VLC 3.x

L'astuce consistant à intégrer le fichier Freebox.lua au sein de l'application vlc 2.x ne marche plus avec la version 3.
La solution la plus simple consiste à charger le fichier playlist.m3u à partir de ce lien:
http://mafreebox.freebox.fr/freeboxtv/playlist.m3u
(le plus simple est de charger la page, et faire Enregistrer sous... et choisissez le format code source avec le playlist.m3u. Ne pas mettre l'extension .txt comme proposé).
Mettre le fichier en sureté dans un dossier et dans vlc 3.x, faites un glisser déposer sur la fenêtre bibliothèque-médiathèque.

La liste des chaînes sera toujours disponible à partir de cet onglet.


mercredi 31 janvier 2018

Update locate database

In terminal:
sudo /usr/libexec/locate.updatedb

Or use onyx from Titanium
https://www.titanium-software.fr/fr/onyx.html

jeudi 22 juin 2017

Install R 3.4.0 from source on ubuntu 16.04

This tutorial is modified from https://askubuntu.com/questions/798335/how-you-install-r-3-2-2-in-ubuntu-14-04-lts

cd $HOME
wget https://cran.rstudio.com/src/base/R-3/R-3.4.0.tar.gz
tar xvf R-3.4.0.tar.gz
cd R-3.4.0
sudo apt-get install gcc fort77 aptitude
sudo aptitude install g++
sudo aptitude install xorg-dev
sudo aptitude install libreadline-dev
sudo aptitude install gfortran
gfortran --version
sudo apt install libpcre3-dev liblzma-dev libbz2-dev
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
sudo apt-get install texlive-base
sudo apt-get install texinfo
sudo apt-get install texlive-fonts-extra
sudo apt-get install libcurl4-openssl-dev
java -version
# need to build shared library (--enable-R-shlib)
# the --enable-R-shlib option is needed for the RStudio IDE to work
sudo ./configure --enable-R-shlib      
sudo make
sudo make install
R --version
cd $HOME
rm R-3.4.0.tar.gz
sudo rm -rf R-3.4.0

Now you can install Rstudio:

wget https://download1.rstudio.org/rstudio-1.0.143-i386.deb
sudo gdebi -n rstudio-1.0.143-i386.deb

rm rstudio-1.0.143-i386.deb

mardi 13 juin 2017

No ssh connection: REMOTE HOST IDENTIFICATION HAS CHANGED

When you try to connect using ssh in terminal to a remote host, if you get this message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:wJp/vYtoiAonG/LRyXK6fYuzcCb7WQZF1N9tlxVVOsg.
Please contact your system administrator.



you must edit this file:
sudo vi ~/.ssh/known_hosts
And remove the line corresponding to the faulty ip address.

mercredi 31 mai 2017

Install Command Line Interface for openstack on MacOSX Sierra 10.12.5

The documents present in the openstack server to install Command Line Interface are not uptodate for MacOSX:
https://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html

 Here is the solution. It has been tested in Sierra 10.12.5.

First be sure that you have python install. In terminal, enter:
belinda:~ marcgirondot$ python --version
Python 2.7.13

Any version higher than 2.7 should work. If you have not, when installing Xcode, python should be included.

Install Xcode from app store (take care, it is 4 GB !)
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12

Open Xcode from application folder and install line command tools in terminal:
sudo xcode-select --install

Validate the installation in terminal using:
sudo xcodebuild -license

Install pip:
sudo easy_install pip

Upgrade pip:
sudo -H pip install --upgrade pip --ignore-installed six

Install different components of openstack:

# Installation 
sudo -H pip install python-openstackclient --ignore-installed six

sudo -H pip install --upgrade python-novaclient --ignore-installed six
sudo -H pip install --upgrade python-cinderclient --ignore-installed six
sudo -H pip install --upgrade python-neutronclient --ignore-installed six
sudo -H pip install --upgrade python-glanceclient --ignore-installed six
# for nova
sudo -H pip install --upgrade netifaces --ignore-installed six

To run it, you must define environment variables as described here:
https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html

It works for me !

To upgrade openstack client:
sudo -H pip install --upgrade python-openstackclient --ignore-installed six