Ferramentas de usuario

Ferramentas do sitio


gl:guias:debian_jessie_post_instalacion

Diferenzas

Isto amosa as diferenzas entre a revisión seleccionada e a versión actual da páxina.


Revisión previa
gl:guias:debian_jessie_post_instalacion [2021/04/16 20:41] (actual) – edición externa 127.0.0.1
Liña 1: Liña 1:
 +====== Debian Jessie, post instalación ======
 +
 +__TRABALLO EN MARCHA NON ESTÁ REMATADA A VERSIÓN EN GALEGO__
 +
 +===== Introducción =====
 +
 +O meu portátil é un ordenador Acer 5755G coas siguientes características:
 +
 +  * Core i5 2430M 2.4GHz
 +  * NVIDIA Geforce GT 540M
 +  * 8Gb RAM
 +  * 750Gb HD
 +
 +Meu portátil equipa unha tarxeta _Nvidia Geforce GT540M_ que resulta pertencer a unha pola morta na árbore de desenrolo de Nvidia.
 +
 +A gráfica é unha Nvidia Optimus, unha tarxeta híbrida que traballaba perfectamente en Ubuntu 14.04 usando Bumblebee.
 +
 +No upgrade a Ubuntu **Xenial Xerus**  a miña gráfica deixou de traballar correctamente có método de instalación de _Bumblebee_ que viña usando. E mesmo con todo-los que fun quen de probar.
 +
 +Ademais atopei problemas insolubles (para min) na instalación do Virtual Box así que decidín voltar a Debian.
 +
 +Para facer a actualización do sistema optei por desinstalar o dvd e montar no seu sitio un disco SSD nun Caddie para Acer. A instalación foi moi doada, e ainda que o portátil arranca perfectamente de cualquera dos dous discos, finalmente optei por instalar o SSD na bahía interna do HD orixinal e pasar o HD orixinal ao caddie.
 +
 +Unha vez instalado o novo sistema operativo, o primeiro foi a instalación do Bumblebee para probar que funcionaba normalmente.
 +
 +<code>
 +sudo apt-get install firmware-linux-nonfree Bumblebee-nvidia primus
 +</code>
 +
 +===== Cambiar as opcións do idioma =====
 +
 +Executamos:
 +
 +<code>
 +sudo dpkg-reconfigure locales
 +</code>
 +
 +Despois só teremos que cambiar a selección do idioma na configuración de Gnome.
 +
 +Tra-la reconfiguración teremos que rearrancar Gnome y renomeará todos-los directorios do sistema.
 +
 +
 +===== Xestión de paquetes =====
 +
 +Instalamos //aptitude//, //synaptic// e //gdebi//
 +
 +<code>
 +sudo apt-get install aptitude
 +sudo apt-get install synaptic
 +sudo apt-get install gdebi
 +</code>
 +
 +Cambiamos as opcións de //aptitude// para que **non instale** os paquetes recomendados.
 +
 +==== Quitamos o cdrom dos sources.list ====
 +
 +Editamos o ficheiro ///etc/apt/sources.list// e comentamos as lineas do cdrom.
 +
 +
 +==== Habilitamos os backports e multimedia ====
 +
 +=== Backports: ===
 +
 +<code>
 +sudo cat> /etc/apt/sources.list.d/backports.list <<EOF
 +# backports
 +deb http://ftp.debian.org/debian/ jessie-backports main contrib non-free
 +EOF
 +</code>
 +
 +=== Multimedia: ===
 +
 +<code>
 +sudo cat>> /etc/apt/sources.list.d/multimedia.list <<EOF
 +# multimedia
 +deb http://www.deb-multimedia.org/ jessie main non-free
 +EOF
 +
 +sudo apt-get -y --allow-unauthenticated install --reinstall deb-multimedia-keyring
 +</code>
 +
 +E actualizamos:
 +
 +<code>
 +sudo aptitude update
 +</code>
 +
 +===== Instalación de varios paquetes útiles =====
 +
 +==== Programas de utilidade e uso frecuente ====
 +
 +=== Menulibre ===
 +
 +Un editor de menús para Gnome, poderemos xerar os arquivos desktop para cualquera aplicación. Moito mais completo que //alacarte// a outra alternativa.
 +
 +<code>
 +sudo apt-get install menulibre
 +</code>
 +
 +=== Terminator ===
 +
 +Terminator é un emulador de terminal moi completo y moi flexible. Instalaremolos dende //aptitude//
 +
 +<code>
 +sudo aptitude install terminator python-keybinder
 +</code>
 +
 +=== Keepass2 ===
 +
 +Instalado //keepass2// dende Debian
 +
 +<code>
 +sudo aptitude install keepass2
 +</code>
 +
 +=== gksu ===
 +
 +Un //sudo// en modo gráfico:
 +
 +<code>
 +sudo aptitude install gksu
 +</code>
 +
 +**Moi importante** executar ''%%gksu-properties%%'' e escoller o modo ''%%sudo%%'' e non o de ''%%su%%''. Evitaremos problemas coa instalación de moitas aplicacións.
 +
 +=== Diskmanager ===
 +
 +Para xestionar discos portátiles, memorias, etc,.
 +
 +<code>
 +sudo apt-get install ntfs-3g disk-manager
 +</code>
 +=== Gnucash ===
 +
 +Finanzas en linux
 +
 +<code>
 +sudo apt-get -t jessie-backports install gnucash
 +</code>
 +
 +=== Ferramentas sync ===
 +
 +Facede sempre //backups//!
 +
 +<code>
 +sudo apt-get install rsync grsync
 +</code>
 +
 +=== Dropbox ===
 +
 +Baixado o paquete Debian dende a páxina [[https://www.dropbox.com/install-linux|web de Dropbox]], instalado o paquete con //packageinstall//, e decir, simplemente pinchando dende o xestor de ficheiros.
 +
 +=== Compresores et al ===
 +
 +<code>
 +sudo apt-get install rar unrar zip unzip unace bzip2 lzop p7zip p7zip-full p7zip-rar
 +</code>
 +
 +=== Freeplane ===
 +
 +Mellor que [[http://freemind.sourceforge.net/wiki/index.php/Main_Page|Freemind]] (na miña opinión). O baile de sempre, descarregar da [[http://www.freeplane.org/|web]], descomprimir en //~/apps// e crear o lanzador con //MenuLibre//. Todo-los ficheiros que tiña feitos con //Freemind// podense usar directamente co //Freeplane//.
 +
 +=== Telegram desktop ===
 +
 +O cliente de mensaxería de Telegram. Descarregado dende a web, instalado en //~/apps//
 +
 +===== Internet =====
 +
 +==== Chrome y Chromium ====
 +
 +Instalado o Chrome engadindo as fontes e executando //aptitude//. Non me lembro como as engadin.
 +
 +No ficheiro ///etc/apt/sources.list.d/google-chrome.list//, teño este contido:
 +
 +<code>
 +###
 +###
 +###
 +###
 +### THIS FILE IS AUTOMATICALLY CONFIGURED ###
 +# You may comment out this entry, but any other modifications may be lost.
 +deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
 +</code>
 +
 +
 +Para instalar executamos:
 +
 +<code>
 +sudo aptitude install google-chrome-stable
 +sudo aptitude install chromium
 +</code>
 +
 +==== Tor ====
 +
 +Baixado o //zip// dende a [[https://www.torproject.org|web oficial]], e descomprimido no directorio //~/apps// 
 +
 +O ficheiro desktop,  que ven incluido no paquete, copieino a //~/.local/share/applications//
 +
 +==== openvpn ====
 +
 +Baseado na web [[https://nixbsd.wordpress.com/2017/04/01/freebsd-10-2-configure-openvpn-client/|nix/bsd]].
 +
 +Ainda non rematei a configuración.
 +
 +
 +==== Deluge ====
 +
 +A miña aplicación preferida para descarregar //torrents//
 +
 +Instalamos dende aptitude
 +
 +<code>
 +sudo aptitude install deluge
 +xdg-mime default deluge.desktop x-scheme-handler/magnet
 +</code>
 +
 +==== TiddlyDesktop ====
 +
 +//Tiddly// é unha wiki auto-contida e moi flexible, ten unha morea de versións, adaptadas para diferentes usos. Usoa dende fai uns anos como caderno de bitácora persoal, pero non estaba a seguir a sua evolución.
 +
 +Descarreguei:
 +
 +  * [[http://tiddlywiki.com/|Tiddlywiki]] . A este instaleine tamén os  plugins de //FontAwesome// e //WikiMap//, este será o meu novo caderno de bitácora.
 +  * [[http://gsd5.tiddlyspot.com/|GSD5]] un //TiddlyWiki// adaptado a //GTD//
 +
 +Ademáis instalei a aplicación  [[https://github.com/Jermolene/TiddlyDesktop|TiddlyDesktop]], baseada en //node webkit// que simplifica o tema dos backups das tuas wikis (en teoría).
 +
 +Como facemos sempre descomprimimos en  //~/apps// e creamos un lanzador con //MenuLibre//.
 +
 +
 +
 +===== Gráficos =====
 +
 +==== Inkscape ====
 +
 +O programa libre para creación e edición de gráficos vectoriais.
 +
 +<code>
 +apt-cache policy inkscape
 +apt-get -t jessie-backports install inkscape
 +aptitude install ink-generator
 +</code>
 +==== LibreCAD e FreeCAD ====
 +
 +Imprescidibles para a creación e diseño en 2D e 3D.
 +
 +Instalado dende os repos con aptitude
 +
 +<code>
 +apt-get install librecad
 +
 +apt-get -t jessie-backports install freecad
 +</code>
 +==== Gimp ====
 +
 +O programa libre por excelencia de edición e retocado de imáxenes.
 +
 +Gimp xa estaba instalado por defecto, instalamos ademais o gimp data-extra
 +
 +<code>
 +sudo aptitude install gimp-plugin-registry gimp-texturize gimp-data-extras gimp-gap
 +
 +</code>
 +==== Shutter ====
 +
 +Un programa de captura de pantallas que permite editalas rápidamente:
 +
 +<code>
 +sudo aptitude install shutter libgoo-canvas-perl
 +</code>
 +
 +==== Pencil ====
 +
 +É unha aplicación java para facer bocetos de páxinas web, probablemente non a necesitas.
 +
 +Descarregar a derradeira versión (paquete Debian) dende [[http://pencil.evolus.vn/|la página web]]. Instalamolo e listo. Pode dar problemas si usamos Iceweasel, xa que o paquete depende de Firefox. Mais info [[https://www.linuxwebzone.com/install-pencil-on-debian/|aquí]]
 +
 +==== Fotografía ====
 +
 +=== Rawtherapee y Darktable: Tratamiento de imágenes fotogŕaficas ===
 +
 +Se gostas da fotografía e/ou tes unha cámara reflex precisas probar estas aplicacións.
 +
 +<code>
 +sudo aptitude install icc-profiles icc-profiles-free
 +sudo aptitude install rawtherapee darktable
 +</code>
 +
 +=== Stopmotion ===
 +
 +Para facer pelis de //stopmotion//
 +
 +<code>
 +sudo aptitude install stopmotion vgrabbj dvgrab
 +</code>
 +TODO: Probar qStopmotion
 +
 +==== Audio e video ====
 +
 +=== Codecs ===
 +
 +Instalamos os codecs
 +
 +<code>
 +sudo apt-get install libav-tools
 +
 +sudo apt-get install faad gstreamer0.10-ffmpeg gstreamer0.10-x \
 +gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-base \
 +gstreamer0.10-plugins-good gstreamer0.10-plugins-bad \
 +gstreamer0.10-plugins-ugly ffmpeg lame twolame vorbis-tools \
 +libquicktime2 libfaac0 libmp3lame0 libxine2-all-plugins libdvdread4 \
 +libdvdnav4 libmad0 sox libxvidcore4 libstdc++5
 +
 +sudo apt-get install w64codecs
 +</code>
 +
 +=== Reproductores de música ===
 +
 +Instalamos //Clementine//, //decibel//, //audacity//, //soundconverter//:
 +
 +<code>
 +sudo aptitude install clementine gstreamer0.10-plugins-bad
 +sudo aptitude install decibel-audio-player audacity soundconverter
 +</code>
 +
 +=== Gpodder ===
 +
 +Instalamos //gpodder// para xestionar os nosos podcast, ainda que non é imprescindible, //Clementine// tamén nos vale como xestor de podcasts.
 +
 +<code>
 +sudo aptitude install gpodder
 +</code>
 +
 +=== Spotify ===
 +
 +Cliente de //Spotify//, se é que o usas.
 +
 +<code>
 +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
 +echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
 +sudo aptitude update
 +sudo aptitude install spotify-client
 +</code>
 +=== Video ===
 +
 +Instalamos utilidades de video:
 +
 +<code>
 +sudo aptitude install vlc browser-plugin-vlc
 +sudo aptitude install recordmydesktop gtk-recordmydesktop
 +sudo aptitude install vokoscreen
 +sudo aptitude install handbrake handbrake-cli handbrake-gtk
 +</code>
 +
 +===== Seguridade =====
 +==== Lector de DNIe ====
 +
 +
 +Para poder traballar co noso DNI electrónico, instalamos:
 +
 +<code>
 +sudo aptitude libccid install pcscd pcsc-tools
 +</code>
 +Como root ejecutamos //pcsc_scan// ((É posible que sexa necesario reiniciar o pc antes de seguir
 +)):
 +
 +<code>
 +root@rasalhague:~# pcsc_scan 
 +PC/SC device scanner
 +V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
 +Compiled with PC/SC lite version: 1.8.11
 +Using reader plug'n play mechanism
 +Scanning present readers...
 +Waiting for the first reader...
 +</code>
 +Se insertamos o lector de DNIe veremos algo coma esto:
 +
 +<code>
 +root@rasalhague:~# pcsc_scan 
 +PC/SC device scanner
 +V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
 +Compiled with PC/SC lite version: 1.8.11
 +Using reader plug'n play mechanism
 +Scanning present readers...
 +Waiting for the first reader...found one
 +Scanning present readers...
 +0: C3PO LTC31 v2 (11061005) 00 00
 +
 +Wed Jan 25 01:17:20 2017
 +Reader 0: C3PO LTC31 v2 (11061005) 00 00
 +  Card state: Card removed, 
 +</code>
 +
 +De novo, se insertamos un DNI veremos que se lé a información da tarxeta insertada:
 +
 +<code>
 +Reader 0: C3PO LTC31 v2 (11061005) 00 00
 +  Card state: Card inserted, 
 +y mas rollo
 +</code>
 +
 +Instalamos agora:
 +
 +<code>
 +aptitude install pinentry-gtk2 opensc
 +</code>
 +
 +==== Wire ====
 +
 +Un cliente seguro de mensaxeria.
 +
 +<code>
 +sudo aptitude install apt-transport-https
 +wget -q https://wire-app.wire.com/linux/releases.key -O- | sudo apt-key add -
 +echo "deb https://wire-app.wire.com/linux/debian stable main" | sudo tee /etc/apt/sources.list.d/wire-desktop.list
 +sudo aptitude update
 +sudo aptitude install wire-desktop
 +</code>
 +===== Documentos =====
 +
 +==== Calibre ====
 +
 +O mellor programa para xestionar libros electrónicos.
 +
 +Executamos os comandos suxeridos na páxina web:
 +
 +<code>
 +sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py \
 +| sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
 +</code>
 +
 +Para usar o Calibre co Kobo Glo:
 +
 +  * Desactivamos todo-los plugin de Kobo excepto o //Kobo Touch Extended//
 +  * Creamos unha columna //MyShelves// co identificativo //#myshelves//
 +  * Nas opcións do plugin:
 +    * Na opción //Collection columns// engadimos as columnas //series,#myshelves//
 +    * Marcamos as opcións //Create collections// e //Delete empy collections//
 +    * //Update metadata on device// e //Set series information//
 +
 +Alguns enlaces útiles:
 +
 +  * https://github.com/jgoguen/calibre-kobo-driver
 +  * http://www.lectoreselectronicos.com/foro/showthread.php?15116-Manual-de-instalaci%C3%B3n-y-uso-del-plugin-Kobo-Touch-Extended-para-Calibre
 +  * http://www.redelijkheid.com/blog/2013/7/25/kobo-glo-ebook-library-management-with-calibre
 +  * https://www.netogram.com/kobo.htm
 +
 +==== Pandoc ====
 +
 +Pandoc é un traductor entre formatos de documento. Está escrito en Python e é incriblemente útil. De feito, este documento está escrito usando o //Pandoc//.
 +
 +Instalado o Pandoc descarregando o paquete //deb// dende a páxina web do proxecto Pandoc.
 +
 +Descargamos las plantillas desde [[https://github.com/jgm/pandoc-templates|o repo]] executando os seguintes comandos:
 +
 +<code>
 +cd ~/.pandoc
 +git clone https://github.com/jgm/pandoc-templates templates
 +</code>
 +==== Zotero ====
 +
 +Zotero é un programa que permite manter unha ou varias bibliografías con referencias a libros, páxinas web ou documentos electrónicos.
 +
 +Instalado o Zotero Standalone dende a [[https://www.zotero.org/|páxina web do programa]]
 +
 +==== Vanilla LaTeX ====
 +
 +O LaTeX do Debian está un pouquiño anticuado, se queres usar unha versión actualizada terás que aplicar [[http://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu|esta receta]].
 +
 +<code>
 +cd ~
 +mkdir tmp
 +cd tmp
 +wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
 +tar xzf install-tl-unx.tar.gz
 +cd install-tl-xxxxxx
 +</code>
 +A parte xxxxxx varía en función do estado da derradeira versión do LaTeX dispoñible.
 +
 +<code>
 +sudo ./install-tl
 +</code>
 +Unha vez lanzada a instalación poderemos desmarcar as opcións que instalan a documentación e as fontes. Teremos que consultar a documentación //on line// pero aforraranos prácticamente o 50% do espacio necesario. No meu caso sen //doc// nin //src// ocupa 2,3Gb
 +
 +<code>
 +mkdir -p /opt
 +sudo ln -s /usr/local/texlive/2016/bin/* /opt/texbin
 +</code>
 +
 +Para rematar a instalación engadimos **/opt/texbin** ao //path//.
 +
 +=== Falsificando paquetes ===
 +
 +Xa temos o **texlive** instalado, agora precisamos que o xestor de paquetes o rexistre como instalado.
 +
 +<code>
 +sudo apt-get install equivs --no-install-recommends
 +mkdir -p /tmp/tl-equivs && cd /tmp/tl-equivs
 +equivs-control texlive-local
 +</code>
 +Para facelo mais doado podemos descarregar un ficheiro xa preparado, executando:
 +
 +<code>
 +wget http://www.tug.org/texlive/files/debian-equivs-2015-ex.txt
 +/bin/cp -f debian-equivs-2015-ex.txt texlive-local
 +</code>
 +Editamos a versión e
 +
 +<code>
 +equivs-build texlive-local
 +sudo dpkg -i texlive-local_2015-1_all.deb
 +</code>
 +Todo listo, agora podemos instalar cualquer paquete que dependa de //texlive//
 +
 +=== Fontes ===
 +
 +Para deixar dispoñibles as fuentes opentype y truetype que veñen con //texlive// para o resto de aplicacións:
 +
 +<code>
 +sudo cp $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
 +gksudo gedit /etc/fonts/conf.d/09-texlive.conf
 +</code>
 +Borramos a línea:
 +
 +<code>
 +<dir>/usr/local/texlive/2016/texmf-dist/fonts/type1</dir>
 +</code>
 +E executamos:
 +
 +<code>
 +sudo fc-cache -fsv
 +</code>
 +=== Actualizacións ===
 +
 +Para actualizar o noso latex á derradeira versión de todo-los paquetes:
 +
 +<code>
 +sudo /opt/texbin/tlmgr update --self
 +sudo /opt/texbin/tlmgr update --all
 +</code>
 +Tamén podemos lanzar o instalador gráfico con:
 +
 +<code>
 +sudo /opt/texbin/tlmgr --gui
 +</code>
 +Para usar o instalador gráfico hai que instalar previamente:
 +
 +<code>
 +sudo apt-get install perl-tk --no-install-recommends
 +</code>
 +=== Lanzador para o actualizador de texlive ===
 +
 +<code>
 +mkdir -p ~/.local/share/applications
 +/bin/rm ~/.local/share/applications/tlmgr.desktop
 +cat > ~/.local/share/applications/tlmgr.desktop << EOF
 +[Desktop Entry]
 +Version=1.0
 +Name=TeX Live Manager
 +Comment=Manage TeX Live packages
 +GenericName=Package Manager
 +Exec=gksu -d -S -D "TeX Live Manager" '/opt/texbin/tlmgr -gui'
 +Terminal=false
 +Type=Application
 +Icon=system-software-update
 +EOF
 +</code>
 +Ollo! Hai que deixar instalado o gksu (ainda que debería estar de antes se sigues este doc)
 +
 +<code>
 +sudo aptitude install gksu
 +</code>
 +==== Emacs ====
 +
 +Emacs: o mellor editor.
 +
 +Instalado emacs dende os repos:
 +
 +<code>
 +sudo aptitude install emacs
 +</code>
 +Instalamos los paquetes //markdown-mode//, //mardown-plus// y //pandoc-mode// desde el menú de gestión de paquetes de **emacs**.
 +
 +Como estou a aprender a linguaxe de programación D, instalamos tamén //d-mode// y //flymake-d// (posiblemente ti non os precisas)
 +
 +Despois de probar //flymake// e //flycheck// gostei mais de //flycheck// Hai unha sección de configuración no fichero //.emacs// de exemplo para cada un deles, pero a de //flymake// está comentada.
 +
 +Configuramos o ficheiro //.emacs// definindo algunhas preferencias, algunhas funcións útiles e engadimos oríxenes extra de paquetes.
 +
 +<code>
 +(custom-set-variables
 + ;; custom-set-variables was added by Custom.
 + ;; If you edit it by hand, you could mess it up, so be careful.
 + ;; Your init file should contain only one such instance.
 + ;; If there is more than one, they won't work right.
 + '(show-paren-mode t))
 +(custom-set-faces
 + ;; custom-set-faces was added by Custom.
 + ;; If you edit it by hand, you could mess it up, so be careful.
 + ;; Your init file should contain only one such instance.
 + ;; If there is more than one, they won't work right.
 + )
 +
 +;;------------------------------------------------------------
 +;; Some settings
 +(setq inhibit-startup-message t) ; Eliminate FSF startup msg
 +(setq frame-title-format "%b"  ; Put filename in titlebar
 +;(setq visible-bell t)            ; Flash instead of beep
 +(set-scroll-bar-mode 'right)     ; Scrollbar placement
 +(show-paren-mode t)              ; Blinking cursor shows matching parentheses
 +(setq column-number-mode t)  ; Show column number of current cursor location
 +(mouse-wheel-mode t)         ; wheel-mouse support
 +
 +(setq fill-column 78)
 +(setq auto-fill-mode t)          ; Set line width to 78 columns...
 +
 +(setq-default indent-tabs-mode nil)       ; Insert spaces instead of tabs
 +(global-set-key "\r" 'newline-and-indent) ; turn autoindenting on
 +;(set-default 'truncate-lines t)           ; Truncate lines for all buffers
 +;(require 'iso-transl)                     ; doesn't seems to be needed in debian
 +
 +
 +;;------------------------------------------------------------
 +;; Some useful key definitions
 +(define-key global-map [M-S-down-mouse-3] 'imenu)
 +(global-set-key [C-tab] 'hippie-expand)                    ; expand
 +(global-set-key [C-kp-subtract] 'undo)                     ; [Undo] 
 +(global-set-key [C-kp-multiply] 'goto-line)                ; goto line
 +(global-set-key [C-kp-add] 'toggle-truncate-lines)         ; goto line
 +(global-set-key [C-kp-divide] 'delete-trailing-whitespace) ; delete trailing whitespace
 +(global-set-key [C-kp-decimal] 'completion-at-point)       ; complete at point
 +(global-set-key [C-M-prior] 'next-buffer)                  ; next-buffer
 +(global-set-key [C-M-next] 'previous-buffer)               ; previous-buffer
 +
 +;;------------------------------------------------------------
 +;; Set encoding
 +(prefer-coding-system 'utf-8)
 +(setq coding-system-for-read 'utf-8)
 +(setq coding-system-for-write 'utf-8)
 +
 +;;------------------------------------------------------------
 +;; Maximum colors
 +(cond ((fboundp 'global-font-lock-mode)  ; Turn on font-lock (syntax highlighting)
 +       (global-font-lock-mode t)               ; in all modes that support it
 +       (setq font-lock-maximum-decoration t))) ; Maximum colors
 +
 +;;------------------------------------------------------------
 +;; Use % to match various kinds of brackets...
 +;; See: http://www.lifl.fr/~hodique/uploads/Perso/patches.el
 +
 +(global-set-key "%" 'match-paren)               ; % key match parents
 +(defun match-paren (arg)
 +  "Go to the matching paren if on a paren; otherwise insert %."
 +  (interactive "p")
 +  (let ((prev-char (char-to-string (preceding-char)))
 +        (next-char (char-to-string (following-char))))
 +    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
 +          ((string-match "[\]})>]" prev-char) (backward-sexp 1))
 +          (t (self-insert-command (or arg 1))))))
 +
 +;;------------------------------------------------------------
 +;; The wonderful bubble-buffer
 +(defvar LIMIT 1)
 +(defvar time 0)
 +(defvar mylist nil)
 +
 +(defun time-now ()
 +   (car (cdr (current-time))))
 +
 +(defun bubble-buffer ()
 +   (interactive)
 +   (if (or (> (- (time-now) time) LIMIT) (null mylist))
 +       (progn (setq mylist (copy-alist (buffer-list)))
 +          (delq (get-buffer " *Minibuf-0*") mylist)
 +          (delq (get-buffer " *Minibuf-1*") mylist)))
 +   (bury-buffer (car mylist))
 +   (setq mylist (cdr mylist))
 +   (setq newtop (car mylist))
 +   (switch-to-buffer (car mylist))
 +   (setq rest (cdr (copy-alist mylist)))
 +   (while rest
 +     (bury-buffer (car rest))
 +     (setq rest (cdr rest)))
 +   (setq time (time-now))) 
 +
 +(global-set-key [f8] 'bubble-buffer)    ; win-tab switch the buffer
 +
 +(defun geosoft-kill-buffer ()
 +   ;; Kill default buffer without the extra emacs questions
 +   (interactive)
 +   (kill-buffer (buffer-name))
 +   (set-name)) 
 +(global-set-key [C-delete] 'geosoft-kill-buffer) 
 +
 +;;----------------------------------------------------------------------
 +;; MELPA and others
 +(when (>= emacs-major-version 24)
 +  (require 'package)
 +  (package-initialize)
 +  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
 +  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/") t)
 +  (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/") t)
 +  )
 +
 +; (add-to-list 'load-path "~/.emacs.d/")
 +
 +;;----------------------------------------------------------------------
 +;; Packages installed via package
 +;;------------------------------
 +
 +;;----------------------------------------------------------------------
 +;; flymake and flycheck installed from package
 +;; I think you have to choose only one
 +
 +;; (require 'flymake)
 +;; ;;(global-set-key (kbd "C-c d") 'flymake-display-err-menu-for-current-line)
 +;; (global-set-key (kbd "C-c d") 'flymake-popup-current-error-menu)
 +;; (global-set-key (kbd "C-c n") 'flymake-goto-next-error)
 +;; (global-set-key (kbd "C-c p") 'flymake-goto-prev-error)
 +
 +(add-hook 'after-init-hook #'global-flycheck-mode)
 +(global-set-key  (kbd "C-c C-p") 'flycheck-previous-error)
 +(global-set-key  (kbd "C-c C-n") 'flycheck-next-error)
 +
 +;; Define d-mode addons
 +;; Activate flymake or flycheck for D
 +;; Activate auto-complete-mode
 +;; Activate yasnippet minor mode if available
 +;; Activate dcd-server
 +(require 'ac-dcd)
 +(add-hook 'd-mode-hook
 +          (lambda()
 +            ;;(flymake-d-load)
 +            (flycheck-dmd-dub-set-variables)
 +            (require 'flycheck-d-unittest)
 +            (setup-flycheck-d-unittest)
 +            (auto-complete-mode t)
 +            (when (featurep 'yasnippet)
 +              (yas-minor-mode-on))
 +            (ac-dcd-maybe-start-server)
 +            (ac-dcd-add-imports)
 +            (add-to-list 'ac-sources 'ac-source-dcd)
 +            (define-key d-mode-map (kbd "C-c ?") 'ac-dcd-show-ddoc-with-buffer)
 +            (define-key d-mode-map (kbd "C-c .") 'ac-dcd-goto-definition)
 +            (define-key d-mode-map (kbd "C-c ,") 'ac-dcd-goto-def-pop-marker)
 +            (define-key d-mode-map (kbd "C-c s") 'ac-dcd-search-symbol)
 +            (when (featurep 'popwin)
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-error-buffer-name :noselect t))
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-document-buffer-name :position right :width 80))
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-search-symbol-buffer-name :position bottom :width 5)))))
 +
 +;; Define diet template mode (this is not installed from package)
 +(add-to-list 'auto-mode-alist '("\\.dt$" . whitespace-mode))
 +(add-hook 'whitespace-mode-hook
 +          (lambda()
 +            (setq tab-width 2)
 +            (setq whitespace-line-column 250)
 +            (setq indent-tabs-mode nil)
 +            (setq indent-line-function 'insert-tab)))
 +
 +;;----------------------------------------------------------------------
 +;; elpy
 +(elpy-enable)
 +</code>
 +
 +==== Textadept ====
 +Un potente editor de desenrolo, multiplataforma.
 +
 +Ven incluido no pack D-apt, por que é moi potente como IDE para o D.
 +
 +Ata agora só configurei a fonte, para facelo editamos o ficheiro ~/.textadept/init.lua e engadimos a línea:
 +
 +<code>
 +ui.set_theme('light', {font = 'Meslo LG L Regular for Powerline', fontsize = 14})
 +</code>
 +==== Scribus ====
 +
 +Scribus e un programa libre de composición de documentos. con Scribus podes elaborar dende os folletos dunha exposición ata unha revista ou un poster.
 +
 +Instalado con aptitude
 +
 +<code>
 +sudo aptitude install scribus
 +</code>
 +==== Comix ====
 +
 +O meu preferido para leer comics.
 +
 +Instalado con aptitude
 +
 +<code>
 +sudo aptitude install comix
 +</code>
 +===== Desenrolo Software =====
 +
 +==== Paquetes esenciais ====
 +
 +Estos son os paquetes imprescindibles para desenrolo software en linux
 +
 +<code>
 +sudo apt-get install build-essential checkinstall make automake cmake autoconf git git-core dpkg wget
 +</code>
 +==== Git ====
 +
 +Imprescindible.
 +
 +Instalado git dende aptitude
 +
 +<code>
 +sudo aptitude install git
 +</code>
 +
 +Configuración básica de **git**, evidentemente tes que cambiar o correo e o nome de usuario
 +
 +<code>
 +git config --global user.name "Nombre Apellido"
 +git config --global user.email "direccion@correo.com"
 +git config --global core.editor emacs
 +git config --global color.ui true
 +git config --global credential.helper cache
 +git config --global credential.helper 'cache --timeout=7200'
 +git config --global push.default simple
 +git config --global alias.sla 'log --oneline --decorate --graph --all'
 +git config --global alias.car 'commit --amend --no-edit'
 +git config --global alias.unstage reset
 +git config --global alias.st status
 +git config --global alias.last  'log -1 HEAD'
 +git config --global alias.ca 'commit -a'
 +</code>
 +
 +==== Open Java ====
 +
 +Teremos que usar Java para executar varios programas, preferimos a versión aberta.
 +
 +<code>
 +apt-get install openjdk-7-jre icedtea-7-plugin
 +</code>
 +
 +==== Linguaxe de programación D (D programming language) ====
 +
 +
 +[[https://dlang.org/|El lenguaje de programación D]] e unha linguaxe de programación de sistemas cunha sintáxis similar a de C e tipado estático. Combina a eficiencia, o control e a potencia de modelado coa seguridade e a productividade.
 +
 +=== D-apt e instalación de programas ===
 +
 +Configurado [[http://d-apt.sourceforge.net/|d-apt]], instalados todo-los programas do repo:
 +
 +<code>
 +sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
 +sudo apt-get update && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring && sudo apt-get update
 +</code>
 +Instalamos todo-los programas asociados.
 +
 +<code>
 +sudo aptitude install dmd dub dcd dfix dfmt dscanner textadept
 +</code>
 +=== DCD ===
 +
 +Unha vez instalado o DCD temos que configuralo creando el ficheiro //~/.config/dcd/dcd.conf// có contido seguinte:
 +
 +<code>
 +/usr/include/dmd/druntime/import
 +/usr/include/dmd/phobos
 +</code>
 +Podemolo probar con:
 +
 +<code>
 +dcd-server &
 +echo | dcd-client --search toImpl
 +</code>
 +=== gdc ===
 +
 +Instalado con
 +
 +<code>
 +sudo aptitude install gdc
 +</code>
 +=== ldc ===
 +
 +Instalado con:
 +
 +<code>
 +sudo aptitude install ldc
 +</code>
 +Para poder executar aplicacións baseadas en [[http://vibed.org/|Vibed]], temos que instalar:
 +
 +<code>
 +sudo apt-get install -y libssl-dev libevent-dev
 +</code>
 +=== Emacs para editar D ===
 +
 +Instalados os seguintes paquetes dende //marmalade//
 +
 +  * //d-mode//
 +  * //flymake-d//
 +  * //flycheck//
 +  * //flycheck-dmd-dub//
 +  * //flychek-d-unittest//
 +  * //auto-complete// (desde //melpa//)
 +  * //ac-dcd//
 +
 +Configuranse no ficheiro **~/.emacs**:
 +
 +<code>
 +;; (require 'flymake)
 +;; ;;(global-set-key (kbd "C-c d") 'flymake-display-err-menu-for-current-line)
 +;; (global-set-key (kbd "C-c d") 'flymake-popup-current-error-menu)
 +;; (global-set-key (kbd "C-c n") 'flymake-goto-next-error)
 +;; (global-set-key (kbd "C-c p") 'flymake-goto-prev-error)
 +
 +(add-hook 'after-init-hook #'global-flycheck-mode)
 +(global-set-key  (kbd "C-c C-p") 'flycheck-previous-error)
 +(global-set-key  (kbd "C-c C-n") 'flycheck-next-error)
 +
 +;; Define d-mode addons
 +;; Activate flymake or flycheck for D
 +;; Activate auto-complete-mode
 +;; Activate yasnippet minor mode if available
 +;; Activate dcd-server
 +(require 'ac-dcd)
 +(add-hook 'd-mode-hook
 +          (lambda()
 +            ;;(flymake-d-load)
 +            (flycheck-dmd-dub-set-variables)
 +            (require 'flycheck-d-unittest)
 +            (setup-flycheck-d-unittest)
 +            (auto-complete-mode t)
 +            (when (featurep 'yasnippet)
 +              (yas-minor-mode-on))
 +            (ac-dcd-maybe-start-server)
 +            (ac-dcd-add-imports)
 +            (add-to-list 'ac-sources 'ac-source-dcd)
 +            (define-key d-mode-map (kbd "C-c ?") 'ac-dcd-show-ddoc-with-buffer)
 +            (define-key d-mode-map (kbd "C-c .") 'ac-dcd-goto-definition)
 +            (define-key d-mode-map (kbd "C-c ,") 'ac-dcd-goto-def-pop-marker)
 +            (define-key d-mode-map (kbd "C-c s") 'ac-dcd-search-symbol)
 +            (when (featurep 'popwin)
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-error-buffer-name :noselect t))
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-document-buffer-name :position right :width 80))
 +              (add-to-list 'popwin:special-display-config
 +                           `(,ac-dcd-search-symbol-buffer-name :position bottom :width 5)))))
 +
 +;; Define diet template mode (this is not installed from package)
 +(add-to-list 'auto-mode-alist '("\\.dt$" . whitespace-mode))
 +(add-hook 'whitespace-mode-hook
 +          (lambda()
 +            (setq tab-width 2)
 +            (setq whitespace-line-column 250)
 +            (setq indent-tabs-mode nil)
 +            (setq indent-line-function 'insert-tab)))
 +</code>
 +=== Referencias ===
 +
 +  * https://github.com/atilaneves/ac-dcd
 +  * https://github.com/Hackerpilot/DCD
 +
 +==== Processing ====
 +
 +Un entorno de programación baseado en java e ideal para aprender a programar dende cero.
 +
 +Baixamos os paquetes das respectivas páxinas web, descomprimimimos en //~/apps/// y creamos os desktop file con **Menulibre**
 +
 +==== Openframeworks ====
 +
 +Cunha filosofía moi parecida á de Processing pero baseado en C.
 +
 +Baixamos o paquete comprimido da páxina web do proxecto.
 +
 +Descomprimimos en //~/apps//
 +
 +Baixamos ao directorio da aplicación e executamos:
 +
 +<code>
 +sudo  scripts/linux/debian/install_dependencies.sh
 +sudo  scripts/linux/debian/install_codecs.sh
 +
 +cd scripts/linux
 +./compileOF.sh -j2
 +
 +cd OF/examples/graphics/polygonExample
 +make
 +make Run
 +
 +cd OF/scripts/linux
 +./compilePG.sh
 +</code>
 +Vai instalar unha morea de dependencias, tomadeo con calma.
 +
 +Ao final tamén vai engadir unha linea no ficheiro //~/.profile//
 +
 +<code>
 +export PG_OF_PATH=/home/salvari/apps/of/of_v0.9.3_linux64_release
 +</code>
 +==== Python ====
 +
 +De partida temos instaladas duas versións: //python// e //python3//
 +
 +<code>
 +python -V
 +Python 2.7.9
 +
 +python3 -V
 +Python 3.4.2
 +</code>
 +
 +=== pip, virtualenv, virtualenvwrapper, virtualfish ===
 +
 +//pip// é un xestor de paquetes para **Python** que facilita a instalación de librerías e utilidades.
 +
 +Para poder usar os entornos virtuais instalaremos tamén //virtualenv//.
 +
 +Instalamos os dous dende aptitude:
 +
 +<code>
 +sudo aptitude install python-pip python-virtualenv virtualenv
 +
 +sudo pip install --upgrade pip
 +sudo pip install --upgrade virtualenv
 +</code>
 +//virtualenv// é unha ferramenta imprescindible en Python, pero da un pouco de traballo, así que desarrolaronse alguns frontends para simplificar o seu uso, para //bash// e //zsh// usaremos //virtualenvwrapper//, e para //fish// o //virtualfish//. Como veremos son todos moi semellantes.
 +
 +Instalamos o //virtualwrapper//:
 +
 +<code>
 +sudo apt-get install virtualenvwrapper -y
 +</code>
 +Para usar  o //virtualenvwrapper// temos que facer:
 +
 +<code>
 +source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
 +</code>
 +
 +Ou engadir esa linea aos nosos ficheiros //.bashrc// e/ou //.zshrc//
 +
 +Eu deixei a variable de entorno //WORKON_HOME// sen definir, así que apunta ao directorio por defecto, ''%%~/.virtualenvs%%''. Nese directorio é onde se gardarán os nosos entornos virtuais.
 +
 +[[http://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html|Eiquí]] temos a referencia de comandos de //virtualenvwrapper//
 +
 +Para rematar, se queremos ter utilidades semellantes no noso //fish shell// instalamos //virtualfish//:
 +
 +<code>
 +sudo pip install virtualfish
 +</code>
 +[[http://virtualfish.readthedocs.io/en/latest/index.html|Eiquí]] temos a documentación de //virtualfish// e a descripción de todos os comandos e plugins dispoñibles.
 +
 +
 +
 +=== iPython notebook ===
 +
 +[[https://ipython.org/|iPython]], y su evolución [[https://jupyter.org/index.html|Jupyter]] proporcionan un entorno para interactivo de programación que permite elaborar documentos muy complejos con programas embebidos.
 +
 +== Instalar Jupyter en el Python del sistema ==
 +
 +Seguimos las instrucciones [[https://gist.github.com/frgomes/24c1923f2c9f14a27b14|aquí]]
 +
 +Si usamos el script descargado del github se instalará el **Jupyter** con el python3 del sistema. %%__%%Conviene asegurarse de que estamos apuntando al python del S.O. y no a cualquier otro Python que hayamos instalado:
 +
 +<code>
 +which python
 +</code>
 +== Instalar Anaconda Python ==
 +
 +Teóricamente [[https://www.continuum.io/downloads|Anaconda]], es la forma fácil de poder usar //ipython notebook//. Así que la primera vez que instalé el iPython lo hice instalando //Anaconda// De hecho me he instalado dos versiones la que incluye el python2 y la que incluye el python3, aunque son completamente redundantes, basta con instalar una sola de ellas.
 +
 +<code>
 +bash Anaconda3-4.2.0-Linux-x86_64.sh
 +bash Anaconda2-4.2.0-Linux-x86_64.sh
 +</code>
 +Los he dejado instalados en //~/apps/anaconda2// y //~/apps/anaconda3//
 +
 +Cada una de estas instalaciones incorpora su propia versión de Python. Para usarlas tenemos que cambiar nuestro PATH para que el Python deseado sea el primero que se selecciona.
 +
 +Por ejemplo para activar anaconda3 en bash:
 +
 +<code>
 +export PATH="~/apps/anaconda3/bin:$PATH"
 +</code>
 +Para hacer lo mismo en fish:
 +
 +<code>
 +set -x PATH ~/apps/anaconda3/bin $PATH
 +</code>
 +=== iPython y GraphLab ===
 +
 +La instalación de iPython y GraphLab (que es una librería comercial) la hice para realizar un curso.
 +
 +Creamos un entorno conda con Python 2.7.x
 +
 +<code>
 +export PATH="~/apps/anaconda2/bin:$PATH"
 +conda create -n gl-env python=2.7 anaconda
 +</code>
 +Activamos el nuevo entorno (todo esto lo hice en bash, en fish hay un problemilla con el entorno conda [[https://penandpants.com/2014/02/28/using-conda-environments-and-the-fish-shell/|mas info]])
 +
 +<code>
 +bash
 +source activate gl-env
 +</code>
 +En el futuro esto es todo lo que tendremos que hacer activar el entorno conda donde estamos instalando el iPython.
 +
 +Nos aseguramos de tener //pip// al dia:
 +
 +<code>
 +conda update pip
 +</code>
 +Instalamos la biblioteca [[https://turi.com/products/create/|GraphLab Create]]. Esta biblioteca se supone que es fácil de usar pero está sujeta a licencia. ((TODO: Pasarme a //scikit-learn//
 +))
 +
 +Una vez registrado en la página web te pasan un número de registro que tienes que usar para instalar la biblioteca.
 +
 +<code>
 +pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz
 +</code>
 +Y para terminar instalamos iPython ((TODO: conda install jupyter
 +)):
 +
 +<code>
 +conda install ipython-notebook
 +</code>
 +Desde ahora basta con activar el entorno que hemos creado para tener acceso al iPython.
 +
 +<code>
 +source activate gl-env
 +
 +ipython notebook
 +
 +source deactivate gl-env
 +</code>
 +== Instalación alternativa con virtualenv ==
 +
 +<code>
 +# Create a virtual environment named e.g. gl-env
 +virtualenv gl-env
 +
 +# Activate the virtual environment
 +source gl-env/bin/activate
 +
 +# Make sure pip is up to date
 +pip install --upgrade pip
 +
 +# Install IPython Notebook (optional)
 +pip install "ipython[notebook]"
 +
 +# Install Jupyter Notebook (optional)
 +pip install "jupyter"
 +
 +
 +# Install your licensed copy of GraphLab Create
 +pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz
 +</code>
 +
 +=== Usar Emacs para editar Python ===
 +
 +Instalamos //elpy// desde el gestor de paquetes de Emacs, concretamente desde el repo //marmalade//
 +
 +Hay que habilitar //elpy// en el fichero **~/.emacs** para ello añadimos la linea
 +
 +<code>
 +(elpy enable)
 +</code>
 +//flycheck// chequea el código python. Conviene instalar:
 +
 +<code>
 +sudo pip install pylint
 +</code>
 +=== TODO ===
 +
 +Estudiar esto con calma https://elpy.readthedocs.io/en/latest
 +
 +=== Web2py ===
 +
 +Desde [[http://www.web2py.com|la página web oficial de web2py]] descargamos el //source code// para usuarios normales.
 +
 +Yo he descomprimido el framework en ''%%~/apps/web2py%%''
 +
 +Para que el framework soporte ssl convine generar los siguientes certificados:
 +
 +<code>
 +openssl genrsa -out server.key 2048
 +openssl req -new -key server.key -out server.csr
 +
 +Country Name (2 letter code) [AU]:ES
 +State or Province Name (full name) [Some-State]:CORUNA
 +Locality Name (eg, city) []:CORUNA
 +Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mikasa
 +Organizational Unit Name (eg, section) []:salvari
 +Common Name (e.g. server FQDN or YOUR name) []:salvari
 +Email Address []:salvari@gmail.com
 +
 +Please enter the following 'extra' attributes
 +to be sent with your certificate request
 +A challenge password []:secret1t05
 +An optional company name []:Mikasa
 +</code>
 +Ahora ejecutamos:
 +
 +<code>
 +openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
 +</code>
 +Ahora deberíamos dejar los ficheros ''%%server.key%%'', ''%%server.csr%%'' y ''%%server.crt%%'' en el directorio raiz de //web2py// y ya podremos arrancar el framework con los siguientes parámetros:
 +
 +<code>
 +python web2py.py -a 'admin_password' -c server.crt -k server.key -i 0.0.0.0 -p 8000
 +</code>
 +Y ya podemos acceder nuestro server en la dirección https://localhost:8000
 +
 +Tampoco está de más instalar las librerías de graphviz:
 +
 +<code>
 +sudo aptitude install python-pygraphviz
 +</code>
 +
 +
 +===== Desarrollo hardware =====
 +
 +==== Arduino IDE ====
 +
 +Bajamos los paquetes de la página [[https://www.arduino.cc|web]] , descomprimimimos en //~/apps/arduino//.
 +
 +Creamos un link al directorio del software que hemos descargado:
 +
 +<code>
 +cd ~/apps/arduino
 +ln -s arduino-x.y.z current
 +</code>
 +La primera ves que instalamos será necesario crear el desktop file con **Menulibre** con las actulizaciones no será necesario, siempre y cuando apunte a //~/apps/arduino/current//
 +
 +==== Pinguino IDE ====
 +
 +Tenemos el paquete de instalación disponible en su página [[http://pinguino.cc/download.php|web]]
 +
 +Ejecutamos el programa de instalación. El programa descargará los paquetes Debian necesarios para dejar el IDE y los compiladores instalados.
 +
 +Al acabar la instalación he tenido que crear el directorio //~/Pinguino/v11//, parece que hay algún problema con el programa de instalación y no lo crea automáticamente.
 +
 +El programa queda correctamente instalado en ///opt// y arranca correctamente, habrá que probarlo con los micros.
 +
 +==== KiCAD ====
 +
 +Instalamos desde //backports//:
 +
 +<code>
 +sudo aptitude install -t jessie-backports kicad
 +</code>
 +Vamos a instalar a mayores algunas librerias de KiCAD, para poder crear Shields de Arduino.
 +
 +  * [[https://github.com/freetronics/freetronics_kicad_library|Freetronics]] una libreria que no solo incluye Shield para Arduino sino una completa colección de componentes que nos permitirá hacer proyectos completos. [[http://www.freetronics.com|Freetronics]] es una especie de BricoGeek australiano, publica tutoriales, vende componentes, y al parecer mantiene una biblioteca para KiCAD. La biblioteca de Freetronics se mantiene en un repo de github. Lo suyo es incorporarla a cada proyecto, por que si la actualizas se pueden romper los proyectos que estes haciendo.
 +  * [[http://meta-blog.eklablog.com/kicad-librairie-arduino-pretty-p930786|eklablog]] Esta biblioteca de componentes está incluida en el github de KiCAD, así que teoricamente no habría que instalarla en nuestro disco duro.
 +
 +===== Virtualización =====
 +
 +==== Docker ====
 +
 +<code>
 +apt-get install apt-transport-https ca-certificates
 +apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
 +edit docker.list with
 +deb https://apt.dockerproject.org/repo debian-jessie main
 +
 +apt-cache policy docker-engine   -- comprobamos que todo está bien.
 +
 +
 +sudo apt-get install docker-engine   -- da un error en makedev por udev activo
 +
 +
 +sudo service docker start
 +
 +sudo docker run hello-world   - todo bien
 +
 +sudo gpasswd -a salvari docker
 +</code>
 +==== Virtualbox ====
 +
 +Tenemos que:
 +
 +  * Añadir el fichero //virtualbox.list// al directorio ///etc/apt/sources.list.d//
 +  * Bajarnos y añadir a nuestro llavero las claves públicas de Oracle
 +  * Actualizar la lista de paquetes
 +  * Instalar virtualbox
 +  * Añadir nuestro usuario al grupo vboxuser (no tengo claro que esto sea necesario)
 +
 +<code>
 +echo "deb http://download.virtualbox.org/virtualbox/debian jessie contrib" \
 +|sudo tee /etc/apt/sources.list.d/virtualbox.list wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- \
 +| sudo apt-key add - sudo apt-get update sudo apt-get install virtualbox-5.1 sudo gpasswd -a salvari vboxusers
 +</code>
 +
 +Una vez instalado el virtualbox tenemos que instalarnos el pack de extensiones, es muy importante descargar el pack correspondiente a nuestra versión desde [[https://www.virtualbox.org/wiki/Downloads?|la página web de descargas]]
 +
 +Sin más que hacer doble click en el fichero descargado lo instalaremos en nuestra instancia de //Virtualbox// (necesitamos la contraseña de administración).
 +
 +==== Virtualizando un Windows 7 ====
 +
 +  * 2 Gb de ram
 +  * Create virtual hard disk
 +  * 10Gb dinamically allocated
 +  * Settings -> System->Boot Order: Quitamos el floppy
 +  * Storage -> Add IDE Controller->Add Optical Disk -> Choose Disk -> ISO Image
 +  * Instalamos Windows en Inglés y con teclado en español
 +
 +Una vez instalado el SO Windows instalamos las Guest Additions.
 +
 +===== Shells alternativos: zsh y fish =====
 +
 +Los dos son muy interesantes. He usado zsh casi un año, ahora voy a probar **fish**.
 +
 +==== fish ====
 +
 +Instalamos **fish** desde aptitude con:
 +
 +<code>
 +sudo aptitude install fish
 +</code>
 +Instalamos oh-my-fish
 +
 +<code>
 +curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > install
 +fish install
 +rm install
 +
 +chsh -s `which fish`
 +
 +</code>
 +==== zsh ====
 +
 +Igualmente instalamos **zsh**:
 +
 +<code>
 +sudo aptitude install zsh
 +</code>
 +Vamos a usar antigen así que nos lo clonamos en _~/apps/
 +
 +<code>
 +cd ~/apps
 +git clone https://github.com/zsh-users/antigen
 +</code>
 +Y editamos el fichero //~/.zshrc// para que contenga:
 +
 +<code>
 +source ~/apps/antigen/antigen.zsh
 +
 +# Load the oh-my-zsh's library.
 +antigen use oh-my-zsh
 +
 +# Bundles from the default repo (robbyrussell's oh-my-zsh).
 +antigen bundle git
 +antigen bundle command-not-found
 +antigen bundle autojump
 +antigen bundle extract
 +# antigen bundle heroku
 +# antigen bundle pip
 +# antigen bundle lein
 +
 +
 +# Syntax highlighting bundle.
 +antigen bundle zsh-users/zsh-syntax-highlighting
 +
 +# git
 +antigen bundle arialdomartini/oh-my-git
 +antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
 +
 +# autosuggestions
 +antigen bundle tarruda/zsh-autosuggestions
 +
 +#antigen theme agnoster
 +
 +# Tell antigen that you're done.
 +antigen apply
 +
 +# append to path
 +path+=('/home/salvari/apps/julia/current/bin/')
 +# prepend
 +# path=('/home/salvari/bin/' $path)
 +# export PATH
 +</code>
 +Antigen ya se encarga de descargar todo lo que queramos utilizar en zsh.
 +
 +Nos queda arreglar las fuentes para que funcione correctamente la linea de estado en los repos de git. Necesitamos una fuente //Awesome//
 +
 +==== Instalación de fuentes adicionales ====
 +
 +Nos bajamos unas cuantas fuentes que soporten los iconos //Awesome//.
 +
 +<code>
 +cd ~/tmp
 +git clone https://github.com/abertsch/Menlo-for-Powerline
 +git clone https://github.com/powerline/fonts
 +
 +mkdir ~/.fonts
 +cp someFontFile ~/.fonts/
 +fc-cache -vf ~/.fonts/
 +</code>
 +===== Reprap =====
 +
 +==== Sl1c3r ====
 +
 +Descargamos el paquete binario desde la página web.
 +
 +  * Cambiar permisos en directorio ///lib/vrt///
 +  * Instalado //lib-canberra-module// desde aptitude
 +  * Es necesario instalar //freeglut//
 +
 +==== OpenScad ====
 +
 +Instalado desde aptitude.
 +
 +==== Printrun ====
 +
 +Descargamos desde github
 +
 +==== Cura ====
 +
 +Descargamos desde la pagina web
 +
 +<code>
 +sudo aptitude install python3-pyqt5
 +sudo dpkg -i Cura-2.1.3-Linux.deb
 +</code>
 +<code>
 +sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-numpy \
 +cython python-libxml2 python-gobject python-dbus python-psutil python-cairosvg git
 +
 +python setup.py build_ext --inplace
 +</code>
 +===== Aplicaciones Web =====
 +
 +==== Servidor Web ====
 +
 +=== Apache ===
 +
 +Instalamos el paquete //apache2//
 +
 +<code>
 +sudo aptitude install apache2
 +</code>
 +Si abrimos el navegador y visitamos http://localhost/ veremos la página de Apache.
 +
 +El directorio raiz por defecto de Apache en Debian es ///var/www//, y el fichero de configuración principal es ///etc/apache2/apache2.conf//. Hay ficheros de configuración adicionales en el directorio ///etc/apache2// y sus subdirectorios. Por ejemplo:
 +
 +  * /etc/apache2/mods-enabled
 +  * /etc/apache2/sites-enabled
 +  * /etc/apache2/conf-enabled
 +
 +Además del Apache vamos a dejar instalado el //php5//
 +
 +<code>
 +sudo aptitude install php5 libapache2-mod-php5
 +</code>
 +Hay que reiniciar el servicio: ''%%sudo service apache2 restart%%''
 +
 +Si creamos un fichero ///var/www/html/info.php//, que contenga las lineas:
 +
 +<code>
 +<?php
 +phpinfo();
 +?>
 +</code>
 +Podemos ver en el siguiente enlace http://localhost/info.php si el php funciona correctamente.
 +
 +Módulos de php relacionados con mysql:
 +
 +<code>
 +sudo aptitude install php5-mysqlnd php5-curl php5-gd php5-intl php-pear \
 +php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode \
 +php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
 +</code>
 +=== nginx ===
 +
 +TODO
 +
 +==== Servidores de bases de datos ====
 +
 +=== MySQL ===
 +
 +Instalamos desde aptitude //mysql-server.5.6//
 +
 +Opcionalmente (y muy recomendable)
 +
 +<code>
 +mysql_secure_instalallation
 +</code>
 +=== Actualización ===
 +
 +Cambiamos el fichero //mysql.conf.d/mysqld.cnf//
 +
 +<code>
 +# max_allowed_packet      = 16M
 +max_allowed_packet  = 500M
 +</code>
 +Reiniciamos el servicio:
 +
 +<code>
 +/etc/init.d/mysql restart
 +</code>
 +=== Cliente SQL SQuirreL SQL ===
 +
 +Descargamos el paquete desde la página [[http://squirrel-sql.sourceforge.net/|web]] y lo descomprimimos en //~/apps//, también tendremos que descargar el conector de mysql para java, por ejemplo desde [[http://dev.mysql.com/downloads/connector/j/3.0.html|aquí]]
 +
 +Una vez instalado, creamos el desktop-file con //MenuLibre// y configuramos el driver //MySQL// añadiendo el path a donde hayamos dejado el conector java.
 +
 +=== MariaDB ===
 +
 +**PENDIENTE**
 +
 +===== Recetas varias =====
 +
 +==== Orange Pi Zero ====
 +
 +Para usar la Orange Pi Zero tendremos que crear imágenes arrancables en tarjetas micro SD.
 +
 +=== Crear una SD arrancable ===
 +
 +Dependiendo de donde conectemos la tarjeta tendremos que usar diferentes rutas. En el procedimiento descrito a continuación ''%%${card}%%'' será la ruta al dispositivo de la tarjeta y ${p} la partición (si la hay).
 +
 +Si la tarjeta se conecta via adaptador USB, linux la va a asociar a un dispositivo /dev/sdx, por ejemplo en mi portátil el disco duro es ''%%/dev/sda%%'' las distintas particiones serán ''%%/dev/sda1%%'', ''%%/devb/sda2%%'', etc.
 +
 +Si conectamos una memoria con un adaptador USB linux la podría mapear en ''%%/dev/sdb%%'' por ejemplo.
 +
 +Si la memoria se conecta mediante una ranura SD, linux la asociará a un dispositivo ''%%/dev/mmcblk0%%'' o ''%%/dev/mmcblk1%%'', etc. etc. Dependerá de la ranura usada. Las particiones en este tipo de dispositivos tienen rutas como por ejemplo ''%%/dev/mmcblk0p1%%''.
 +
 +Los datos se pueden almacenar directamente en la memoria SD o en una partición creada en la memoria.
 +
 +Resumiendo:
 +
 +  * ''%%${card}%%'' será ''%%/dev/sdb%%'' o ''%%/dev/mmcblk0%%''
 +  * ${card}${p} será ''%%/dev/sdb1%%'' o ''%%/dev/mmcblk0p1%%''
 +
 +Antes de seguir adelante hay que estar completamente seguro del dispositivo asociado a nuestra memoria SD para no armar ningún estropicio.
 +
 +Hay varias comprobaciones que se pueden hacer:
 +
 +''%%dmesg |tail%%'' nos permitirá echar un ojo a los últimos mensajes en el log del sistema. Si acabamos de insertar la memoria veremos el dispositivo usado.
 +
 +''%%sudo fdisk -l%%'' nos permite ver las particiones montadas en nuestro linux, por ejemplo con mi SD en la ranura SD de mi portatil la salida es (entre otras cosas, he obviado las particiones de los discos duros):
 +
 +<code>
 +Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
 +Units: sectors of 1 * 512 = 512 bytes
 +Sector size (logical/physical): 512 bytes / 512 bytes
 +I/O size (minimum/optimal): 512 bytes / 512 bytes
 +Disklabel type: dos
 +Disk identifier: 0x00000000
 +</code>
 +''%%cat /proc/partitions%%'' también nos dará una lista de particiones, en mi portátil las que interesan son:
 +
 +<code>
 + 179        0    7761920 mmcblk0
 + 179        1    7757824 mmcblk0p1
 +</code>
 +Descargamos la imagen de Jessie adaptada a la //Orange Pi Zero// desde la página https://www.armbian.com/download/
 +
 +Descomprimimos la imagen y la grabamos en la tarjeta SD con el comando:
 +
 +<code>
 +sudo dd if=./Armbian_5.24_Orangepizero_Debian_jessie_3.4.113.img of=/dev/mmcblk0
 +</code>
 +Insertamos la tarjeta en la //Orange Pi// y le damos alimentación. El primer arranque llevará alrededor de tres minutos, y tras ese tiempo aun hará falta un minuto más para poder hacer login. Este retardo es debido a que el sistema intentará actualizar la lista de paquetes y creará un area de swap de emergencia en la SD, y además cambiará el tamaño de la partición que hemos creado para ocupar todo el espacio libre en la SD.
 +
 +De momento solo la he arrancado y efectivamente las particiones han cambiado tras el arranque así que tiene buena pinta.
 +
 +Volvemos a insertar la SD en la //Orange Pi// y la conectamos con un cable ethernet al router de casa. El Armbian viene configurado por defecto para obtener su IP desde un servidor DHCP.
 +
 +Como mi cutre-router no me da información de las IP asignadas usamos //nmap//:
 +
 +<code>
 +nmap -sP 192.168.0.0 /24
 +</code>
 +Con eso averiguamos la IP asignada a la //Orange Pi Zero// y ya podemos hacer login con:
 +
 +<code>
 +ssh root@192.168.0.109
 +</code>
 +¡Y ya estamos!
 +
 +{{OrangePiZero_FirstLogin.png| Primer login en //Orange Pi//}}
 +
 +Lo primero es poner al dia el sistema:
 +
 +<code>
 +apt-get update
 +apt-get upgrade
 +</code>
 +Si quieres puedes reconfigurar el //time zone//:
 +
 +<code>
 +dpgk-reconfigura tzdata
 +</code>
 +=== Conexión WIFI ===
 +
 +Vamos a comprobar que todo va bien:
 +
 +<code>
 +root@orangepizero:~# iwconfig
 +lo        no wireless extensions.
 +
 +tunl0     no wireless extensions.
 +
 +wlan0     IEEE 802.11bgn  ESSID:off/any
 +          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
 +          Retry  long limit:  RTS thr:off   Fragment thr:off
 +          Encryption key:off
 +          Power Management:on
 +
 +eth0      no wireless extensions.
 +</code>
 +Todo tiene buena pinta, vamos a ver si detecta WIFIs:
 +
 +<code>
 +root@orangepizero:~# iwlist wlan0  scan |grep ESSID
 +                    ESSID:"wificlientesR"
 +                    ESSID:"casa_de_verano"
 +                    ESSID:"MOVISTAR_BEEF"
 +                    ESSID:"wificlientesR"
 +                    ESSID:"R-wlan90"
 +                    ESSID:"MOVISTAR_BAAF"
 +                    ESSID:"ababab"
 +                    ESSID:"WLAN 77"
 +                    ESSID:"castillo"
 +                    ESSID:"unaWifi"
 +                    ESSID:""
 +                    ESSID:"mikasa"
 +</code>
 +Para configurar el wifi echamos un ojo al fichero ''%%/etc/network/interfaces%%'' pero en ese mismo fichero encontramos el aviso:
 +
 +<code>
 +# Armbian ships with network-manager installed by default. To save you time
 +# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
 +# manually.
 +</code>
 +Así que basta con ejecutar ''%%sudo nmtui%%'' y ya podemos dar de alta nuestra wifi (yo la prefiero con IP estática).
 +
 +{{orangepizero_tmtui.png| Configuración WIFI}}
 +
 +Ejecutamos ''%%ifconfig%%'' y ya vemos nuestro nuevo interface configurado:
 +
 +<code>
 +ifconfig
 +
 +wlan0     Link encap:Ethernet  HWaddr a4:7c:f2:9a:97:7c
 +          inet addr:192.168.0.120  Bcast:192.168.0.255  Mask:255.255.255.0
 +          inet6 addr: fe80::a67c:f2ff:fe9a:977c/64 Scope:Link
 +          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:328 (328.0 B)  TX bytes:852 (852.0 B)
 +</code>
 +
 +=== Referencias ===
 +
 +  * [[http://www.orangepi.org/|Página oficial]]
 +  * [[http://www.orangepi.org/downloadresources/|Recursos oficiales]] aquí hay imágenes y los esquemáticos
 +  * [[https://www.aliexpress.com/store/1553371?spm=2114.8147860.0.0.F1q43C|Tienda en Aliexpress]]
 +  * http://linux-sunxi.org/Bootable_SD_card
 +  * https://www.armbian.com/orange-pi-zero/
 +  * https://docs.armbian.com/User-Guide_Getting-Started/
 +  * https://docs.armbian.com/Hardware_Allwinner/
 +  * [[https://linux-sunxi.org/GPIO|GPIO]] Una explicación de como acceder al gpio desde terminal
 +  * [[https://linux-sunxi.org/Orange_Pi_Zero|Info variada]] Aquí tenemos el esquema de pines
 +
 +==== Raspberry Pi Media Center ====
 +
 +Bajamos la imagen con nuestro cliente torrent favorito desde [[https://github.com/aikoncwd/aikoncwd-rpi-mediacenter|aquí]], no os molesteis en clonar el directorio, hay que bajarse la imagen.
 +
 +<code>
 +sudo dd if=./Mediacenter-AikonCWD-v6.img  of=/dev/mmcblk0 bs=4M
 +</code>
 +Arrancamos con la toma ethernet conectada al router y nos conectamos tras averigurar la IP con ''%%nmap%%'' (ver //Orange Pi Zero//)
 +
 +{{RaspiFirstLogin.png| Primer login en Raspberry}}
 +
 +Una vez instalado los pasos recomendados:
 +
 +  * Cambiar la password de root: ''%%passwd%%''
 +  * Fijar una IP estática: Editamos el fichero ''%%/etc/dhcpcd.conf%%'', ya de paso configuramos la IP estática para la WIFI
 +
 +<code>
 +interface eth0
 +static ip_address=192.168.0.125/24
 +static routers=192.168.0.1
 +static domain_name_servers=8.8.8.8
 +
 +interface wlan0
 +static ip_address=192.168.0.126/24
 +static routers=192.168.0.1
 +static domain_name_servers=8.8.8.8
 +</code>
 +
 +  * Una vez cambiado el fichero hay que reiniciar con ''%%shutdown -r now%%''
 +  * Configurar la WIFI, en esta parte damos por supuesto que tenemos la wifi con WPA activado.
 +  * Echamos un ojo a nuestro interfaz radio con ''%%iwconfig%%'', si aparece el ''%%wlan0%%'' todo va bien.
 +
 +<code>
 +wlan0     IEEE 802.11bgn  ESSID:off/any
 +          Mode:Managed  Access Point: Not-Associated   Tx-Power=31 dBm
 +          Retry short limit:  RTS thr:off   Fragment thr:off
 +          Encryption key:off
 +          Power Management:on
 +</code>
 +
 +  * Tenemos que editar el fichero ''%%/etc/network/interfaces%%'' y asegurarnos de tener el ''%%wlan0%%'' como sigue:
 +
 +<code>
 +allow-hotplug wlan0
 +iface wlan0 inet manual
 +    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 +</code>
 +
 +  * Ahora vamos a editar el fichero de configuración de ''%%wpa_supplicant%%'', es decir ''%%/etc/wpa_supplicant/wpa_supplicant.conf%%'' y añadir un bloque ''%%network%%'' que sea como el que va a continuación, de paso he cambiado el ''%%country%%'' a "ES", asi que queda así:
 +
 +<code>
 +country=ES
 +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +update_config=1
 +network={
 +  ssid="YOURSSID"
 +  psk="YOURPASSWORD"
 +}
 +</code>
 +
 +  * Un reinicio y listos: ''%%shutdown -r now%%''
 +
 +===== TODO =====
 +
 +  * cinelerra
 +  * playonlinux
 +  * krita
 +  * mypaint
 +  * qStopmotion
 +  * chibios
 +    * [http:%%//%%wiki.chibios.org/dokuwiki/doku.php?id=chibios:community:setup:openocd_chibios]
 +    * [http:%%//%%www.josho.org/blog/blog/2014/11/30/nucleo-gcc/]
 +    * [http:%%//%%www.stevebate.net/chibios-rpi/GettingStarted.html]
 +  * ICE Studio
 +  * Inkscape
 +    * https://elizsarobhasa.makes.org/thimble/MTMwNDIzMjE5Mg==/3d-printing-from-a-2d-drawing
 +    * Instalar tb jessyink
 +  * rclone https://syncthing.net/
 +  * vmware (no creo, virtualbox va genial)
 +  * Astronomía
 +  * STM32 toolchain
 +
 +===== Links =====
 +
 +  * [[https://wiki.debian.org/systemd|Systemd]]
 +  * [[https://wiki.gnome.org/Design/OS/KeyboardShortcuts|Gnome shortcuts]]
 +  * [[https://www.linux.com/learn/easy-steps-make-gnome-3-more-efficient|Gnome optimizaciones]]
 +  * [[https://diversidadyunpocodetodo.blogspot.com.es/2015/03/sensores-temperatura-hardware-discos-cpu-debian-ubuntu.html|Instalación Debian]]
 +  * [[http://joshldavis.com/2014/07/26/oh-my-zsh-is-a-disease-antigen-is-the-vaccine/|zsh]]
 +  * [[http://blog.namangoel.com/zsh-with-antigen|zsh]]
 +  * https://www.roaringpenguin.com/products/remind
 +  * http://taskwarrior.org/
 +
 +===== Licencia =====
 +
 +Esta guía se publica sujeta a licencia CC-BY-SA 4.0 INTL
 +
 +<code>
 +
 +Attribution-ShareAlike 4.0 International
 +
 +======================================================
 +
 +Creative Commons Corporation ("Creative Commons") is not a law firm and
 +does not provide legal services or legal advice. Distribution of
 +Creative Commons public licenses does not create a lawyer-client or
 +other relationship. Creative Commons makes its licenses and related
 +information available on an "as-is" basis. Creative Commons gives no
 +warranties regarding its licenses, any material licensed under their
 +terms and conditions, or any related information. Creative Commons
 +disclaims all liability for damages resulting from their use to the
 +fullest extent possible.
 +
 +Using Creative Commons Public Licenses
 +
 +Creative Commons public licenses provide a standard set of terms and
 +conditions that creators and other rights holders may use to share
 +original works of authorship and other material subject to copyright
 +and certain other rights specified in the public license below. The
 +following considerations are for informational purposes only, are not
 +exhaustive, and do not form part of our licenses.
 +
 +     Considerations for licensors: Our public licenses are
 +     intended for use by those authorized to give the public
 +     permission to use material in ways otherwise restricted by
 +     copyright and certain other rights. Our licenses are
 +     irrevocable. Licensors should read and understand the terms
 +     and conditions of the license they choose before applying it.
 +     Licensors should also secure all rights necessary before
 +     applying our licenses so that the public can reuse the
 +     material as expected. Licensors should clearly mark any
 +     material not subject to the license. This includes other CC-
 +     licensed material, or material used under an exception or
 +     limitation to copyright. More considerations for licensors:
 +    wiki.creativecommons.org/Considerations_for_licensors
 +
 +     Considerations for the public: By using one of our public
 +     licenses, a licensor grants the public permission to use the
 +     licensed material under specified terms and conditions. If
 +     the licensor's permission is not necessary for any reason--for
 +     example, because of any applicable exception or limitation to
 +     copyright--then that use is not regulated by the license. Our
 +     licenses grant only permissions under copyright and certain
 +     other rights that a licensor has authority to grant. Use of
 +     the licensed material may still be restricted for other
 +     reasons, including because others have copyright or other
 +     rights in the material. A licensor may make special requests,
 +     such as asking that all changes be marked or described.
 +     Although not required by our licenses, you are encouraged to
 +     respect those requests where reasonable. More_considerations
 +     for the public:
 +    wiki.creativecommons.org/Considerations_for_licensees
 +
 +======================================================
 +
 +Creative Commons Attribution-ShareAlike 4.0 International Public
 +License
 +
 +By exercising the Licensed Rights (defined below), You accept and agree
 +to be bound by the terms and conditions of this Creative Commons
 +Attribution-ShareAlike 4.0 International Public License ("Public
 +License"). To the extent this Public License may be interpreted as a
 +contract, You are granted the Licensed Rights in consideration of Your
 +acceptance of these terms and conditions, and the Licensor grants You
 +such rights in consideration of benefits the Licensor receives from
 +making the Licensed Material available under these terms and
 +conditions.
 +
 +
 +Section 1 -- Definitions.
 +
 +  a. Adapted Material means material subject to Copyright and Similar
 +     Rights that is derived from or based upon the Licensed Material
 +     and in which the Licensed Material is translated, altered,
 +     arranged, transformed, or otherwise modified in a manner requiring
 +     permission under the Copyright and Similar Rights held by the
 +     Licensor. For purposes of this Public License, where the Licensed
 +     Material is a musical work, performance, or sound recording,
 +     Adapted Material is always produced where the Licensed Material is
 +     synched in timed relation with a moving image.
 +
 +  b. Adapter's License means the license You apply to Your Copyright
 +     and Similar Rights in Your contributions to Adapted Material in
 +     accordance with the terms and conditions of this Public License.
 +
 +  c. BY-SA Compatible License means a license listed at
 +     creativecommons.org/compatiblelicenses, approved by Creative
 +     Commons as essentially the equivalent of this Public License.
 +
 +  d. Copyright and Similar Rights means copyright and/or similar rights
 +     closely related to copyright including, without limitation,
 +     performance, broadcast, sound recording, and Sui Generis Database
 +     Rights, without regard to how the rights are labeled or
 +     categorized. For purposes of this Public License, the rights
 +     specified in Section 2(b)(1)-(2) are not Copyright and Similar
 +     Rights.
 +
 +  e. Effective Technological Measures means those measures that, in the
 +     absence of proper authority, may not be circumvented under laws
 +     fulfilling obligations under Article 11 of the WIPO Copyright
 +     Treaty adopted on December 20, 1996, and/or similar international
 +     agreements.
 +
 +  f. Exceptions and Limitations means fair use, fair dealing, and/or
 +     any other exception or limitation to Copyright and Similar Rights
 +     that applies to Your use of the Licensed Material.
 +
 +  g. License Elements means the license attributes listed in the name
 +     of a Creative Commons Public License. The License Elements of this
 +     Public License are Attribution and ShareAlike.
 +
 +  h. Licensed Material means the artistic or literary work, database,
 +     or other material to which the Licensor applied this Public
 +     License.
 +
 +  i. Licensed Rights means the rights granted to You subject to the
 +     terms and conditions of this Public License, which are limited to
 +     all Copyright and Similar Rights that apply to Your use of the
 +     Licensed Material and that the Licensor has authority to license.
 +
 +  j. Licensor means the individual(s) or entity(ies) granting rights
 +     under this Public License.
 +
 +  k. Share means to provide material to the public by any means or
 +     process that requires permission under the Licensed Rights, such
 +     as reproduction, public display, public performance, distribution,
 +     dissemination, communication, or importation, and to make material
 +     available to the public including in ways that members of the
 +     public may access the material from a place and at a time
 +     individually chosen by them.
 +
 +  l. Sui Generis Database Rights means rights other than copyright
 +     resulting from Directive 96/9/EC of the European Parliament and of
 +     the Council of 11 March 1996 on the legal protection of databases,
 +     as amended and/or succeeded, as well as other essentially
 +     equivalent rights anywhere in the world.
 +
 +  m. You means the individual or entity exercising the Licensed Rights
 +     under this Public License. Your has a corresponding meaning.
 +
 +
 +Section 2 -- Scope.
 +
 +  a. License grant.
 +
 +       1. Subject to the terms and conditions of this Public License,
 +          the Licensor hereby grants You a worldwide, royalty-free,
 +          non-sublicensable, non-exclusive, irrevocable license to
 +          exercise the Licensed Rights in the Licensed Material to:
 +
 +            a. reproduce and Share the Licensed Material, in whole or
 +               in part; and
 +
 +            b. produce, reproduce, and Share Adapted Material.
 +
 +       2. Exceptions and Limitations. For the avoidance of doubt, where
 +          Exceptions and Limitations apply to Your use, this Public
 +          License does not apply, and You do not need to comply with
 +          its terms and conditions.
 +
 +       3. Term. The term of this Public License is specified in Section
 +          6(a).
 +
 +       4. Media and formats; technical modifications allowed. The
 +          Licensor authorizes You to exercise the Licensed Rights in
 +          all media and formats whether now known or hereafter created,
 +          and to make technical modifications necessary to do so. The
 +          Licensor waives and/or agrees not to assert any right or
 +          authority to forbid You from making technical modifications
 +          necessary to exercise the Licensed Rights, including
 +          technical modifications necessary to circumvent Effective
 +          Technological Measures. For purposes of this Public License,
 +          simply making modifications authorized by this Section 2(a)
 +          (4) never produces Adapted Material.
 +
 +       5. Downstream recipients.
 +
 +            a. Offer from the Licensor -- Licensed Material. Every
 +               recipient of the Licensed Material automatically
 +               receives an offer from the Licensor to exercise the
 +               Licensed Rights under the terms and conditions of this
 +               Public License.
 +
 +            b. Additional offer from the Licensor -- Adapted Material.
 +               Every recipient of Adapted Material from You
 +               automatically receives an offer from the Licensor to
 +               exercise the Licensed Rights in the Adapted Material
 +               under the conditions of the Adapter's License You apply.
 +
 +            c. No downstream restrictions. You may not offer or impose
 +               any additional or different terms or conditions on, or
 +               apply any Effective Technological Measures to, the
 +               Licensed Material if doing so restricts exercise of the
 +               Licensed Rights by any recipient of the Licensed
 +               Material.
 +
 +       6. No endorsement. Nothing in this Public License constitutes or
 +          may be construed as permission to assert or imply that You
 +          are, or that Your use of the Licensed Material is, connected
 +          with, or sponsored, endorsed, or granted official status by,
 +          the Licensor or others designated to receive attribution as
 +          provided in Section 3(a)(1)(A)(i).
 +
 +  b. Other rights.
 +
 +       1. Moral rights, such as the right of integrity, are not
 +          licensed under this Public License, nor are publicity,
 +          privacy, and/or other similar personality rights; however, to
 +          the extent possible, the Licensor waives and/or agrees not to
 +          assert any such rights held by the Licensor to the limited
 +          extent necessary to allow You to exercise the Licensed
 +          Rights, but not otherwise.
 +
 +       2. Patent and trademark rights are not licensed under this
 +          Public License.
 +
 +       3. To the extent possible, the Licensor waives any right to
 +          collect royalties from You for the exercise of the Licensed
 +          Rights, whether directly or through a collecting society
 +          under any voluntary or waivable statutory or compulsory
 +          licensing scheme. In all other cases the Licensor expressly
 +          reserves any right to collect such royalties.
 +
 +
 +Section 3 -- License Conditions.
 +
 +Your exercise of the Licensed Rights is expressly made subject to the
 +following conditions.
 +
 +  a. Attribution.
 +
 +       1. If You Share the Licensed Material (including in modified
 +          form), You must:
 +
 +            a. retain the following if it is supplied by the Licensor
 +               with the Licensed Material:
 +
 +                 i. identification of the creator(s) of the Licensed
 +                    Material and any others designated to receive
 +                    attribution, in any reasonable manner requested by
 +                    the Licensor (including by pseudonym if
 +                    designated);
 +
 +                ii. a copyright notice;
 +
 +               iii. a notice that refers to this Public License;
 +
 +                iv. a notice that refers to the disclaimer of
 +                    warranties;
 +
 +                 v. a URI or hyperlink to the Licensed Material to the
 +                    extent reasonably practicable;
 +
 +            b. indicate if You modified the Licensed Material and
 +               retain an indication of any previous modifications; and
 +
 +            c. indicate the Licensed Material is licensed under this
 +               Public License, and include the text of, or the URI or
 +               hyperlink to, this Public License.
 +
 +       2. You may satisfy the conditions in Section 3(a)(1) in any
 +          reasonable manner based on the medium, means, and context in
 +          which You Share the Licensed Material. For example, it may be
 +          reasonable to satisfy the conditions by providing a URI or
 +          hyperlink to a resource that includes the required
 +          information.
 +
 +       3. If requested by the Licensor, You must remove any of the
 +          information required by Section 3(a)(1)(A) to the extent
 +          reasonably practicable.
 +
 +  b. ShareAlike.
 +
 +     In addition to the conditions in Section 3(a), if You Share
 +     Adapted Material You produce, the following conditions also apply.
 +
 +       1. The Adapter's License You apply must be a Creative Commons
 +          license with the same License Elements, this version or
 +          later, or a BY-SA Compatible License.
 +
 +       2. You must include the text of, or the URI or hyperlink to, the
 +          Adapter's License You apply. You may satisfy this condition
 +          in any reasonable manner based on the medium, means, and
 +          context in which You Share Adapted Material.
 +
 +       3. You may not offer or impose any additional or different terms
 +          or conditions on, or apply any Effective Technological
 +          Measures to, Adapted Material that restrict exercise of the
 +          rights granted under the Adapter's License You apply.
 +
 +
 +Section 4 -- Sui Generis Database Rights.
 +
 +Where the Licensed Rights include Sui Generis Database Rights that
 +apply to Your use of the Licensed Material:
 +
 +  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
 +     to extract, reuse, reproduce, and Share all or a substantial
 +     portion of the contents of the database;
 +
 +  b. if You include all or a substantial portion of the database
 +     contents in a database in which You have Sui Generis Database
 +     Rights, then the database in which You have Sui Generis Database
 +     Rights (but not its individual contents) is Adapted Material,
 +
 +     including for purposes of Section 3(b); and
 +  c. You must comply with the conditions in Section 3(a) if You Share
 +     all or a substantial portion of the contents of the database.
 +
 +For the avoidance of doubt, this Section 4 supplements and does not
 +replace Your obligations under this Public License where the Licensed
 +Rights include other Copyright and Similar Rights.
 +
 +
 +Section 5 -- Disclaimer of Warranties and Limitation of Liability.
 +
 +  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
 +     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
 +     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
 +     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
 +     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
 +     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
 +     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
 +     ACCURACY, O
 +     
 +</code>