diff --git a/chap/DNS.tex b/chap/DNS.tex index 128aad1..dc4462e 100644 --- a/chap/DNS.tex +++ b/chap/DNS.tex @@ -1,5 +1,5 @@ \chapter{Domain Name Service} -\label{DNS} +\label{chap:DNS} \section{Outils de base} diff --git a/chap/Fedora.tex b/chap/Fedora.tex index 0cf47f0..8007721 100644 --- a/chap/Fedora.tex +++ b/chap/Fedora.tex @@ -1,3 +1,30 @@ \chapter{Fedora} \label{chap:fedora} \index{Fedora} + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\section{Gestion des paquets} + +DNF\index{dnf} semble être l'outil de prédilection. + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\section{Firewall} + +Krkrkr, UPD\index{UDP} est bloqué en entrée ? Wtf ? + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\section{Include dir} + +Chez Fedora, certains fichiers \texttt{.h} ne sont pas à la même +place que dans d'autres distributions\index{Debian}, ce qui cause quelques +soucis pour les compilations. + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +\section{Comment installer ffmpeg ?} +\index{ffmpeg} + +D'après Blaise (regatta) il faut voir du coté de rpmfusion. + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chap/Raspberry.tex b/chap/Raspberry.tex new file mode 100644 index 0000000..f9c4eca --- /dev/null +++ b/chap/Raspberry.tex @@ -0,0 +1,21 @@ +\chapter{Raspberry Pi} +\label{chap:raspberry} +\index{Raspberry} + +\section{Quel OS ?} + +Arthur ? RiscOS ? Haiku ? Plan9 ? + +\section{Headless}\index{headless} + +Comment générer une SD qui soit accessible par ssh\index{ssh} +dès le démarrage ? + + +\section{Connecteur} + +Que faut-il faire pour avoir un vrai rs232, et faire du +SLIP\index{SLIP} avec ? + + + diff --git a/chap/X11.tex b/chap/X11.tex index 8ec172c..5e11d96 100644 --- a/chap/X11.tex +++ b/chap/X11.tex @@ -1,5 +1,5 @@ \chapter{X11} -\label{X11} +\label{X11}\index{X11} %------------------------------------------------------------------- \section{Les fontes} @@ -11,7 +11,7 @@ $ fc-list | awk -F ":" '{print $1}' | sort -u \end{verbatim} Comment faire pour visualiser la plénitude des formes de mes fontes ? - + %------------------------------------------------------------------- \section{Xephyr} @@ -31,7 +31,6 @@ le clavier en Azerty\index{azerty} ? %------------------------------------------------------------------- \section{Numlock} - \begin{verbatim} #include #include @@ -46,6 +45,8 @@ int main(){ return 0;} \end{verbatim} +Mais c'est du très vieux code, ça ! + %------------------------------------------------------------------- % new 20 décembre 2012 à Mixart-Myrys \section{xdotool} @@ -84,9 +85,10 @@ $ \end{verbatim} Voilà\footnote{en français dans le texte}, nous savons maintenant -à quelle fenêtre causer : par son numéro. -Le problême des multiples fenêtres du -même nom sera abordé ultérieurement. +à quelle fenêtre causer : par son numéro d'identification. +Le problême des multiples fenêtres du même nom sera abordé +ultérieurement. + Déplaçons donc notre widget\dots \begin{verbatim} diff --git a/chap/gadgets.tex b/chap/gadgets.tex index f104e69..d506103 100644 --- a/chap/gadgets.tex +++ b/chap/gadgets.tex @@ -88,7 +88,7 @@ D'autres songent à MXDoctor\index{emacs} ou Camélia. Ahem, là, c'est délicat, parce que je ne sais pas vraiment\footnote{Enfin, si, j'essaye de confectionner un soft pour fabriquer des flipbooks à partir de portnawak} -d'animation imprimable. +faire d'animation imprimable. % =============================================================== diff --git a/chap/gif89a.tex b/chap/gif89a.tex new file mode 100644 index 0000000..8b36ab4 --- /dev/null +++ b/chap/gif89a.tex @@ -0,0 +1,59 @@ +\chapter{gif89a}\index{gif89a} +\label{chap:gif89a} + +Ah, enfin nous arrivons à un sujet \textbf{vraiment} important : +la confection d'images qui clignotent. Ça va aussi être l'occasion +de plonger un peu dans l'histoire du siècle dernier. Nous allons +parler de Compuserve\index{Compuserve} que seul les plus anciens +d'entre vous on pu connaitre. + +\begin{quote} +\textsl{Wikipedia} : +CompuServe (ou CompuServe Information Services, ou CIS), est le +premier des grands fournisseurs de services en ligne aux États-Unis. +Il domine le marché pendant les années 1980 puis reste un acteur +important au milieu des années 1990. +\end{quote} + +Voilà pour expliquer brièvement d'où sort ce fameux format \textsc{gif}. +À l'époque, les moyens de connexion étaient beauuucoup plus lents que +ce que nous connaissons en 2020\footnote{Une fscking mauvaise année}, +mais les écrans graphiques commençaient à bien se répandre, et certains +pouvaient même afficher {\em 256 couleurs}~: + +\begin{quote} +L'entreprise est aussi connue pour avoir mis au point un format d'image +numérique très répandu, le GIF\index{GIF}, en 1987. +\end{quote} + +Deux ans plus tard, le public demandant de plus en plus d'images +épileptisante, une extension de ce format et reçu le petit nom +de \textsc{gif89a}. Il y a toujours la limitation à 256 couleurs +et un seul niveau de transparence. Contraintes qui n'étaient pas si +génantes que ça à l'époque vu les terminaux visés. + +% ================================================================== + +\section{Création} + +Avec une des commandes d'ImageMagick, on peut, à partir d'une suite +d'image, créer une gif89a qui tourne en boucle~: + +\begin{verbatim} +convert -delay 20 -loop 0 a.png b.png c.png foo.gif +\end{verbatim} + +Le \textsl{delay} est exprimé en millisecondes. + +Et ensuite, vouv pouvez voir votre logo en flamme avec la +commande \texttt{animate foo.gif} sur votre super écran svga. + +% ================================================================== + +\section{Manipulation} + +% ================================================================== + +\section{Exemples pratiques} + +% ================================================================== diff --git a/chap/image.tex b/chap/image.tex index a46aa77..10e0e7b 100644 --- a/chap/image.tex +++ b/chap/image.tex @@ -1,14 +1,20 @@ \chapter{Image} \label{chap:image} +Le traitement des images est un art à part entière. Nous allons +voir quelques grands classiques de la catégorie pas du tout +interactif. Le genre de machin que l'on peut ranger au fond +d'un script shell pour le réutiliser la semaine prochaine. + % ------------------------------------------------------------------- \section{ImageMagick}\index{ImageMagick} Attention, ça va devenir \textsl{hardu}% -\footnote{Nous attendons tous avec impatience l'ouvrage de Brunus}, +\footnote{Nous attendons tous avec impatience l'ouvrage magistral +de maitre Brunus}, l'abondance d'options -des outils imagemagick est vraiment énorme, et leurs +des outils ImageMagick est vraiment énorme, et leurs interactions parfois troublantes\dots \subsection{Écrire du texte} @@ -16,7 +22,7 @@ interactions parfois troublantes\dots Voici un exemple concret (tiré du script d'encodage du \textsc{cloître}\index{cloître}) qui montre l'essentiel pour bien débuter. C'est une fonction -écrite en bash\index{bash} qui rajoute un texte sur une image : +écrite en bash\index{bash} qui rajoute un texte sur une image. : \begin{verbatim} function tagpic @@ -24,12 +30,10 @@ function tagpic infile="$1" outfile="$2" texte="$3" - txtfont=" -font Utopia " fontsize=" -pointsize 96 -kerning 6 " color=" -fill Gray20 -stroke White " txtopts=" -antialias -alpha off $txtfont " - convert $infile \ ${txtopts} \ ${txtfont} ${fontsize} \ @@ -40,15 +44,66 @@ convert $infile \ } \end{verbatim} -Quelques explications... +Quelques explications semblent nécessaires, parce que certaines +options sont un peu ésotériques... + +\begin{itemize} +\item{txtfont} +\item{fontsize} +\item{colors} +\item{txtopts} +\item{-gravity} +\item{-annotate} +\end{itemize} + +\subsection{Faire des GIFs animées}\index{GIF} + +Ces images clignotantes sont l'essence même du Web\index{Web} +moderne depuis 1992, et \texttt{convert} sait très bien les +générer. + +\begin{verbatim} +convert -delay 20 -loop 0 a.png b.png c.png foo.gif +\end{verbatim} + +Ce sujet pertinent est abordé plus en détails en +page \pageref{chap:gif89a} + +\subsection{Extraire une partie de l'image} + +Dans cette fonctionnalité aussi, il semble y avoir quelques +subtilités. + +\begin{verbatim} +DIM="1024x768" +convert -crop ${DIM}+512+0 $img $dst +\end{verbatim} + % ------------------------------------------------------------------- \section{Gmic}\index{Gmic} +XXX\index{XXX} +Existe aussi en plugin pour Gimp\index{Gimp}. % ------------------------------------------------------------------- +\section{NetPBM}\index{netpbm}\label{netpbm} +With the Netpbm file formats, it’s trivial to output pixels using +nothing but text based IO% +\footnote{https://www.vidarholen.net/contents/blog/?p=904}. + +\begin{verbatim} +#!/bin/bash +exec > my_image.ppm # All echo statements will write here +echo "P3 250 250 255" # magic, width, height, max component value +for ((y=0; y<250; y++)) { + for ((x=0; x<250; x++)) { + echo "$((x^y)) $((x^y)) $((x|y))" # r, g, b + } +} +\end{verbatim} \ No newline at end of file diff --git a/chap/reseau.tex b/chap/reseau.tex index 15acc9d..310b8cb 100644 --- a/chap/reseau.tex +++ b/chap/reseau.tex @@ -6,7 +6,7 @@ Nous allons voir dans ce chapitre quelques utilisations que l'on peut qualifier de «~créatives~». Si vous attendiez des choses plus sérieuses, j'ai aussi ça -en magasin : \textsc{dns} page \pageref{DNS}, +en magasin : \textsc{dns} page \pageref{chap:DNS}, \textsc{ssh} page \pageref{ssh}, streaming page \pageref{streaming}, et probablement bien d'autres à venir. @@ -146,14 +146,16 @@ iptraf\index{iptraf} \subsection{tcpdump} \index{tcpdump} -C'est clairement un outil dédié au voyeurisme :) +C'est clairement un outil dédié au voyeurisme, mais qui permet de +décrypter les ésotérismes de MiniMad\index{minimad}. C'est donc +sur cet exemple que nous allons partir. % ------------------------------------------------------------- \subsection{nmap} \index{nmap} -C'est clairement un outil dédié au voyeurisme :) +C'est clairement aussi un outil dédié au voyeurisme :) % ============================================================== @@ -164,7 +166,8 @@ C'est clairement un outil dédié au voyeurisme :) The nc (or netcat) utility is used for just about anything under the sun involving TCP or UDP. It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with -both IPv4 and IPv6. Unlike telnet(1), nc scripts nicely, and separates +both IPv4 and IPv6\footnote{Voir le chapitre \ref{chap/IPv6}} +. Unlike telnet(1), nc scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet(1) does with some. \end{quote} diff --git a/chap/ssh.tex b/chap/ssh.tex index c4e26f4..9dbc784 100644 --- a/chap/ssh.tex +++ b/chap/ssh.tex @@ -1,10 +1,10 @@ \chapter{ssh} -\label{ssh} +\label{chap:ssh} Secure Shell. D'après le site \texttt{openssh.org} : -\textit{OpenSSH is a {\em free} version of the SSH\index{SSH} connectivity +\textit{OpenSSH is a {\em free} version of the SSH\index{ssh} connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp\index{ftp} may not realize that their password is transmitted across the Internet unencrypted, but it @@ -14,6 +14,8 @@ other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.} +\section{X11 forwarding}\index{X11} + \section{sshfs} diff --git a/chap/streaming.tex b/chap/streaming.tex index 82eefdc..e1798f2 100644 --- a/chap/streaming.tex +++ b/chap/streaming.tex @@ -49,6 +49,8 @@ with a crossfader, a jingle player, microphone signal processing \section{liquidsoap} \index{liquidsoap} +\texttt{https://www.liquidsoap.info/} + \begin{quote} Liquidsoap is an extensible and flexible audio stream generator, mainly used for streaming to a shoutcast/icecast server. diff --git a/chap/webcam.tex b/chap/webcam.tex index 0a439a1..a34fb25 100644 --- a/chap/webcam.tex +++ b/chap/webcam.tex @@ -37,11 +37,16 @@ ioctl: VIDIOC_ENUM_FMT Interval: Discrete 0.033s (30.000 fps) \end{verbatim} +Question : quelle méthode utiliser pour avoir la même chose avec +des lignes de code écrites en C ? + % -------------------------------------------------------------------- \section{vgrabbj} \index{vgrabbj} + + D'après la manpage : « \textit{ vgrabbj is a program that will grab images from any v4l-capable device diff --git a/main.tex b/main.tex index 66caa36..9ca7270 100644 --- a/main.tex +++ b/main.tex @@ -14,7 +14,7 @@ \setlength \parindent {1em} -% XXX \setlength \parskip {0.333em} +\setlength \parskip {0.200em} % XXX %------ reglages des 'listings' \lstset{frame=single} % dessin d'un cadre autour du listing @@ -45,10 +45,12 @@ peut-être pas vraiment d'actualité. \vspace{5em} -Tout cette ouvrage a été écrit avec mousepad et \LaTeX{} +Cependant, toute cette ouvrage est en cours de +réécriture avec Mousepad et \LaTeX{} selon la méthode éprouvée dite de «~La~Rache~»\index{rache}, -essentiellement sur une machine Debian/amd64. +essentiellement sur une machine Debian/amd64, avec des +morceaux de Fedora Server 33 à coté\index{Fedora}. \vspace{5em} @@ -63,28 +65,33 @@ Your mileage may vary\dots % ============================================================== \input{chap/shell} -\input{chap/editeurs} +% \input{chap/editeurs} \input{chap/son} \input{chap/image} +\input{chap/reseau} \input{chap/musique} -\input{chap/puredata} +% \input{chap/puredata} \input{chap/MIDI} \input{chap/OSC} \input{chap/backups} -\input{chap/processing} +% \input{chap/processing} \input{chap/video} \input{chap/gnuplot} \input{chap/webcam} -\input{chap/SCSI} +% \input{chap/SCSI} \input{chap/X11} \input{chap/dino} \input{chap/textes} \input{chap/MINITEL} +\input{chap/Raspberry} +\input{chap/Fedora} +\input{chap/IPv6} \input{chap/threads} -\input{chap/dosbox} +% \input{chap/dosbox} \input{chap/photos} +\input{chap/Bonjour} \input{chap/debug} -\input{chap/reseau} +\input{chap/gif89a} \input{chap/IRC} \input{chap/Usenet} \input{chap/DNS} @@ -92,7 +99,7 @@ Your mileage may vary\dots \input{chap/hardware} \input{chap/streaming} \input{chap/gadgets} -\input{chap/slang} +% \input{chap/slang} \input{chap/curses} \input{chap/WiFi} \input{chap/GIT}