14-11-2023
This commit is contained in:
30
docs/Divers/Composer.md
Normal file
30
docs/Divers/Composer.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Composer
|
||||
|
||||
|
||||
|
||||
Installer bibliothèque:
|
||||
|
||||
```bash
|
||||
composer require lsolesen/pel --prefer-dist --classmap-authoritative
|
||||
```
|
||||
|
||||
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/lsolesen/pel/autoload.php';
|
||||
use lsolesen\pel\Pel;
|
||||
use lsolesen\pel\PelDataWindow;
|
||||
use lsolesen\pel\PelJpeg;
|
||||
use lsolesen\pel\PelTag;
|
||||
use lsolesen\pel\PelIfd;
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Supprimer bibliothèque:
|
||||
|
||||
```bash
|
||||
composer remove lsolesen/pel
|
||||
```
|
||||
|
||||
109
docs/Divers/Permajet/Art_lisse.md
Normal file
109
docs/Divers/Permajet/Art_lisse.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# Papiers d'art lisses (6)
|
||||
|
||||
|
||||
|
||||
**Gamme primée de papiers d'art numériques avec des surfaces lisses et délicatement structurées finies avec un revêtement mat multicouche**.
|
||||
|
||||
Ces milieux sans acide de qualité musée sont fabriqués à partir d'Alpha Cellulose, de Cotton Rag ou d'un mélange des deux avec des poids de base de 200 à 310 g/m2. Tous les matériaux sont enduits pour donner à vos images une saturation des couleurs incroyable et des noirs exceptionnellement profonds. Les matériaux de base sont raffinés pour éliminer l'acide et la lignine afin d'assurer et de prolonger la stabilité archivistique.
|
||||
|
||||
Tous les papiers portent un certificat de stabilité archivistique délivré par des laboratoires agréés UKAS. PermaJet, un membre de premier plan et avant-gardiste de la Fine Art Trade Guild, a adopté les normes requises par le système Guilds ArtSureTM pour s'assurer que des normes élevées étaient maintenues dans toute la gamme.
|
||||
|
||||
*« Ces papiers sont merveilleux, très lourds et denses, posés à plat ou montés avec une surface lisse comme du velours. Il fait des impressions qui donnent l'impression qu'elles valent la peine d'être payées. » **David Kilpatrick, rédacteur en chef, Cameracraft Magazine**.*
|
||||
|
||||
|
||||
|
||||
# Alpha Natural Rag 310
|
||||
|
||||
Alpha Natural Rag 310 est un papier jet d'encre d'art avec une surface lisse et mate et une base blanche naturelle. Produisez facilement de beaux résultats Giclée avec ce papier gratuit OBA, le choix parfait pour les artistes et les photographes à la recherche d'un véritable matériau d'art d'archives. Il reproduit des couleurs époustouflantes et vibrantes et une grande profondeur et des détails d'image. La base chaude 100 % coton fournit une plate-forme stable pour les reproductions d'art sans changement de couleur ni amélioration.
|
||||
|
||||
Alpha Natural Rag est très adapté aux photographes de paysage, de portrait et d'art et aux artistes qui désirent une surface très lisse.
|
||||
|
||||
**Alpha Natural Rag 310 est parfait pour...**
|
||||
|
||||
- Véritable archivistique, reproductions d'art sans OBA
|
||||
- Couleurs et profondeur d'image exceptionnelles
|
||||
- Impressions nécessitant une teinte de base naturelle sans changement de couleur
|
||||
|
||||
https://www.permajet.com/product/alpha-natural-rag-310/
|
||||
|
||||
|
||||
|
||||
# Omega Rag 310
|
||||
|
||||
Omega Rag 310 est un papier jet d'encre d'art avec une surface lisse et mate et une base blanche neutre. Il imprime les couleurs à un niveau exceptionnel avec un faible métamérisme, tandis que ses détails d'ombre et sa gradation lisse des tons en font un partenaire idéal pour le travail monochrome. Très adapté aux photographes de paysages et de portraits, ce papier imprime des couleurs complexes, des noirs profonds et des niveaux élevés de détails sans compromis.
|
||||
|
||||
La surface d'Omega Rag a une délicieuse finition lisse qui donne de la profondeur aux images, et une base de chiffon 100 % coton pour une stabilité archivistique et une qualité exceptionnelle. La base lourde a une excellente sensation à portée de main et constituera un excellent choix pour les tirages d'art, les expositions et plus encore.
|
||||
|
||||
**Omega Rag 310 est parfait pour...**
|
||||
|
||||
- Reproductions d'art
|
||||
- Photographes à la recherche d'un papier mat plus lourd
|
||||
- Couleurs complexes et haut niveau de détail
|
||||
|
||||
https://www.permajet.com/product/omega-rag-310/
|
||||
|
||||
|
||||
|
||||
# Photo Art Silk 290
|
||||
|
||||
Photo Art Silk 290 est un papier jet d'encre d'art avec une surface mate en soie et une base blanc moyen. Ce papier mat a un revêtement unique qui prend un éclat de soie luxueux lorsqu'il est imprimé, pétillant dans la lumière et débordant de vitalité. Cela en fait le papier parfait pour les paysages marins et les photographies de paysages à longue exposition, améliorant les résultats et ajoutant une qualité magique.
|
||||
|
||||
Photo Art Silk est un papier d'art avec une différence et créera des tirages remarquables adaptés à tous les usages, de l'art mural aux participations au concours Camera Club. La surface a une texture ondulée subtile pour une vraie sensation d'art, tandis que la base blanche naturelle Alpha Cellulose offre d'excellents rendus de couleurs et des détails nets.
|
||||
|
||||
**Photo Art Silk 290 est parfait pour...**
|
||||
|
||||
- Matières contenant des surfaces réfléchissantes, telles que l'eau
|
||||
- Tirages d'art nécessitant une finition spéciale supplémentaire
|
||||
- Paysages marins à longue exposition
|
||||
|
||||
https://www.permajet.com/product/photo-art-silk-290/
|
||||
|
||||
|
||||
|
||||
# Portfolio Rag 220
|
||||
|
||||
Portfolio Rag 220 est un papier jet d'encre d'art avec une surface lisse et mate et une base naturelle blanc cassé. Il reproduit les couleurs avec beaucoup de profondeur et de clarté, la teinte de base naturelle offrant une précision adaptée aux reproductions d'art. La délicieuse surface mate lisse est parfaite pour le portrait et la photographie de mariage, donnant un aspect de haute qualité sans éléments distrayants. Il a un chiffon 100 % coton, sans acide, qui offre une stabilité archivistique au travailleur sérieux des beaux-arts.
|
||||
|
||||
Portfolio Rag 220 est le papier le plus léger de la gamme des beaux-arts, adapté aux portfolios et aux albums, aux invitations et aux tirages encadrés.
|
||||
|
||||
**Portfolio Rag 220 est parfait pour...**
|
||||
|
||||
- Œuvres d'art adaptées à une surface lisse
|
||||
- Livres photo, invitations, travail en studio
|
||||
|
||||
https://www.permajet.com/product/portfolio-rag-220/
|
||||
|
||||
|
||||
|
||||
# Portrait Rag 285
|
||||
|
||||
Portrait Rag 285 est un papier jet d'encre d'art avec une surface mate classique et une base blanche moyenne. Il a un Dmax incroyable qui produit des noirs profonds et veloutés, et une large gamme de couleurs adaptée aux tons de peau et aux paysages. La surface a une texture subtile qui ajoute du caractère et de la définition aux œuvres d'art sans détourner l'attention du sujet.
|
||||
|
||||
La base de chiffon 100 % coton de Portrait Rag produit une excellente définition tonale et une large gamme de couleurs pour des impressions précises et de haute qualité. Les qualités archivistiques en font un excellent choix pour les photographes, les artistes et les galeries.
|
||||
|
||||
**Portrait Rag 285 est parfait pour...**
|
||||
|
||||
- Portraits et mariages haut de gamme
|
||||
- Noirs profonds et veloutés et couleurs riches
|
||||
- Œuvres d'art d'archives
|
||||
|
||||
https://www.permajet.com/product/portrait-rag-285/
|
||||
|
||||
|
||||
|
||||
# Portrait White 285
|
||||
|
||||
Portrait White 285 est un papier jet d'encre fine art avec une surface mate texturée subtile et une base blanche brillante. Il reproduit magnifiquement les couleurs, rehaussées par le ton de base plus blanc, tandis que les noirs impriment profondément et riches. La surface mate subtile et alvéolée complète la photographie d'art et les œuvres d'art, ajoutant une délicieuse texture douce qui rehausse l'image. Les photographes et les artistes apprécieront d'imprimer leur travail sur Portrait White 285, en particulier ceux qui produisent des portraits, des œuvres clés et des illustrations.
|
||||
|
||||
Ce matériau 100% alpha cellulose est sans acide et idéal pour les impressions standard d'archives.
|
||||
|
||||
**Portrait White 285 est parfait pour...**
|
||||
|
||||
- Représenter la texture des tons de peau dans le portrait d'art
|
||||
- Travail haut de gamme qui bénéficierait d'une base blanche brillante
|
||||
- Œuvre d'art avec des noirs riches et des couleurs vives
|
||||
|
||||
https://www.permajet.com/product/portrait-white-285/
|
||||
|
||||
|
||||
|
||||
65
docs/Divers/Permajet/Art_textures.md
Normal file
65
docs/Divers/Permajet/Art_textures.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Papiers d'art texturés (3)
|
||||
|
||||
|
||||
|
||||
**Matériaux d'art texturés pour l'artiste auto-publiant, le photographe d'art et la maison de reproduction d'art.**
|
||||
|
||||
Des surfaces texturées qui donnent une sensation de profondeur et de subtilité à vos images tout en offrant une densité d'image et une définition des couleurs remarquables.
|
||||
|
||||
Les matériaux moulés sont vraiment emblématiques de la gamme PermaJet, en utilisant du coton raffiné et des fibres naturelles pour constituer la base avec des poids allant de 250 à 325 g/m2.
|
||||
|
||||
Des revêtements avancés sont appliqués à l'aide de la technologie multicouche pour assurer une cohérence uniforme même sur la texture la plus lourde. La reproduction des couleurs dépassera vos attentes dans tous les domaines en fournissant des images qui répondent aux normes les plus élevées de qualité du Musée et de reproduction des beaux-arts de Giclee.
|
||||
|
||||
Chaque papier est certifié pour sa qualité et sa longévité par des laboratoires indépendants qui travaillent à répondre aux normes attendues par le système ArtSureTM de la Fine Art Trade Guild de renommée internationale.
|
||||
|
||||
|
||||
|
||||
# Artist Watercolour 250
|
||||
|
||||
Artist Watercolour 250 est un papier jet d'encre d'art avec une surface fortement texturée et une base blanche naturelle. Ce papier sans OBA rappelle les matériaux traditionnels pour l'aquarelle, avec une texture tissée proéminente qui donne un superbe effet réaliste lors de la reproduction de croquis et de peintures. Artist Watercolour est également fantastique pour imprimer des photographies d'art, la texture faisant ressortir des détails subtils et ajoutant une finition unique de haute qualité.
|
||||
|
||||
La base blanche naturelle de ce papier Alpha Cellulose a une gamme de couleurs et une netteté exceptionnelles, assurant que votre travail imprime à son meilleur. Convient pour une utilisation archivistique dans les galeries, les expositions et plus encore.
|
||||
|
||||
**Artist Watercolour 250 est parfait pour...**
|
||||
|
||||
- Œuvres d'art artistiques, en particulier de grandes envergure
|
||||
- Croquis et peintures, pour une reproduction réaliste des textures
|
||||
- Superbes couleurs et définition
|
||||
|
||||
https://www.permajet.com/product/artist-watercolour-250/
|
||||
|
||||
|
||||
|
||||
# Gallery Etching 310
|
||||
|
||||
Gallery Etching 310 est un papier jet d'encre d'art avec une surface fortement texturée et une base blanche naturelle. Ce papier présente des détails d'image impressionnants et une vivacité des couleurs, un excellent choix pour les artistes et les photographies créatives. La texture de surface est constituée d'ondulations prononcées au hasard, qui ajoutent de la vie à une image lorsqu'elle est imprimée. Cette texture convient particulièrement aux reproductions d'artistes, imitant les qualités élevées de la peinture à l'huile pour un look presque 3D. Il offre également une qualité et une profondeur délicieuses aux photographies qui bénéficieraient d'une texture supplémentaire, telles que des natures mortes et des paysages d'art.
|
||||
|
||||
Gallery Etching 310 a une base Alpha Cellulose sans acide et un impressionnant revêtement résistant aux éraflures, avec des qualités d'archivage qui répondent aux normes de la galerie.
|
||||
|
||||
**Gallery Etching 310 est parfait pour...**
|
||||
|
||||
- Reproductions d'art détaillées, en particulier des œuvres d'art
|
||||
- Images nécessitant un aspect de texture supplémentaire
|
||||
- Couleurs audacieuses et vibrantes et noirs profonds
|
||||
|
||||
https://www.permajet.com/product/gallery-etching-310/
|
||||
|
||||
|
||||
|
||||
# Museum Heritage 310
|
||||
|
||||
Museum Heritage 310 est un papier jet d'encre d'art avec une surface texturée et une base blanc moyen. Il imprime avec des détails et une clarté exceptionnels, rehaussés par le tissage texturé rugueux qui est très adapté à la photographie d'art, aux scènes rustiques et aux portraits détaillés. Ce papier mélange coton et Alpha Cellulose est parfait pour les artistes qui souhaitent reproduire leur travail, la base blanc moyen offrant des rendus de couleurs et monochromes exceptionnels.
|
||||
|
||||
Museum Heritage a un revêtement supérieur qui imprime d'excellents détails de surbrillance et d'ombre avec un Dmax élevé. La surface texturée ajoute de la profondeur et de la qualité aux images pour un aspect et une sensation très spéciaux, adaptés aux expositions professionnelles, aux galeries, aux musées et aux artistes.
|
||||
|
||||
**Museum Heritage 310 est parfait pour...**
|
||||
|
||||
- Œuvres d'art qui nécessitent plus de profondeur, avec des
|
||||
détail de la surbrillance et de l'ombre
|
||||
- Couleurs complexes et pièces très détaillées
|
||||
- Scènes et paysages rustiques, portraits « météorologiques »
|
||||
|
||||
https://www.permajet.com/product/museum-heritage-310/
|
||||
|
||||
|
||||
|
||||
101
docs/Divers/Permajet/Baryta.md
Normal file
101
docs/Divers/Permajet/Baryta.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# Papiers Baryta à base de fibres (5)
|
||||
|
||||
|
||||
|
||||
**Lancé en 2004, PermaJet a été le pionnier des médias numériques de Baryta.**
|
||||
|
||||
Papiers à base de fibres (Baryta) avec une structure traditionnelle de chambre noire, ce qui en fait l'alternative à jet d'encre numérique parfaite aux papiers à l'halogénure d'argent d'origine.
|
||||
|
||||
Les bases alpha-cellulose ont la sensation légèrement striée que vous attendez des papiers traditionnels pour chambre noire et sont disponibles avec des options de surface lisses et délicatement structurées. Avec des poids de base allant de 285 à 325 g/m2, PermaJet a créé une gamme de produits Baryta « à plat » qui alimentent facilement votre imprimante à jet d'encre.
|
||||
|
||||
Le revêtement multicouche amélioré, combiné à la technologie d'encre moderne, vous assure d'obtenir les cotes Dmax les plus élevées avant que possible. Ces caractéristiques fonctionnent ensemble pour offrir la gamme de tons la plus large afin d'améliorer les détails de la surbrillance et de l'ombre, offrant des images monochromes nettes et des couleurs percutantes.
|
||||
|
||||
Une véritable collection d'arrêt de spectacle maintenant disponible en Gloss (subtil brillant séché à l'air) Pearl, Silk et Matt. Les longueurs des rouleaux sont toutes de 15 mètres et disponibles jusqu'à 60'' de large à des fins de production et des supports en feuilles A4 - A2. Les surfaces sont toutes sèches instantanément et ont des finitions résistantes aux éraflures, ce qui les rend idéales pour une utilisation avec des encres à base de colorants et de pigments.
|
||||
|
||||
Développé avec la stabilité archivistique et les processus de test associés à la Fine Art Trade Guild de renommée internationale à l'esprit - une garantie que vos images dureront de nombreuses années à venir.
|
||||
|
||||
Lors de tests indépendants de plus de 200 papiers d'art et photo jet d'encre, ils ont donné la plus grande précision D-MAX, de gamme de couleurs et de tons de peau, créant à son tour d'excellentes niveaux de gris pour les images monochromes.
|
||||
|
||||
|
||||
|
||||
# FB Distinction 320
|
||||
|
||||
FB Distinction 320 est un papier jet d'encre à base de fibres avec une surface subtilement brillante et une teinte de base blanche brillante. Rappelant les matériaux traditionnels de la chambre noire, ce papier baryte imprime avec des détails exceptionnels, Dmax et une gamme de tons. La surface brillante a un éclat délicat qui élève les photographies et les œuvres d'art.
|
||||
|
||||
Créez des impressions audacieuses et percutantes qui se démarquent sur la base blanche brillante Alpha Cellulose, ajoutant de la vie aux couleurs et créant du contraste. Les noirs profonds et la large gamme de tons font de FB Distinction 320 un excellent choix pour les travaux monochromes à contraste élevé, ou les images en couleur qui bénéficieraient d'une teinte de base améliorée pour vraiment se démarquer et créer un impact.
|
||||
|
||||
**FB Distinction 320 est parfait pour...**
|
||||
|
||||
- Images avec beaucoup de détails et de profondeur d'ombre
|
||||
- Images percutantes et à contraste élevé
|
||||
- Monochromes qui bénéficieraient d'une base blanche brillante
|
||||
|
||||
https://www.permajet.com/product/fb-distinction-320/
|
||||
|
||||
|
||||
|
||||
# FB Gold Silk 315
|
||||
|
||||
FB Gold Silk 315 est un papier jet d'encre à base de fibres avec une surface satinée et une teinte de base chaude naturelle. Ce papier primé a un Dmax record, ce qui vous permet d'imprimer les noirs les plus profonds et les plus veloutés qui créent du contraste et de la définition. Avec des détails nets et une belle couleur et une capacité monochrome, combinées à la somptueuse surface en soie, FB Gold Silk est la quintessence de la qualité. Il reproduit les matériaux traditionnels de la chambre noire baryte avec une finesse qui impressionnera tout spectateur.
|
||||
|
||||
Créez des impressions exceptionnelles à chaque fois grâce à l'adéquation de ce papier à un large éventail de sujets et de types d'images. FB Gold Silk 315 excelle avec les portraits et le travail monochrome, grâce à sa large gamme de tons et à sa teinte de base chaude. Ce papier Alpha Cellulose est idéal pour les concours photographiques, les expositions, les portfolios et plus encore.
|
||||
|
||||
**FB Gold Silk 315 est parfait pour...**
|
||||
|
||||
- Noirs et ombres profonds sans perte de détails
|
||||
- Images du côté plus chaud, en particulier les tons de peau
|
||||
- Chambre noire rappelant les imprimés, fans de la soie originale en fibre d'or Ilford Galerie
|
||||
|
||||
https://www.permajet.com/product/fb-gold-silk-315/
|
||||
|
||||
|
||||
|
||||
# FB Matt 285
|
||||
|
||||
FB Matt 285 est un papier jet d'encre à base de fibres avec une surface mate lisse et une teinte de base blanche brillante. Rappelant le papier chambre noire traditionnel, et la seule variété mate de la gamme, c'est une alternative fantastique pour les photographes et les artistes qui préfèrent les finitions mates.
|
||||
|
||||
Ce papier Alpha Cellulose est hautement recherché pour sa surface mate lisse et veloutée, qui imprime avec des tons nuancés et des détails nets. C'est le choix parfait pour une variété d'images, des paysages doux à l'architecture saisissante, et il capturera chaque détail avec sa couche de base de baryte supérieure. Des images monochromes s'impriment avec une merveilleuse gamme de tons et des noirs nets, tandis que les couleurs sont délicates et sophistiquées. La surface mate et la technologie de pose à plat rendent ce papier très approprié pour l'encadrement, idéal pour les expositions photographiques, les galeries d'art et les œuvres d'art mural.
|
||||
|
||||
**FB Matt 285 est parfait pour...**
|
||||
|
||||
- Monochromes avec une large gamme de tons
|
||||
- Paysage et art moderne avec des gradations lisses
|
||||
- Impressions de haute qualité qui seront visualisées derrière le verre
|
||||
|
||||
https://www.permajet.com/product/fb-matt-285/
|
||||
|
||||
|
||||
|
||||
# FB Pearl 300
|
||||
|
||||
FB Pearl 300 est un papier jet d'encre à base de fibres avec une superbe surface perlée et une teinte de base blanche naturelle. Créez de somptueux imprimés qui rappellent les matériaux traditionnels de chambre noire aux halogénures d'argent, avec une excellente gamme de tons, des détails et Dmax, le choix parfait pour les travailleurs monochromes. La photographie couleur et les illustrations imprimeront avec une vivacité et une profondeur qui attirent le spectateur.
|
||||
|
||||
La surface en perles a un aspect luxueux qui ajoute de la vie aux images et une sensation générale de qualité. FB Pearl 300 est un excellent choix pour la photographie de portrait et de paysage grâce à sa large gamme de tons et à sa base blanche naturelle. Fabriqué à partir d'Alpha Cellulose, il est sans acide et sans OBA, ce qui permet des impressions de qualité archivistique à 100 %. La finition de haute qualité et la longévité archivistique font de ce papier le choix idéal pour les tirages d'art et les expositions.
|
||||
|
||||
**FB Pearl 300 est parfait pour...**
|
||||
|
||||
- Portraits et paysages nécessitant une finition luxueuse et étincelante
|
||||
- Imprimés de qualité chambre noire
|
||||
- Prises de vue et images à longue exposition avec beaucoup de tons moyens
|
||||
|
||||
https://www.permajet.com/product/fb-pearl-300/
|
||||
|
||||
|
||||
|
||||
# FB Royal Gloss 310
|
||||
|
||||
*Veuillez noter que le stock actuel de FB Royal Gloss 310 a subi un changement de température et a maintenant une teinte de base plus blanche*
|
||||
FB Royal Gloss 310 est un papier jet d'encre à base de fibres avec une surface brillante raffinée et une teinte de base blanche naturelle. Rappelant les matériaux traditionnels émaillés de la chambre noire, ce papier a un bel aspect et une belle sensation avec de subtiles ondulations à travers la surface. Il imprime avec des détails glorieux et des couleurs fidèles à la réalité grâce à la base blanche naturelle, l'option parfaite pour les photographes animaliers, portraits et paysages.
|
||||
|
||||
Ce papier Alpha Cellulose a une base de baryte sans acide et une sensation de poids lourd désirable, idéal pour les expositions d'art, les concours et plus encore. Sa qualité d'impression est exceptionnelle et ne manquera pas d'impressionner tous les amateurs traditionnels de chambre noire.
|
||||
|
||||
**FB Royal Gloss 310 est parfait pour...**
|
||||
|
||||
- Couleurs fidèles à la vie et noirs profonds
|
||||
- Expositions et œuvres d'art
|
||||
- Répliques d'impressions traditionnelles à base de fibres émaillées
|
||||
|
||||
https://www.permajet.com/product/fb-royal-gloss-310/
|
||||
|
||||
|
||||
|
||||
176
docs/Divers/Permajet/Photo_numerique.md
Normal file
176
docs/Divers/Permajet/Photo_numerique.md
Normal file
@@ -0,0 +1,176 @@
|
||||
# Papiers photo numérique (10)
|
||||
|
||||
|
||||
|
||||
Une gamme créativement équilibrée de papiers photographiques, graphiques et d'impression d'affiches développée au cours des 25 dernières années pour donner à vos images et œuvres d'art un rendu parfait à un prix attractif.
|
||||
|
||||
Adaptés à une utilisation avec les encres colorantes et pigmentaires, ces papiers photo numériques peuvent être utilisés dans n'importe quelle imprimante à jet d'encre et sont tous dotés d'une technologie de séchage instantané. Les matériaux de base en papier « blanc brillant » sont enduits pour donner une large gamme de couleurs et un Dmax exceptionnellement élevé. La combinaison de nos avancées technologiques a été fournie pour vous donner des images nettes et nettes impressionnantes à la densité d'impression la plus élevée, donnant à votre image l'aspect et la sensation dynamiques que vous voulez créer.
|
||||
|
||||
|
||||
|
||||
# Gloss 271
|
||||
|
||||
Gloss 271 est un papier jet d'encre instantané sec et brillant avec une base blanche brillante. Il imprime avec des couleurs vives et des détails nets, parfait pour les photos de famille de tous les jours jusqu'au travail en studio commercial. La surface reproduit une belle gamme de tons et un contraste profond, fini par un brillant lisse et étincelant qui ajoutera de la vie à n'importe quelle image. Gloss 271 est un excellent choix pour la photographie audacieuse et le travail graphique qui doit avoir l'air net et percutant.
|
||||
|
||||
Ce papier photo numérique enduit de résine a un poids de 271 g/m2 qui passera sans effort à travers votre imprimante tout en ayant une sensation de haute qualité à portée de main. Son superporeux et protecteur UV ajoute un haut niveau de résistance à l'humidité et à la décoloration, assurant que vos photos ont l'air fantastiques pour les années à venir.
|
||||
|
||||
**Gloss 271 est parfait pour...**
|
||||
|
||||
- Cas où une finition haute brillance est souhaitée
|
||||
- Couleurs vibrantes et saturées
|
||||
- Impressions quotidiennes, publicité et travail en studio
|
||||
|
||||
https://www.permajet.com/product/gloss-271/
|
||||
|
||||
|
||||
|
||||
# MattPlus 240
|
||||
|
||||
MattPlus 240 est un papier jet d'encre de poids moyen avec une surface mate lisse. Créez des impressions vibrantes et percutantes avec la somptueuse surface mate qui donne de la profondeur aux images sans éblouissement ni textures gênants. Les impressions sur ce papier ont des détails nets incroyables et des couleurs riches, tandis que l'impressionnante gamme de tons rend ce papier tout aussi désirable pour le travail monochrome.
|
||||
|
||||
MattPlus 240 a une teinte de base blanche propre qui fournit des impressions précises, ce qui en fait un choix fantastique pour les reproductions d'œuvres d'art numériques, les peintures murales photographiques et les documents marketing.
|
||||
|
||||
Ce papier photo numérique a une base Alpha Cellulose, offrant une grande qualité et des résultats qui auront l'air fantastiques pour les années à venir. Son poids de 240 g/m2 alimente sans effort n'importe quelle imprimante tout en ayant une sensation de qualité.
|
||||
|
||||
**Matt Plus 240 est parfait pour...**
|
||||
|
||||
- Couleurs profondes et nettes et détails nets
|
||||
- Faune et portraits aux tons doux
|
||||
- Impression quotidienne nécessitant une finition mate
|
||||
|
||||
https://www.permajet.com/product/matt-plus-240/
|
||||
|
||||
|
||||
|
||||
# Matt Proofing 160
|
||||
|
||||
Matt Proofing 160 est le papier jet d'encre le plus léger de la gamme PermaJet et une option très économique. Il a une surface mate lisse et est conçu avec l'épreuvage d'image à l'esprit, idéal pour produire des impressions d'essai et des feuilles de contact sans gaspiller de matériaux à coût plus élevé.
|
||||
|
||||
Bien que conçu pour les exigences de fermentation, ce papier Alpha Cellulose atteint toujours une excellente qualité et une excellente saturation encre pour les tirages photographiques de tous les jours. Cela rend Matt Proofing 160 parfait pour les photographes et les artistes à la recherche d'un papier jet d'encre avec un poids de base très léger. Sa surface lisse est nette et brillante, produisant des couleurs et des noirs forts.
|
||||
|
||||
En raison de son poids léger, ce papier alimente sans effort à travers n'importe quelle imprimante à jet d'encre.
|
||||
|
||||
**Matt Proofing 160 est parfait pour...**
|
||||
|
||||
- Feuilles de contact et tirages de test
|
||||
- Impression à usage général nécessitant un poids de base inférieur
|
||||
|
||||
https://www.permajet.com/product/matt-proofing-160/
|
||||
|
||||
|
||||
|
||||
# Oyster 271
|
||||
|
||||
Le papier jet d'encre le plus populaire de PermaJet, Oyster 271, est instantanément sec avec une base blanche brillante et une subtile surface perlée. Son revêtement microporeux offre un Dmax incroyable assurant une large gamme de tons et des couleurs riches et saturées, garantissant que même les images complexes donnent le meilleur d'elles-mêmes. Il a une surface de lustre magnifiquement délicate qui améliore les impressions sans se distraire du sujet, ce qui en fait un favori des photographes et des artistes.
|
||||
|
||||
Oyster 271 est trois fois primé et est souvent décrit comme un excellent papier polyvalent, convenant à une grande variété d'images, ce qui en fait un must pour le stock de chaque imprimeur. Ce papier photo numérique enduit de résine a un poids de 271 g/m2 qui passera sans effort à travers n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main. Sa supercouche de protection UV ajoute un haut niveau de résistance à l'humidité et à la décoloration, ce qui garantit que vos photos sont fantastiques pour les années à venir.
|
||||
|
||||
**Oyster 271 est parfait pour...**
|
||||
|
||||
- Exigences quotidiennes, du portrait à la faune
|
||||
- Images couleur et monochromes
|
||||
- Débutants cherchant à se familiariser avec l'impression
|
||||
|
||||
https://www.permajet.com/product/oyster-271/
|
||||
|
||||
|
||||
|
||||
# Photo Lustre 310
|
||||
|
||||
Photo Lustre 310 est un papier jet d'encre blanc brillant avec une surface luxueuse et brillante. Les couleurs sont profondes et saturées, et les images monochromes s'impriment avec une gamme de tons et un contraste incroyables. Le Dmax élevé donne des noirs intenses et riches tout en atteignant la définition dans les zones d'ombre. Sa finition lustrée est subtile tout en ajoutant un niveau de définition supplémentaire.
|
||||
|
||||
Ce papier photo numérique primé a un poids de base lourd pour une sensation de qualité que l'on trouve rarement dans un papier aussi économique, et une surface résistante et résistante aux rayures. Cela rend Photo Lustre 310 idéal pour toutes sortes d'utilisation où des couleurs percutantes et un contraste audacieux sont une priorité, des portfolios photographiques aux affichages de conception graphique.
|
||||
|
||||
Photo Lustre 310 dispose d'une supercouche microporeuse de protection contre les UV qui ajoute un niveau élevé de résistance à l'humidité et à la décoloration, garantissant que vos photographies et vos œuvres d'art ont l'air fantastiques pour les années à venir.
|
||||
|
||||
**Photo Lustre 310 est parfait pour...**
|
||||
|
||||
- Des couleurs riches et des noirs profonds et frappants
|
||||
- Impression quotidienne nécessitant une sensation de haute qualité
|
||||
- Images monochromes détaillées avec un fort contraste
|
||||
|
||||
https://www.permajet.com/product/photo-lustre-310/
|
||||
|
||||
|
||||
|
||||
# Smooth Gloss 280
|
||||
|
||||
Smooth Gloss 280 est un papier jet d'encre sec instantané avec une finition miroir et brillante et une teinte de base chaude. Les images s'impriment avec dynamisme et précision détaillée, ce qui en fait le papier parfait pour les photographes ayant une publicité à fort impact et un travail en studio. Le Dmax élevé est capable de noirs profonds et d'une bonne gamme de tons, garantissant que les impressions sur Smooth Gloss 280 sont percutantes et nettes, finies avec la surface brillante qui ajoute un niveau supplémentaire de profondeur et d'impact.
|
||||
|
||||
Ce papier photo numérique enduit de résine a un poids de 280 g/m2 qui se nourrira sans effort à travers n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main. Sa supercouche microporeuse de protection UV ajoute un haut niveau de résistance à l'humidité et à la décoloration, garantissant que vos photographies et vos œuvres d'art sont fantastiques pour les années à venir.
|
||||
|
||||
**Smooth Gloss 280 est parfait pour...**
|
||||
|
||||
- Images où une teinte de base plus chaude est préférée
|
||||
- Images couleur et monochromes haute définition
|
||||
- Publicité, travail en studio, impression quotidienne
|
||||
|
||||
https://www.permajet.com/product/smooth-gloss-280/
|
||||
|
||||
|
||||
|
||||
# Smooth Pearl 280
|
||||
|
||||
Smooth Pearl 280 est un papier jet d'encre sec instantané au fini perlé subtil. Il a une teinte de base naturelle blanche/chaude qui le rend idéal pour les tons de peau, les studios de portrait, la photographie de paysage et les reproductions d'art. La superbe surface lisse avec sa finition perlée raffinée donne la sensation de luxe que l'on retrouve dans les papiers plus chers. Smooth Pearl 280 dispose d'un Dmax exceptionnel, capable de produire des noirs profonds et une large gamme de tons, adapté à la fois au travail monochrome et en couleur.
|
||||
|
||||
Ce papier photo numérique enduit de résine a un poids de 280 g/m2 qui se nourrira sans effort à travers n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main. Sa supercouche microporeuse de protection UV ajoute un haut niveau de résistance à l'humidité et à la décoloration, garantissant que vos photographies et vos œuvres d'art sont fantastiques pour les années à venir.
|
||||
|
||||
**Smooth Pearl 280 est parfait pour...**
|
||||
|
||||
- Impression quotidienne où une base plus chaude est préférée
|
||||
- Portraits aux tons lisses
|
||||
- Fans de l'original Ilford Smooth Pearl
|
||||
|
||||
https://www.permajet.com/product/smooth-pearl-280/
|
||||
|
||||
|
||||
|
||||
# Titanium Gloss 300
|
||||
|
||||
Titanium Gloss 300 est un papier jet d'encre brillant avec une base métallique unique. Il a un sous-ton argenté qui donne vie à des images où les sujets contiennent du métal, de l'eau et des surfaces réfléchissantes, les faisant briller sous la lumière.Ce papier photo numérique primé est le choix créatif idéal pour que votre travail se démarque et ait un impact élevé. La surface brillante n'est pas écrasante, ajoutant plutôt une finition luxueuse, tandis que les couleurs brillent presque grâce à la base réfléchissante à la lumière. Titanium Gloss 300 imprime avec des détails et une clarté incroyables et fonctionne extrêmement bien avec des images qui ont des couleurs vives, des noirs profonds et des zones blanches/argent qui permettent à la base métallique de transparaisse.
|
||||
|
||||
Ce papier enduit de résine a un poids de 300 g/m2 qui se nourrit sans effort à travers n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main.
|
||||
|
||||
**Titanium Gloss 300 est parfait pour...**
|
||||
|
||||
- Images avec de l'eau, du métal ou des sujets réfléchissants
|
||||
- Couleurs vives et monochromes contrastés
|
||||
- Images avec des zones blanches et des reflets pour permettre la base métallique pour briller
|
||||
|
||||
https://www.permajet.com/product/titanium-gloss-300/
|
||||
|
||||
|
||||
|
||||
# Titanium Lustre 280
|
||||
|
||||
Titanium Lustre 280 est un papier jet d'encre primé avec une base métallique unique et une surface éclatée subtile. Les images sautent de la page avec une apparence dramatique et un haut niveau de détail.
|
||||
|
||||
Ce papier photo numérique fonctionne particulièrement bien avec les images monochromes et HDR, sa base métallique argentée se prêtant à de larges gammes de tons et à des images à contraste élevé. Les subtiles ondulations de la surface brillante captent magnifiquement la lumière, ajoutant un éclat aux sujets qui contiennent du métal ou une surface réfléchissante, tandis que la base en papier métallique ajoute une sensation fidèle à la vie. Cela fait de Titanium Lustre 280 un choix créatif et remarquable pour cette œuvre spéciale.
|
||||
|
||||
Ce papier photo numérique enduit de résine a un poids de 280 g/m2 qui alimente sans effort n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main.
|
||||
|
||||
**Titanium Lustre 280 est parfait pour...**
|
||||
|
||||
- Images avec de l'eau, du métal ou des sujets réfléchissants
|
||||
- Couleurs vives et monochromes contrastés
|
||||
- Images avec des zones blanches et des reflets pour permettre la base métallique pour briller
|
||||
|
||||
https://www.permajet.com/product/titanium-lustre-280/
|
||||
|
||||
|
||||
|
||||
# Ultra Pearl 295
|
||||
|
||||
Ultra Pearl 295 est un papier jet d'encre blanc brillant avec une surface traditionnelle en perles prononcée. La base blanche brillante soulève les images et ajoute un look net adapté à un travail audacieux et discret. Il a un Dmax élevé qui imprime des noirs profonds et riches qui contrastent magnifiquement avec la teinte de base.
|
||||
|
||||
Ce papier photo numérique est particulièrement adapté au travail commercial, de la photographie scolaire aux mariages, grâce à sa surface robuste résistante aux éraflures et à ses propriétés anti-scan uniques, qui dissuadent toute tentative de reproduire vos impressions.
|
||||
|
||||
Ultra Pearl a un poids de 295 g/m2 qui passera sans effort à travers n'importe quelle imprimante à jet d'encre tout en ayant une sensation de haute qualité à portée de main. Sa supercouche microporeuse de protection UV ajoute un haut niveau de résistance à l'humidité et à la décoloration, garantissant que vos photographies et vos œuvres d'art sont fantastiques pour les années à venir.
|
||||
|
||||
**Ultra Pearl 295 est parfait pour...**
|
||||
|
||||
- Impressions qui seront beaucoup manipulées, signalisation intérieure
|
||||
- Photographie d'école et de studio - grâce à la couche anti-scan !
|
||||
- Images avec des noirs profonds
|
||||
|
||||
https://www.permajet.com/product/ultra-pearl-295/
|
||||
@@ -17,6 +17,8 @@ https://github.com/deanishe/alfred-stackexchange
|
||||
|
||||
Prefix a word in your `<query>` with `.` (full stop) to indicate that it's a tag, e.g `requests .python` will search for answers tagged `python` with the query `requests`.
|
||||
|
||||
|
||||
|
||||
### GitHub Repos workflow for Alfred
|
||||
|
||||
http://www.packal.org/workflow/github-repos
|
||||
@@ -63,19 +65,14 @@ You can generate links to any of your notes and use them on macOS or iOS. Copy t
|
||||
|
||||
https://github.com/ruedap/alfred-font-awesome-workflow
|
||||
|
||||
|
||||
|
||||
### RemoveQuarantine
|
||||
|
||||
https://github.com/vitorgalvao/alfred-workflows/tree/master/RemoveQuarantine
|
||||
|
||||
- `rq`
|
||||
- `fa <query>`
|
||||
|
||||
|
||||
|
||||
### Intégration iTerm2 à Alfred
|
||||
|
||||
https://github.com/vitorgalvao/custom-alfred-iterm-scripts
|
||||
- `Enter`: Paste class name (**for coding HTML/CSS**. e.g. `fa-arrow-circle-o-right`)
|
||||
- `Ctrl + Enter`: Paste character name and ligatures shoud convert the letter into the correct symbol. (**for designing in Photoshop, Illustrator, etc**)
|
||||
- `Shift + Enter`: Paste character code (e.g. `f18e`)
|
||||
- `Command + Enter`: Open in browser (e.g. http://fontawesome.io/icon/arrow-circle-o-right)
|
||||
|
||||
|
||||
|
||||
@@ -113,21 +110,13 @@ http://www.packal.org/workflow/mac-app-store-search
|
||||
|
||||
|
||||
|
||||
## Cheatsheet
|
||||
### Search Browser tabs
|
||||
|
||||
https://github.com/mutdmour/alfred-workflow-cheatsheet
|
||||
https://github.com/luceat-lux-vestra/search-browser-tabs-for-alfred
|
||||
|
||||
# alfred-amphetamine
|
||||
- `tabs <query>`
|
||||
|
||||
https://github.com/demartini/alfred-amphetamine
|
||||
|
||||
### Alfred Browser Tabs
|
||||
|
||||
https://github.com/epilande/alfred-browser-tabs
|
||||
|
||||
### Joplin Noteplan Actions
|
||||
|
||||
https://github.com/beet/joplin_alfred_actions
|
||||
|
||||
### Play Song
|
||||
|
||||
@@ -145,6 +134,8 @@ https://github.com/caleb531/play-song
|
||||
`shuffleoff` —
|
||||
`shuffletoggle` —
|
||||
|
||||
|
||||
|
||||
### Search-Alfred-Workflows
|
||||
|
||||
https://github.com/Acidham/search-alfred-workflows
|
||||
@@ -217,7 +208,23 @@ https://github.com/qiujie8092916/alfred_remote_IINA_Controller
|
||||
|
||||
|
||||
|
||||
### Cheatsheet
|
||||
|
||||
https://github.com/mutdmour/alfred-workflow-cheatsheet
|
||||
|
||||
## alfred-amphetamine
|
||||
|
||||
https://github.com/demartini/alfred-amphetamine
|
||||
|
||||
### Alfred Browser Tabs
|
||||
|
||||
https://github.com/epilande/alfred-browser-tabs
|
||||
|
||||
### Joplin Noteplan Actions
|
||||
|
||||
https://github.com/beet/joplin_alfred_actions
|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
|
||||
196
docs/Divers/bash/HereDoc.md
Normal file
196
docs/Divers/bash/HereDoc.md
Normal file
@@ -0,0 +1,196 @@
|
||||
# HereDoc
|
||||
|
||||
|
||||
|
||||
- **Commande** - Toute commande (chat, wc, courrier, etc.) qui accepte la redirection.
|
||||
- **Opérateur de redirection (`<<`)** - L'opérateur par défaut pour HereDoc est `**<<**`. Il redirige le bloc de code vers la commande pour le traitement.
|
||||
- **Delimiter Token** - The delimiter token denotes the start and end of the document (code block). The delimiter token can be anything but it should be identical. Typically you will see `EOF` is used as delimiter
|
||||
|
||||
|
||||
|
||||
#### Afficher une chaîne multi-ligne avec HereDoc
|
||||
|
||||
```bash
|
||||
$ cat << EOF
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.EOF
|
||||
heredoc
|
||||
EOF
|
||||
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.EOF
|
||||
heredoc
|
||||
```
|
||||
|
||||
#### Compter des lignes
|
||||
|
||||
```bash
|
||||
$ wc -l << BLK
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.EOF
|
||||
heredoc
|
||||
BLK
|
||||
|
||||
5
|
||||
```
|
||||
|
||||
#### Redirection et pipe
|
||||
|
||||
```bash
|
||||
$ cat << EOF > /tmp/heredoc.txt
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.
|
||||
EOF
|
||||
|
||||
$ bat /tmp/heredoc.txt
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.
|
||||
```
|
||||
|
||||
#### Suppression des Tab
|
||||
|
||||
Faire suivre l'opérateur de redirection par "-"
|
||||
|
||||
```bash
|
||||
$ cat <<- err_msg
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.
|
||||
err_msg
|
||||
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.
|
||||
```
|
||||
|
||||
#### Expansion de variables et commandes
|
||||
|
||||
```bash
|
||||
AUTHOR="OSTechNix"
|
||||
|
||||
cat << EOF
|
||||
Author: ${AUTHOR} # USER DEFINED VARIABLE
|
||||
Article: Bash Heredoc
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
Author: OSTechNix # USER DEFINED VARIABLE
|
||||
Article: Bash Heredoc
|
||||
I am using the /bin/zsh shell # ENV VARIABLE
|
||||
bruno # EXTERNAL COMMAND
|
||||
```
|
||||
|
||||
Supprimer l'expansion (cat << 'EOF'):
|
||||
|
||||
```bash
|
||||
AUTHOR="OSTechNix"
|
||||
|
||||
cat << 'EOF'
|
||||
Author: ${AUTHOR} # USER DEFINED VARIABLE
|
||||
Article: Bash Heredoc
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
Author: ${AUTHOR} # USER DEFINED VARIABLE
|
||||
Article: Bash Heredoc
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
```
|
||||
|
||||
#### Commentaire multi-lignes:
|
||||
|
||||
```bash
|
||||
: << 'COMMENTS'
|
||||
Souvent, pour s’amuser, les hommes d’équipage
|
||||
Prennent des albatros, vastes oiseaux des mers,
|
||||
Qui suivent, indolents compagnons de voyage,
|
||||
Le navire glissant sur les gouffres amers.
|
||||
COMMENTS
|
||||
|
||||
```
|
||||
|
||||
#### Echapper les caractères spéciaux:
|
||||
|
||||
```bash
|
||||
# SINGLE QUOTES ESCAPE
|
||||
cat << 'EOF'
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
|
||||
# DOUBLE QUOTES ESCAPE
|
||||
cat << "EOF"
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
|
||||
# BACKSLASH ESCAPE
|
||||
cat << \EOF
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
|
||||
# BACKSLASH ESCAPE (one charactere)
|
||||
cat << EOF
|
||||
I am using the \${SHELL} shell # ENV VARIABLE
|
||||
$(whoami) # EXTERNAL COMMAND
|
||||
EOF
|
||||
|
||||
I am using the ${SHELL} shell # ENV VARIABLE
|
||||
bruno # EXTERNAL COMMAND
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Exemples d'utilisation:
|
||||
|
||||
```bash
|
||||
$ ssh -T user@host << EOF
|
||||
Command 1...
|
||||
Command 2..
|
||||
.....
|
||||
Command N..
|
||||
EOF
|
||||
```
|
||||
|
||||
```bash
|
||||
# add -T flag to ssh command which will disable pseudo-terminal allocation.
|
||||
|
||||
declare -a server=( host1 host2 host3 )
|
||||
for host in ${server[@]}
|
||||
do
|
||||
ssh -T user@${host} << EOF
|
||||
echo "Running at host - ${host}"
|
||||
if [[ ! -f /home/ostechnix/test ]];then
|
||||
touch /home/ostechnix/test
|
||||
echo "File Created"
|
||||
else
|
||||
echo "File exists"
|
||||
fi
|
||||
EOF
|
||||
done
|
||||
```
|
||||
|
||||
@@ -93,3 +93,14 @@ Le script exécuté a comme basename chemins.sh, dirname /Users/bruno/Documents/
|
||||
Le répertoire courant est /Users/bruno/Documents/shell_scripts
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### realpath
|
||||
|
||||
```bash
|
||||
fullPATH=$(realpath "$0")
|
||||
|
||||
echo "fullPATH: $fullPATH"
|
||||
fullPATH: /Users/bruno/Documents/Scripts/bash/handbrake_for_plex.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -154,3 +154,18 @@ for i in {1..5}; do printf "#EXTM3U\n" > ${i}star.m3u; find . -type f -exec grep
|
||||
r
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Connaitre le nom du Terminal:
|
||||
|
||||
```bash
|
||||
$ ps -p $$ -o args,ppid
|
||||
ARGS PPID
|
||||
-zsh 705
|
||||
|
||||
$ ps -p 705 -o args # <- PPID
|
||||
ARGS
|
||||
/usr/bin/login -fqpl bruno /Applications/iTerm.app/Contents/MacO
|
||||
|
||||
```
|
||||
|
||||
|
||||
39
docs/Divers/bash/getopts.md
Normal file
39
docs/Divers/bash/getopts.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# getopts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
| getopts | getopt (BSD) | getopt (GNU) |
|
||||
| ------------------ | -------------------------------- | ------------------------------------------------- |
|
||||
| builtin Bash | bin: <br />/usr/bin/getopt<br /> | bin:<br />/opt/homebrew/opt/gnu-getopt/bin/getopt |
|
||||
| option courte (-h) | | option longue (--help, -h) |
|
||||
| - | | gère les flags vides |
|
||||
| OPTIN et OPTARG | | |
|
||||
|
||||
|
||||
|
||||
#### Syntaxe:
|
||||
|
||||
```bash
|
||||
getopts optstring varname [arg ...]
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### optstring:
|
||||
|
||||
- si une lettre est suivi par : , l'option attend un argument
|
||||
- si optstring commence par : , la variable shell OPTARG est définie sur le caractère d'option trouvé, mais aucune sortie n'est écrite sur l'erreur standard ; sinon, la variable shell OPTARG n'est pas définie et un message de diagnostic est écrit sur l'erreur standart
|
||||
|
||||
```bash
|
||||
# optstring "hf"
|
||||
$ ./soco-cli-gui.sh -k
|
||||
./soco-cli-gui.sh : option non permise -- k
|
||||
Invalid option: -.
|
||||
|
||||
# optstring ":hf"
|
||||
$ ./soco-cli-gui.sh -k
|
||||
Invalid option: -k.
|
||||
```
|
||||
|
||||
32
docs/Divers/bash/image.md
Normal file
32
docs/Divers/bash/image.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Afficher une image dans le terminal
|
||||
|
||||
|
||||
|
||||
### iTerm2
|
||||
|
||||
```bash
|
||||
printf "\n\033]1337;File=;inline=1:`cat soco-cli-logo-01-large.png | base64`\a\n"
|
||||
|
||||
printf "\n\033]1337;File=;width=200px;inline=1:`cat soco-cli-logo-01-large.png | base64`\a\n"
|
||||
```
|
||||
|
||||
https://iterm2.com/documentation-images.html
|
||||
|
||||
|
||||
|
||||
### imgcat
|
||||
|
||||
https://github.com/olivere/iterm2-imagetools
|
||||
|
||||
```bash
|
||||
imgcat soco-cli-logo-01-large.png
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### jouer un son
|
||||
|
||||
```bash
|
||||
echo -en "\007"
|
||||
```
|
||||
|
||||
81
docs/Divers/bash/json.md
Normal file
81
docs/Divers/bash/json.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# json
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"request_id": "9a081c0c-9401-7eca-f55d-50e3b7c0301c",
|
||||
"lease_id": "",
|
||||
"renewable": false,
|
||||
"lease_duration": 2764800,
|
||||
"data": {
|
||||
"password": "test123",
|
||||
"username": "testuser1"
|
||||
},
|
||||
"wrap_info": null,
|
||||
"warnings": null,
|
||||
"auth": null
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
$ jq '.data.password, .data.username' data.json
|
||||
"test123"
|
||||
"testuser1"
|
||||
```
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"langs": ["JavaScript", "Ruby"]
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
$ jq -r '.langs[]' languages.json
|
||||
JavaScript
|
||||
Ruby
|
||||
```
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"italian" : {
|
||||
"name" : [
|
||||
"gatto",
|
||||
"cane",
|
||||
"pasta",
|
||||
"telefono",
|
||||
"libro"
|
||||
],
|
||||
"adjective" : [
|
||||
"pesante",
|
||||
"sottile",
|
||||
"giallo",
|
||||
"stretto"
|
||||
]
|
||||
},
|
||||
"english" : {
|
||||
"name" : [
|
||||
"fish",
|
||||
"book",
|
||||
"guitar",
|
||||
"piano"
|
||||
],
|
||||
"adjective" : [
|
||||
"dirty",
|
||||
"good",
|
||||
"ugly",
|
||||
"great"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
$ jq '.english.adjective[1]' file.js
|
||||
good
|
||||
```
|
||||
|
||||
79
docs/Divers/bash/printf.md
Normal file
79
docs/Divers/bash/printf.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# printf
|
||||
|
||||
|
||||
|
||||
| Character | Usage |
|
||||
| --------- | -------------------------------------------------------- |
|
||||
| %s | String |
|
||||
| %c | Single character |
|
||||
| %d | Integers |
|
||||
| %o | Octal integers |
|
||||
| %u | unsigned integer |
|
||||
| %x | Hexadecimal integers (minuscule) |
|
||||
| %X | Hexadecimal integers (majuscule) |
|
||||
| %f | Floating point |
|
||||
| %e | floating point number in scientific notation (minuscule) |
|
||||
| %E | floating point number in scientific notation (majuscule) |
|
||||
| %b | String with backslash escape character |
|
||||
| %% | Percent sign |
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
printf "\t %3s %-40s \n" "${index}." "${track}"
|
||||
|
||||
# tab
|
||||
# chaine de 3 caractères alignés à droite
|
||||
# chaine de 40 caractères alignés à gauche
|
||||
```
|
||||
|
||||
```
|
||||
9. Party!
|
||||
10. Shooters
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Modificateur de précision:
|
||||
|
||||
. (point) suivi d'un nombre spécifie le nombre de chiffres à afficher.
|
||||
|
||||
```bash
|
||||
$ printf "Number: %.5d\n" 23
|
||||
|
||||
Number: 00023
|
||||
```
|
||||
|
||||
avec une chaine:
|
||||
|
||||
```bash
|
||||
printf "Nom: %.7s\n" Terminator
|
||||
Nom: Termina
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Afficher une ligne de tiret:
|
||||
|
||||
```bash
|
||||
printf "%80s\n" " " | tr ' ' '-'
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Afficher une chaine avec des accents:
|
||||
|
||||
```bash
|
||||
title="France Inter 95.9 (Émissions-débats France)"
|
||||
|
||||
# https://unix.stackexchange.com/questions/609125/padding-unicode-strings-with-bashs-printf
|
||||
bytes=$(printf '%s' "$title" | wc -c)
|
||||
chars=$(printf '%s' "$title" | wc -m)
|
||||
n=$((50+bytes-chars))
|
||||
|
||||
printf '%-${n}s' "${title}"
|
||||
```
|
||||
|
||||
@@ -137,6 +137,18 @@ if [ $status -ne 0 ]; then
|
||||
|
||||
|
||||
|
||||
#### Nombres de lignes:
|
||||
|
||||
```bash
|
||||
# grep
|
||||
nb=$(echo -n "$albums" | grep -c '^')
|
||||
|
||||
#awk
|
||||
nb=$(awk 'END { print NR }' <<< "$albums")
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Convertir un script bash en application macOS:
|
||||
|
||||
[mac-appify](https://pypi.org/project/mac-appify/)
|
||||
|
||||
47
docs/Divers/bash/rematch.md
Normal file
47
docs/Divers/bash/rematch.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Regular Expression Matching (REMATCH)
|
||||
|
||||
|
||||
|
||||
http://molk.ch/tips/gnu/bash/rematch.html
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FILE="/Users/bruno/Downloads/Better.Call.Saul.S06E07.FRENCH.LD.AMZN.WEB-DL.x264-FRATERNiTY.mkv"
|
||||
|
||||
# Extension video file
|
||||
DEST_EXT=mp4
|
||||
|
||||
filename=$(basename "$FILE")
|
||||
filename=${filename%.*}
|
||||
|
||||
# Series: SxxEyy
|
||||
REGEX="([sS]([0-9]{2,}|[X]{2,})[eE]([0-9]{2,}|[Y]{2,}))"
|
||||
|
||||
|
||||
if [[ $filename =~ $REGEX ]]; then
|
||||
MATCH0="${BASH_REMATCH[0]}"
|
||||
echo "$MATCH0" # S06E07
|
||||
|
||||
MATCH1="${BASH_REMATCH[1]}"
|
||||
echo "$MATCH1" # S06E07
|
||||
|
||||
MATCH2="${BASH_REMATCH[2]}"
|
||||
echo "$MATCH2" # 06
|
||||
|
||||
MATCH3="${BASH_REMATCH[3]}"
|
||||
echo "$MATCH3" # 07
|
||||
|
||||
e=$(echo ${filename%$MATCH0*} | sed 's/\./\ /g' | xargs)
|
||||
echo "$e" # Better Call Saul
|
||||
|
||||
new_name="$e - $MATCH0.$DEST_EXT"
|
||||
echo "$new_name" # Better Call Saul - S06E07.
|
||||
|
||||
else
|
||||
echo "no match"
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
#### Concaténer une chaine:
|
||||
### Concaténer une chaine:
|
||||
|
||||
```bash
|
||||
upd+="$name "
|
||||
@@ -10,7 +10,7 @@ upd+="$name "
|
||||
|
||||
|
||||
|
||||
#### Trim une chaine:
|
||||
### Trim une chaine:
|
||||
|
||||
1. sed
|
||||
|
||||
@@ -75,9 +75,19 @@ $ echo " Une chaine entourée d'espaces " | xargs -0
|
||||
Une chaine entourée d'espaces
|
||||
```
|
||||
|
||||
4.
|
||||
|
||||
```bash
|
||||
trim () {
|
||||
read -rd '' $1 <<<"${!1}"
|
||||
}
|
||||
|
||||
trim foo
|
||||
```
|
||||
|
||||
|
||||
#### Longueur d'une chaine:
|
||||
|
||||
### Longueur d'une chaine:
|
||||
|
||||
```bash
|
||||
$ echo -n "Longueur de la chaine:" | wc -c
|
||||
@@ -93,7 +103,9 @@ $ echo ${#var}
|
||||
|
||||
|
||||
|
||||
#### Sous-chaine:
|
||||
### Sous-chaine:
|
||||
|
||||
https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
|
||||
|
||||
```bash
|
||||
$ string=abcABC123ABCabc
|
||||
@@ -119,6 +131,14 @@ ab
|
||||
echo "$string" | awk '{print substr($0,0,2)}'
|
||||
ab
|
||||
|
||||
# Supprimer le dernier caractère:
|
||||
$ echo ${string:0:-1}
|
||||
abcABC123ABCab
|
||||
|
||||
# Remplacer certains caractères par un autre:
|
||||
$ echo ${string//[ABC]/:}
|
||||
abc:::123:::abc
|
||||
|
||||
# Obtenir les 4 derniers caractères:
|
||||
$ echo ${stringZ: -4} # Notez l'espace
|
||||
Cabc
|
||||
@@ -137,7 +157,7 @@ filename="${filename%.*}"
|
||||
|
||||
|
||||
|
||||
#### Remplacement de sous-chaine:
|
||||
### Remplacement de sous-chaine:
|
||||
|
||||
```bash
|
||||
$ string=abcABC123ABCabc
|
||||
@@ -166,7 +186,7 @@ ABC123ABC
|
||||
|
||||
http://tldp.org/LDP/abs/html/string-manipulation.html
|
||||
|
||||
#### Majuscule / Capitalize:
|
||||
### Majuscule / Capitalize:
|
||||
|
||||
```bash
|
||||
string=bonjour
|
||||
@@ -181,13 +201,51 @@ echo ${string^^}
|
||||
BONJOUR
|
||||
|
||||
echo $string | tr '[:lower:]' '[:upper:]'
|
||||
echo $string | awk '{print toupper($0)}'
|
||||
echo $string | tr '[a-z]' '[A-Z]'
|
||||
BONJOUR
|
||||
|
||||
|
||||
string=HelLo
|
||||
|
||||
# 1ere lettre en minuscule (Bash 4)
|
||||
echo ${string,}
|
||||
helLo
|
||||
|
||||
# Met en minuscule toute la chaine
|
||||
echo ${string,,}
|
||||
hello
|
||||
|
||||
echo $string | awk '{print tolower($0)}'
|
||||
echo $string | tr '[:upper:]' '[:lower:]'
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
phrase="bonjour tout le monde"
|
||||
|
||||
# Capitalise tous les mots (1)
|
||||
B=( $phrase )
|
||||
caps="${B[@]^}"
|
||||
echo "$caps"
|
||||
Bonjour Tout Le Monde
|
||||
|
||||
# Capitalise tous les mots (2)
|
||||
for i in $phrase; do B=`echo "${i:0:1}" | tr a-z A-Z`${i:1}; caps+="$B "; done
|
||||
echo "$caps"
|
||||
Bonjour Tout Le Monde
|
||||
|
||||
# Capitalise tous les mots (3)
|
||||
caps=$(echo "${phrase}" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1')
|
||||
echo "$caps"
|
||||
Bonjour Tout Le Monde
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Parcourrir une variable multi-ligne:
|
||||
### Parcourrir une variable multi-ligne:
|
||||
|
||||
```bash
|
||||
dependencies=$(echo "CairoSVG,setuptools" | xargs pipdeptree -r -p )
|
||||
@@ -210,12 +268,14 @@ done <<< "$dependencies"
|
||||
|
||||
[[ STRING =~ REGEX ]]
|
||||
|
||||
[Regular Expression Matching](rematch.md)
|
||||
|
||||
Chaine commençant par:
|
||||
|
||||
```bash
|
||||
# String est une url ?
|
||||
|
||||
if [[ $string =~ ^http ]]
|
||||
if [[ $string =~ ^http ]]; then
|
||||
```
|
||||
|
||||
Chaine se terminant par:
|
||||
@@ -223,7 +283,7 @@ Chaine se terminant par:
|
||||
```bash
|
||||
# String est un fichier .mp3 ?
|
||||
|
||||
if [[ $string =~ .mp3$ ]]
|
||||
if [[ $string =~ .mp3$ ]]; then
|
||||
```
|
||||
|
||||
Adresse IP:
|
||||
@@ -238,3 +298,409 @@ Email:
|
||||
if [[ "$email" =~ "^[A-Za-z0-9._%+-]+<b>@</b>[A-Za-z0-9.-]+<b>\.</b>[A-Za-z]{2,4}$" ]]
|
||||
```
|
||||
|
||||
|
||||
|
||||
Rechercher une sous-chaine
|
||||
|
||||
```bash
|
||||
name=testjohntext
|
||||
|
||||
if [[ "$name" == *john* ]]; then
|
||||
echo "The string \"john\" was found in the variable \$name"
|
||||
fi
|
||||
|
||||
[[ "$name" == *john* ]] && echo "The string \"john\" was found in the variable \$name"
|
||||
The string "john" was found in the variable $name
|
||||
|
||||
```
|
||||
|
||||
Regex
|
||||
|
||||
```bash
|
||||
mytest="The quick brown fox"
|
||||
|
||||
[[ "$mytest" =~ The..uick.b..w* ]] && echo "We found a match"
|
||||
We found a match
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### IFS (internet field separator)
|
||||
|
||||
```bash
|
||||
$ old_IFS=$IFS
|
||||
|
||||
$ IFS=-
|
||||
|
||||
$ read day month year
|
||||
25-12-2013
|
||||
|
||||
$ echo $day
|
||||
25
|
||||
|
||||
$ echo $month
|
||||
12
|
||||
|
||||
$ echo $year
|
||||
2013
|
||||
$ IFS=old_IFS
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ reg=("Bourgogne" "Burgundy" "Bourgogne Franche-Comté" "Côte d'or" "cotedor")
|
||||
|
||||
$ echo "$reg"
|
||||
Bourgogne Burgundy Bourgogne Franche-Comté Côte d'or cotedor
|
||||
|
||||
|
||||
$ t=${reg[@]}
|
||||
|
||||
$ echo "$t"
|
||||
Bourgogne Burgundy Bourgogne Franche-Comté Côte d'or cotedor
|
||||
|
||||
|
||||
# ${A[@]} is essentially the same as ${A[*]}, differing only when they are in double quotes. When double quoted, * uses the first character of IFS as the separator.
|
||||
|
||||
$ t=${reg[*]}
|
||||
|
||||
$ echo "$t"
|
||||
Bourgogne Burgundy Bourgogne Franche-Comté Côte d'or cotedor
|
||||
|
||||
|
||||
$ t=${reg[@]}
|
||||
|
||||
$ S=${t// /}
|
||||
|
||||
$ echo "$S"
|
||||
BourgogneBurgundyBourgogneFranche-ComtéCôted'orcotedor
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
| **Parameter Expansion** | **Description** |
|
||||
| --------------------------- | ------------------------------------------------------------ |
|
||||
| ${variable:-value} | Si la variable est <u>unset</u> ou <u>undefined</u>, développez la **valeur**. |
|
||||
| ${variable:=value} | Si la variable est <u>unset</u> ou <u>undefined</u>, définissez la **valeur** sur la variable. |
|
||||
| ${variable:+value} | Si la variable est <u>set</u> ou <u>defined</u>, développez la **valeur**. |
|
||||
| ${variable:?value} | Si la variable est <u>unset</u> ou <u>undefined</u>, le développement de mot (ou un message à cet effet si mot n'est pas présent) est <u>écrit dans l'erreur standard</u> et le shell, s'il n'est pas interactif, se termine. Sinon, la valeur du paramètre est remplacée. |
|
||||
| ${#variable} | <u>Longueur</u> de la variable.<br />Pour un tableau, le nombre d'éléments |
|
||||
| ${variable/#pattern/string} | Si le modèle existe au début de la variable, remplacez l'occurrence par une chaîne. |
|
||||
| ${variable/%pattern/string} | Si le modèle existe à la fin de la variable, remplacez l'occurrence par une chaîne. |
|
||||
|
||||
|
||||
|
||||
| | **Rechercher / remplacer** |
|
||||
| --------------------------- | ------------------------------------------------------------ |
|
||||
| ${variable/pattern/string} | Remplacez la partie de la variable par une chaîne où le modèle correspond pour la première fois. |
|
||||
| ${variable//pattern/string} | Remplacez toutes les occurrences de la variable par une chaîne où tous les modèles correspondent. |
|
||||
| | |
|
||||
| | |
|
||||
|
||||
|
||||
|
||||
| | **Sous-chaines** |
|
||||
| --------------------------- | ------------------------------------------------------------ |
|
||||
| ${variable:start:length} | La sous-chaîne récupérera de la position de <u>départ</u> à la position de <u>longueur</u> de la variable. |
|
||||
| ${variable:(-start):length} | idem en partant de la fin |
|
||||
| ${variable:start} | La sous-chaîne récupérera de la position de <u>départ</u> à la partie restante de la variable. |
|
||||
| ${variable:(-start)} | idem en partant de la fin |
|
||||
|
||||
|
||||
|
||||
| | **Suppression de sous-chaines** |
|
||||
| -------------------- | ------------------------------------------------------------ |
|
||||
| ${variable#pattern} | Supprimez la correspondance la plus courte depuis le début de la variable où le modèle correspond.<br /><br />Remove the shortest match from the beginning of the variable where the pattern matches. |
|
||||
| ${variable##pattern} | Supprimez la correspondance la plus longue depuis le début de la variable où le modèle correspond. |
|
||||
| ${variable%pattern} | Supprimez la correspondance la plus courte à partir de la fin de la variable où le modèle correspond. |
|
||||
| ${variable%%pattern} | Supprimez la correspondance la plus longue à partir de la fin de la variable où le modèle correspond. |
|
||||
|
||||
|
||||
|
||||
| | **Changement de case** |
|
||||
| ------------- | ------------------------------- |
|
||||
| ${variable^} | Met la 1ere lettre en majuscule |
|
||||
| ${variable^^} | Met tout le mot en majuscule |
|
||||
| ${variable,} | Met la 1ere lettre en minuscule |
|
||||
| ${variable,,} | Met tout le mot en minuscule |
|
||||
| ${variable~} | Inverse la 1ere lettre |
|
||||
| ${variable~~} | Inverse tout le mot |
|
||||
|
||||
|
||||
|
||||
#### **${variable:-value}**:
|
||||
|
||||
```bash
|
||||
# si la variable est unset ou undefined, développez la valeur:
|
||||
|
||||
# 1. myvar n'est pas définie
|
||||
$ echo "${myvar:-bash}"
|
||||
bash
|
||||
|
||||
$ echo $myvar
|
||||
|
||||
|
||||
# 2. myvar est définie
|
||||
$ myvar=3
|
||||
$ echo "${myvar:-bash}"
|
||||
3
|
||||
|
||||
$ echo $myvar
|
||||
3
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable:=value}**
|
||||
|
||||
```bash
|
||||
# Si la variable est unset ou undefined, définissez la valeur sur la variable:
|
||||
|
||||
# 1. myvar n'est pas définie
|
||||
$ echo "${myvar:=bash}"
|
||||
bash
|
||||
|
||||
$ echo $myvar
|
||||
bash
|
||||
|
||||
# 2. myvar est définie
|
||||
$ myvar=zsh
|
||||
$ echo "${myvar:=bash}"
|
||||
zsh
|
||||
|
||||
$ echo $myvar
|
||||
zsh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable:+value}**
|
||||
|
||||
```bash
|
||||
# Si la variable est set ou defined, développez la valeur:
|
||||
|
||||
# 1. myvar n'est pas définie
|
||||
$ echo "${myvar:+python}"
|
||||
|
||||
|
||||
# 2. myvar est définie
|
||||
$ myvar=zsh
|
||||
$ echo "${myvar:+python}"
|
||||
python
|
||||
|
||||
$ echo $myvar
|
||||
zsh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable:?value}**
|
||||
|
||||
```bash
|
||||
|
||||
# 1. myvar n'est pas définie
|
||||
$ echo "${myvar:?bash}"
|
||||
bash: myvar: bash
|
||||
|
||||
# 2. myvar est définie
|
||||
$ myvar=zsh
|
||||
$ echo "${myvar:?bash}"
|
||||
zsh
|
||||
|
||||
$ echo $myvarzsh
|
||||
zsh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable:start:length}**
|
||||
|
||||
```bash
|
||||
# La sous-chaîne récupérera de la position de départ à la position de longueur de la variable.
|
||||
|
||||
$ myvar="La sous-chaîne récupérera de la position de départ à la position de longueur de la variable."
|
||||
|
||||
$ echo "${myvar:15:35}"
|
||||
récupérera de la position de départ
|
||||
|
||||
$ echo "${myvar:(-15):35}" # Séparer l'offset des : avec les parenthèses ()
|
||||
de la variable.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable:start}**
|
||||
|
||||
```bash
|
||||
# La sous-chaîne récupérera de la position de départ à la partie restante de la variable.
|
||||
|
||||
$ myvar="La sous-chaîne récupérera de la position de départ à la partie restante de la variable."
|
||||
|
||||
$ echo "${myvar:15}"
|
||||
récupérera de la position de départ à la partie restante de la variable.
|
||||
|
||||
$ echo "${myvar:(-15)}" # Séparer l'offset des : avec les parenthèses ()
|
||||
de la variable.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${\#variable}** **${\#array}**
|
||||
|
||||
```bash
|
||||
# Longueur de la variable.
|
||||
|
||||
$ myvar="Longueur de la variable."
|
||||
$ echo "${#myvar}"
|
||||
24
|
||||
|
||||
$ array=("name" "word")
|
||||
$ echo "${#array}"
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable/pattern/string}**
|
||||
|
||||
```bash
|
||||
# Remplacez la partie de la variable par une chaîne où le modèle correspond pour la première fois.
|
||||
|
||||
$ myvar="Remplacez la partie de la variable par une chaîne où le modèle correspond pour la première fois."
|
||||
$ echo "${myvar/la/the}"
|
||||
Rempthecez la partie de la variable par une chaîne où le modèle correspond pour la première fois.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable//pattern/string}**
|
||||
|
||||
```bash
|
||||
# Remplacez toutes les occurrences de la variable par une chaîne où tous les modèles correspondent.
|
||||
|
||||
$ myvar="Remplacez toutes les occurrences de la variable par une chaîne où tous les modèles correspondent."
|
||||
$ echo "${myvar//les/the}"
|
||||
Remplacez toutes the occurrences de la variable par une chaîne où tous the modèthe correspondent.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable/#pattern/string}**
|
||||
|
||||
```bash
|
||||
# Si le modèle existe au début de la variable, remplacez l'occurrence par une chaîne.
|
||||
|
||||
$ myvar="Si le modèle existe au début de la variable, remplacez l'occurrence par une chaîne"
|
||||
$ echo "${myvar/#les/If}"
|
||||
Si le modèle existe au début de la variable, remplacez l'occurrence par une chaîne
|
||||
|
||||
$ echo "${myvar/#Si/If}"
|
||||
If le modèle existe au début de la variable, remplacez l'occurrence par une chaîne
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable/%pattern/string}**
|
||||
|
||||
```bash
|
||||
# Si le modèle existe à la fin de la variable, remplacez l'occurrence par une chaîne.
|
||||
|
||||
$ myvar="Si le modèle existe à la fin de la variable, remplacez l'occurrence par une chaîne."
|
||||
|
||||
$ echo "${myvar/%chaine./laisse.}" # i
|
||||
Si le modèle existe à la fin de la variable, remplacez l'occurrence par une chaîne.
|
||||
|
||||
$ echo "${myvar/%chaîne/laisse}" # î
|
||||
Si le modèle existe à la fin de la variable, remplacez l'occurrence par une laisse
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable#pattern}**
|
||||
|
||||
```bash
|
||||
# Supprimez la correspondance la plus courte depuis le début de la variable où le modèle correspond.
|
||||
# Remove the shortest match from the beginning of the variable where the pattern matches.
|
||||
|
||||
$ myvar="Supprimez la correspondance la plus courte depuis le début de la variable où le modèle correspond."
|
||||
|
||||
$ echo "${myvar#*la}" # du début au 1er la
|
||||
correspondance la plus courte depuis le début de la variable où le modèle correspond.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable##pattern}**
|
||||
|
||||
```bash
|
||||
# Supprimez la correspondance la plus longue depuis le début de la variable où le modèle correspond.
|
||||
|
||||
$ myvar="Supprimez la correspondance la plus longue depuis le début de la variable où le modèle correspond."
|
||||
|
||||
$ echo "${myvar##*la}" # du début au dernier la
|
||||
variable où le modèle correspond.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable%pattern}**
|
||||
|
||||
```bash
|
||||
# Supprimez la correspondance la plus courte à partir de la fin de la variable où le modèle correspond.
|
||||
|
||||
$ myvar="Supprimez la correspondance la plus courte à partir de la fin de la variable où le modèle correspond."
|
||||
|
||||
$ echo "${myvar%la*}"
|
||||
Supprimez la correspondance la plus courte à partir de la fin de
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **${variable%%pattern}**
|
||||
|
||||
```bash
|
||||
# Supprimez la correspondance la plus longue à partir de la fin de la variable où le modèle correspond.
|
||||
|
||||
$ myvar="Supprimez la correspondance la plus longue à partir de la fin de la variable où le modèle correspond."
|
||||
|
||||
$ echo "${myvar%%la*}"
|
||||
Supprimez
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### **Exemples avec les chemins / fichiers:**
|
||||
|
||||
```bash
|
||||
$ PATHNAME=/Users/bruno/Pictures/Export/2022/Juillet/2022-07-01_Chevrette_3462.jpg
|
||||
|
||||
# Obtenir le répertoire:
|
||||
$ echo ${PATHNAME%/*}
|
||||
/Users/bruno/Pictures/Export/2022/Juillet
|
||||
|
||||
# Obtenir le nom de fichier:
|
||||
$ echo ${PATHNAME##*/}
|
||||
2022-07-01_Chevrette_3462.jpg
|
||||
|
||||
|
||||
$ FILENAME=2022-07-01_Chevrette_3462.jpg
|
||||
|
||||
# Obtenir le nom de fichier sans extension:
|
||||
$ echo ${FILENAME%.*}
|
||||
2022-07-01_Chevrette_3462
|
||||
|
||||
# Obtenir l'extension:
|
||||
$ echo ${FILENAME##*.}
|
||||
jpg
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
https://wiki.bash-hackers.org/syntax/pe#substring_removal
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,19 @@
|
||||
|
||||
|
||||
|
||||
#### Création d'un tableau (et initialisation):
|
||||
### Création d'un tableau (et initialisation):
|
||||
|
||||
##### Tableau indicé:
|
||||
#### Tableau indicé:
|
||||
|
||||
```bash
|
||||
# Création:
|
||||
$ tableau_indi=()
|
||||
$ declare -a tableau_indi
|
||||
```
|
||||
|
||||
```bash
|
||||
$ tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
```
|
||||
|
||||
Les indices sont assignés automatiquement, à partir de 0.
|
||||
@@ -20,88 +27,135 @@ chene à l'indice 0, érable le 2, saule le 5, hetre le 7. Les indices 3 et 4 so
|
||||
|
||||
|
||||
|
||||
##### Tableau associatif:
|
||||
#### Tableau associatif:
|
||||
|
||||
```bash
|
||||
$ tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Avec declare:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi
|
||||
# Création:
|
||||
$ declare -A tableau_asso
|
||||
```
|
||||
|
||||
Initialisation:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
$ tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
```
|
||||
|
||||
Tableau en lecture seule:
|
||||
|
||||
```bash
|
||||
$ readonly -a tableau_indi_ro=( "un" "deux" "trois" "quatre" )
|
||||
$ readonly -A tableau_asso_ro=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
# Returns all indizes and their items (doesn't work with associative arrays)
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
|
||||
# Returns all items
|
||||
$ echo ${tableau_asso[*]}
|
||||
gland faine sirop
|
||||
|
||||
# Returns all indizes
|
||||
$ echo ${!tableau_asso[*]}
|
||||
erable chene hetre
|
||||
|
||||
# Number elements
|
||||
$ echo ${#tableau_asso[*]}
|
||||
3
|
||||
|
||||
# Length of $nth item
|
||||
${#tableau_asso[$n]}
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Affichage du tableau:
|
||||
#### Tableau en lecture seule:
|
||||
|
||||
```bash
|
||||
$ readonly -a tableau_indi_ro=( "un" "deux" "trois" "quatre" )
|
||||
$ declare -r -a tableau_indi_ro=( "un" "deux" "trois" "quatre" )
|
||||
```
|
||||
|
||||
```bash
|
||||
$ readonly -A tableau_asso_ro=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
$ declare -r -A tableau_asso_ro=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Affichage du tableau:
|
||||
|
||||
L’affichage de l’ensemble d’un tableau se fait avec la syntaxe `${montableau[*]}` ou`${montableau[@]}`
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
$ echo ${tableau_indi[*]}
|
||||
un deux trois quatre
|
||||
|
||||
$ echo ${tableau_indi[2]}
|
||||
deux
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
$ echo ${tableau_asso[*]}
|
||||
gland faine sirop
|
||||
|
||||
$ echo ${tableau_asso[erable]}
|
||||
sirop
|
||||
```
|
||||
|
||||
https://ostechnix.com/bash-for-loop-shell-scripting/#loop-over-array-elements
|
||||
|
||||
|
||||
#### Lecture d'un élément:
|
||||
|
||||
### Lecture d'un élément:
|
||||
|
||||
```bash
|
||||
$ tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${tableau_indi[2]}
|
||||
deux
|
||||
$ echo $tableau_indi
|
||||
un deux trois quatre # !!! normalement 'un'
|
||||
|
||||
un # zsh: un deux trois quatre
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${tableau_asso["erable"]}
|
||||
# !!!! rien sur zsh !!!!
|
||||
sirop # !!!! rien sur zsh !!!!
|
||||
$ echo ${tableau_asso[erable]}
|
||||
sirop
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Ajouter un élément:
|
||||
### Ajouter un élément:
|
||||
|
||||
```bash
|
||||
ARRAY=()
|
||||
ARRAY+=('foo')
|
||||
ARRAY+=('bar')
|
||||
$ tableau_indi=()
|
||||
|
||||
$ tableau_indi+=('cinq')
|
||||
$ tableau_indi+=('six')
|
||||
```
|
||||
|
||||
```bash
|
||||
$ tableau_asso+=([pommier]="pomme")
|
||||
|
||||
$ tableau_asso[pommier]="pomme"
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Modification d'un élément:
|
||||
### Modification d'un élément:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ tableau_indi[0]="zero"
|
||||
$ echo ${tableau_indi[@]}
|
||||
zero deux trois quatre
|
||||
```
|
||||
|
||||
Si le tableau n’existe pas, il sera créé comme un tableau indicé :
|
||||
|
||||
@@ -112,85 +166,225 @@ $ echo ${tableau_indi[1]}
|
||||
chene
|
||||
```
|
||||
|
||||
Il n’est pas possible de créer un tableau associatif en lui assignant un élément, il faut le déclarer explicitement avant l’assignation
|
||||
Il n’est pas possible de créer un tableau associatif en lui assignant un élément, il faut le déclarer explicitement (declare -A tableau_asso) avant l’assignation.
|
||||
|
||||
|
||||
|
||||
#### Afficher la liste des clés:
|
||||
### Afficher la liste des clés:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${!tableau_indi[@]}
|
||||
zsh: event not found: tableau_indi[@] # !!!
|
||||
0 1 2 3 #zsh: event not found: tableau_indi[@] # !!!
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${!tableau_asso[@]}
|
||||
zsh: event not found: tableau_asso[@] # !!!
|
||||
erable chene hetre # zsh: event not found: tableau_asso[@] # !!!
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Obtenir la taille d'un tableau:
|
||||
### Afficher la liste des clés/valeurs:
|
||||
|
||||
```bash
|
||||
$ for val in ${!tableau_indi[@]}
|
||||
do
|
||||
echo "index = ${val} , value = ${tableau_indi[$val]}"
|
||||
done
|
||||
|
||||
index = 0 , value = un
|
||||
index = 1 , value = deux
|
||||
index = 2 , value = trois
|
||||
index = 3 , value = quatre
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ for elem in "${!tableau_asso[@]}";
|
||||
do
|
||||
echo "key : ${elem}" - - "value: ${tableau_asso[${elem}]}";
|
||||
done
|
||||
|
||||
key : erable - - value: sirop
|
||||
key : chene - - value: gland
|
||||
key : hetre - - value: faine
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Obtenir la taille d'un tableau:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${#tableau_indi[@]}
|
||||
4
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${#tableau_asso[@]}
|
||||
3
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Supprimer un élément:
|
||||
### Supprimer un élément:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
|
||||
$ echo ${#tableau_indi[@]}
|
||||
4 # 4 éléments
|
||||
|
||||
$ unset tableau_indi[1]
|
||||
zsh: no matches found: tableau_indi[1]
|
||||
# zsh: no matches found: tableau_indi[1]
|
||||
|
||||
$ echo ${!tableau_indi[@]}
|
||||
zsh: event not found: tableau_indi[@]
|
||||
0 2 3 # zsh: event not found: tableau_indi[@]
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
un trois quatre
|
||||
|
||||
$ echo ${#tableau_indi[@]}
|
||||
3 # 3 éléments
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
|
||||
$ echo ${#tableau_asso[@]}
|
||||
3 # 3 éléments
|
||||
|
||||
$ unset tableau_asso['erable']
|
||||
zsh: no matches found: tableau_asso[erable]
|
||||
# zsh: no matches found: tableau_asso[erable]
|
||||
|
||||
$ echo ${!tableau_asso[@]}
|
||||
zsh: event not found: tableau_asso[@]
|
||||
chene hetre # zsh: event not found: tableau_asso[@]
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
gland faine
|
||||
|
||||
$ echo ${#tableau_asso[@]}
|
||||
2 # 2 éléments
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Supprimer un tableau entier:
|
||||
### Vider un tableau:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ unset tableau_indi
|
||||
# unset tableau_indi[@]
|
||||
# unset tableau_indi[*]
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
|
||||
$ declare -a tableau_indi=()
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
|
||||
$ declare -A tableau_asso=()
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Supprimer un tableau entier:
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
|
||||
$ unset tableau_indi
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
gland faine sirop
|
||||
|
||||
$ unset tableau_asso
|
||||
|
||||
$ echo ${tableau_asso[@]}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Vérifier si un élément est présent dans le tableau:
|
||||
|
||||
```bash
|
||||
$ declare -A tableau_asso=( ['chene']="gland" ['erable']="sirop" ['hetre']="faine" )
|
||||
|
||||
$ if [[ -n "${tableau_asso[erable]}" ]]; then echo "Element is present"; else echo "Element not present"; fi
|
||||
Element is present
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Mettre la sortie d'une commande dans un tableau:
|
||||
|
||||
```bash
|
||||
$ path_list=( $(echo $PATH | tr ":" "\n") )
|
||||
|
||||
$ echo ${path_list[@]}
|
||||
/Users/bruno/.zinit/plugins/sei40kr---fast-alias-tips-bin /Users/bruno/.zinit/polaris/bin /Users/bruno/perl5/bin /Users/bruno/.nvm/versions/node/v18.13.0/bin /Users/bruno/Library/Python/3.9/bin /opt/homebrew/opt/grep/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/ruby/bin /opt/homebrew/opt/unzip/bin /opt/homebrew/opt/ssh-copy-id/bin /opt/homebrew/opt/python/libexec/bin /opt/homebrew/bin /opt/homebrew/sbin /usr/local/bin /System/Cryptexes/App/usr/bin /usr/bin /bin /usr/sbin /sbin /usr/local/MacGPG2/bin /Library/Apple/usr/bin /Users/bruno/.cargo/bin /Users/bruno/.local/bin /opt/homebrew/opt/fzf/bin /Users/bruno/.yarn/bin /Users/bruno/.local/bin /Users/bruno/go/bin /Users/bruno/.zinit/plugins/kazhala---dotbare
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Slicing
|
||||
|
||||
```bash
|
||||
${array[@]:index:length}
|
||||
```
|
||||
|
||||
```bash
|
||||
$ declare -a tableau_indi=( "un" "deux" "trois" "quatre" )
|
||||
|
||||
$ echo ${tableau_indi[@]}
|
||||
un deux trois quatre
|
||||
|
||||
# Affiche de la position 2 à la fin
|
||||
$ echo ${tableau_indi[@]:2}
|
||||
trois quatre
|
||||
|
||||
# Affiche 2 éléments à partir de la position 1
|
||||
$ echo ${tableau_indi[@]:1:2}
|
||||
deux trois
|
||||
|
||||
# Affiche 2 éléments à partir du début
|
||||
$ echo ${tableau_indi[@]::2}
|
||||
un deux # zsh: closing brace expected
|
||||
|
||||
$ echo ${!tableau_indi[@]}
|
||||
zsh: event not found: tableau_indi[@]
|
||||
```
|
||||
|
||||
|
||||
85
docs/Divers/bash/variables.md
Normal file
85
docs/Divers/bash/variables.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# Variables
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### Assignation
|
||||
|
||||
```bash
|
||||
varname=value
|
||||
|
||||
echo $varname
|
||||
```
|
||||
|
||||
|
||||
Si une variable n'a pas été affectée avant, elle sera vide (pas d'erreur).
|
||||
|
||||
```bash
|
||||
echo $varname
|
||||
varname=value
|
||||
echo $varname
|
||||
|
||||
<vide>
|
||||
value
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Declarer
|
||||
|
||||
restreint la valeur de la variable à l'option
|
||||
|
||||
```bash
|
||||
declare option variablename
|
||||
```
|
||||
|
||||
option peut être:
|
||||
|
||||
- -r read only variable
|
||||
- -i integer variable
|
||||
- -a array variable
|
||||
- -f for funtions
|
||||
- -x declares and export to subsequent commands via the environment.
|
||||
|
||||
```bash
|
||||
declare -a z
|
||||
|
||||
# z sera un tableau
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Variable locale
|
||||
|
||||
la portée de la variable reste à l'instérieur de la finction
|
||||
|
||||
```bash
|
||||
ma_fonction() {
|
||||
local lvar="Local content"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Variable globale (environment variables)
|
||||
|
||||
la variable est disponible à tous les scripts
|
||||
|
||||
```bash
|
||||
$ printenv
|
||||
LC_TERMINAL_VERSION=3.4.19
|
||||
COLORFGBG=15;0
|
||||
ITERM_PROFILE=access_log
|
||||
XPC_FLAGS=0x0
|
||||
SHELL=/bin/zsh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Test si la variable est un entier
|
||||
|
||||
```bash
|
||||
[[ $1 == ?(-)+([[:digit:]]) ]] && echo "$1 is an integer"
|
||||
```
|
||||
|
||||
@@ -143,9 +143,9 @@ $ dotbare fbackup
|
||||
|
||||
$ dotbare fbackup -s
|
||||
|
||||
# -s, --select list all tracked files and only backup the selected files.
|
||||
# -s, --select list all tracked files and only backup the selected files.
|
||||
# -p PATH, --path PATH specify path of files to backup.
|
||||
# -m, --move use 'mv' instead of the default 'cp' command to backup.
|
||||
# -m, --move use 'mv' instead of the default 'cp' command to backup.
|
||||
|
||||
```
|
||||
|
||||
@@ -159,8 +159,9 @@ $ dotbare fbackup -s
|
||||
```bash
|
||||
$ dotbare fedit
|
||||
|
||||
# -m : uniquement les fichiers modifiés
|
||||
# -c: affiche les commits
|
||||
# -h, --help show this help message and exit.
|
||||
# -m uniquement les fichiers modifiés
|
||||
# -c affiche les commits
|
||||
```
|
||||
|
||||
#### fgrep:
|
||||
@@ -170,8 +171,9 @@ $ dotbare fedit
|
||||
```bash
|
||||
$ dotbare fgrep
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
# -c COL, --col COL specify the column number to start searching.
|
||||
# -f, --full include all column during search, as if using '--col 1'.
|
||||
# -f, --full include all column during search, as if using '--col 1'.
|
||||
```
|
||||
|
||||
#### flog:
|
||||
@@ -183,11 +185,12 @@ $ dotbare fgrep
|
||||
```bash
|
||||
$ dotbare flog
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
# -r, --revert revert the selected commit and skip action menu.
|
||||
# -R, --reset reset HEAD back to selected commit and skip action menu.
|
||||
# -e, --edit edit selected commit through interactive rebase and skip action menu.
|
||||
# -e, --edit edit selected commit through interactive rebase and skip action menu.
|
||||
# -c, --checkout checkout selected commit and skip action menu.
|
||||
# -y, --yes acknowledge all actions that will be taken and skip confirmation.
|
||||
# -y, --yes acknowledge all actions that will be taken and skip confirmation.
|
||||
```
|
||||
|
||||
#### freset:
|
||||
@@ -198,6 +201,7 @@ $ dotbare flog
|
||||
```bash
|
||||
$ dotbare freset
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
# -c, --commit reset HEAD to certain commit, default --mixed flag, reset HEAD to certain commit put all changes into modified state.
|
||||
# -S, --soft reset commit using --soft flag, reset HEAD to certain commit without modify working tree.
|
||||
# -H, --hard reset commit using --hard flag, reset HEAD to certain commit discard all changes from the working tree.
|
||||
@@ -217,6 +221,7 @@ $ dotbare freset
|
||||
```bash
|
||||
$ dotbare fcheckout
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
# -s, --select list all tracked files and select a commit to checkout the selected files.
|
||||
# -b, --branch list all branch and checkout/switch the selected branch.
|
||||
# -c, --commit list all commits and checkout selected commit.
|
||||
@@ -228,15 +233,97 @@ $ dotbare fcheckout
|
||||
|
||||
#### fstash
|
||||
|
||||
- View and manage stash interactively
|
||||
|
||||
```bash
|
||||
$ dotbare fstash
|
||||
|
||||
# Default: list all stashes and apply the selected stash files
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
#. -s, --select list modified files and stash the selected files
|
||||
# -d, --delete list all stashes and delete the selected stash files
|
||||
# -p, --pop use 'stash pop' instead of 'stash apply'
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### fstat
|
||||
|
||||
- Display interactive git status menu
|
||||
- Toggle file stage/unstage interactively
|
||||
|
||||
```bash
|
||||
$ dotbare fstat
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### funtrack
|
||||
|
||||
- Untrack selected files from git
|
||||
|
||||
```bash
|
||||
$ dotbare funtrack
|
||||
|
||||
# Default: list all tracked files and permanently untrack the selected files (using git rm --cached filename).
|
||||
# Files will be remove from index while keeping the file in your current system.
|
||||
# However, when your other computers pull down the changes, the untracked files will be deleted.
|
||||
# Make sure to run dotbare fbackup before pulling down the changes.
|
||||
|
||||
# Alternatively use the -t flag (using git update-index --assume-unchanged [path]) to temporarily untrack a file but keeping the files when other computers pull down the changes.
|
||||
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
# -t, --temp list all trackes files and temporarily ignore changes of the selected files.
|
||||
# -r, --resume list all trackes files and resume tracking changes of the selected files.
|
||||
# -y, --yes acknowledge all actions that will be taken and skip confirmation.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### fupgrade
|
||||
|
||||
- Upgrade dotbare to the latest master
|
||||
|
||||
```bash
|
||||
$ dotbare fupgrade
|
||||
|
||||
# -h, --help show this help message and exit.
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liste des fichiers sauvegardés:
|
||||
|
||||
```bash
|
||||
~/.local/share/dotbare 08:42:08
|
||||
❯ l
|
||||
Permissions Size User Group Date Modified Date Created Name
|
||||
.rwxr-xr-x 1,1Ki bruno staff 25 jul 2021 25 jul 2021 .backup_list.conf*
|
||||
.rwxr-xr-x 2,5Ki bruno staff 25 jul 2021 25 jul 2021 .bash_aliases*
|
||||
.rwxr-xr-x 7,8Ki bruno staff 4 fév 20:07 25 jul 2021 .bash_profile*
|
||||
.rw-r--r-- 259 bruno staff 4 fév 20:07 24 jul 2021 .bashrc
|
||||
drwxr-xr-x - bruno staff 12 aoû 2021 12 aoû 2021 .config/
|
||||
.rw-r--r-- 236 bruno staff 21 nov 2021 1 aoû 2021 .diractions
|
||||
.rwxr-xr-x 21Ki bruno staff 25 jul 2021 25 jul 2021 .dircolors*
|
||||
.rwxr-xr-x 10 bruno staff 25 jul 2021 25 jul 2021 .exclude-rsync.txt*
|
||||
.rw-r--r-- 318 bruno staff 16 fév 15:02 4 aoû 2021 .gitconfig
|
||||
.rwxr-xr-x 134 bruno staff 12 aoû 2021 25 jul 2021 .gitignore*
|
||||
.rw-r--r-- 645 bruno staff 7 aoû 2021 7 aoû 2021 .my.cnf.gpg
|
||||
drwxr-xr-x - bruno staff 5 mai 08:33 12 aoû 2021 .nano/
|
||||
.rw-r--r-- 2,7Ki bruno staff 25 jul 2021 25 jul 2021 .nanorc
|
||||
.rw-r--r--@ 9,7Ki bruno staff 1 aoû 2021 1 aoû 2021 .p10k.zsh
|
||||
drwxr-xr-x - bruno staff 12 aoû 2021 12 aoû 2021 .ssh/
|
||||
.rwxr-xr-x 69 bruno staff 25 jul 2021 25 jul 2021 .ticker.conf*
|
||||
.rwxr-xr-x 355 bruno staff 25 jul 2021 25 jul 2021 .ticker.yaml*
|
||||
.rw-r--r-- 130 bruno staff 17 aoû 2021 23 jul 2021 .zprofile
|
||||
.rwxr-xr-x@ 349 bruno staff 31 jul 2021 31 jul 2021 .zsh_plugins.txt*
|
||||
.rw-r--r-- 28 bruno staff 1 aoû 2021 1 aoû 2021 .zshbookmarks
|
||||
.rw-r--r--@ 25Ki bruno staff 4 mai 08:06 12 aoû 2021 .zshrc
|
||||
.rw-r--r--@ 16Ki bruno staff 31 jul 2021 31 jul 2021 .zshrc-antibody.bak
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -6,12 +6,20 @@ https://gitea.io/en-us/
|
||||
|
||||
|
||||
|
||||
#### Installer Gitea
|
||||
#### Installer Gitea sur Synology:
|
||||
|
||||
IL faut créer le paquet Gitea:
|
||||
Il faut créer le paquet Gitea:
|
||||
|
||||
https://github.com/flipswitchingmonkey/gitea-spk
|
||||
|
||||
Pour DSM7, le paquet est dispo sur le repo SynoCommunity:
|
||||
|
||||
https://github.com/SynoCommunity/spksrc/pull/5028
|
||||
|
||||
#### Installer Gitea depuis les binaires:
|
||||
|
||||
https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration
|
||||
|
||||
|
||||
|
||||
#### Importer un repo local dans Gitea:
|
||||
|
||||
445
docs/Divers/images/avif.md
Normal file
445
docs/Divers/images/avif.md
Normal file
@@ -0,0 +1,445 @@
|
||||
# avif
|
||||
|
||||
|
||||
|
||||
<u>Convertisseur:</u>
|
||||
|
||||
- squoosh-cli
|
||||
|
||||
- avif-cli
|
||||
- cavif-rs
|
||||
- sharp
|
||||
- [avif.io](https://avif.io/)
|
||||
- [squoosh](https://squoosh.app/)
|
||||
- [XnConvert](https://www.xnview.com/fr/xnconvert/)
|
||||
- libheif
|
||||
- avifenc
|
||||
- go-avif
|
||||
- AVIFQuickLook
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### [squoosh-cli](https://www.npmjs.com/package/@squoosh/cli)
|
||||
|
||||
Supporte mozjpeg, webp, avif, jxl, wp2
|
||||
|
||||
Les options sont visibles dans [codecs.ts](https://github.com/GoogleChromeLabs/squoosh/blob/dev/libsquoosh/src/codecs.ts)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ npm i -g @squoosh/cli
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
Usage: squoosh-cli [options] <files...>
|
||||
|
||||
Options:
|
||||
-d, --output-dir <dir> Output directory (default: ".")
|
||||
-s, --suffix <suffix> Append suffix to output files (default: "")
|
||||
--max-optimizer-rounds <rounds> Maximum number of compressions to use for auto optimizations (default: "6")
|
||||
--optimizer-butteraugli-target <butteraugli distance> Target Butteraugli distance for auto optimizer (default: "1.4")
|
||||
--resize [config] Resize the image before compressing
|
||||
--quant [config] Reduce the number of colors used (aka. paletting)
|
||||
--rotate [config] Rotate image
|
||||
--mozjpeg [config] Use MozJPEG to generate a .jpg file with the given configuration
|
||||
--webp [config] Use WebP to generate a .webp file with the given configuration
|
||||
--avif [config] Use AVIF to generate a .avif file with the given configuration
|
||||
--jxl [config] Use JPEG-XL to generate a .jxl file with the given configuration
|
||||
--wp2 [config] Use WebP2 to generate a .wp2 file with the given configuration
|
||||
--oxipng [config] Use OxiPNG to generate a .png file with the given configuration
|
||||
-h, --help display help for command
|
||||
```
|
||||
|
||||
```bash
|
||||
$ squoosh-cli --webp true -d webp ./2022-04-28_Biche_8247_8b.png
|
||||
1/1 ✔ Squoosh results:
|
||||
./2022-04-28_Biche_8247_8b.png: 2.18MB
|
||||
└ webp/2022-04-28_Biche_8247_8b.webp → 75.00KB (3.37%)
|
||||
```
|
||||
|
||||
```bash
|
||||
$ squoosh-cli --output-dir 'squoosh-cli' --mozjpeg '{
|
||||
"quality":70,
|
||||
"baseline":false,
|
||||
"arithmetic":false,
|
||||
"progressive":true,
|
||||
"op timize_coding":true,
|
||||
"smoothing":0,
|
||||
"color_space":3,
|
||||
"quant_table":3,
|
||||
"trellis_multipass":false,
|
||||
"trellis_opt_zero":false,
|
||||
"trellis_opt_table":false,
|
||||
"trellis_loops":1,
|
||||
"auto_subsample":true,
|
||||
"chroma_sub sample":2,
|
||||
"separate_chroma_quality":false,
|
||||
"chroma_quality":75
|
||||
}' png/2022-04-16_Brocard_8990_8b.png
|
||||
|
||||
1/1 ✔ Squoosh results:
|
||||
2022-04-16_Brocard_8990_8b.png: 1.93MB
|
||||
└ 2022-04-16_Brocard_8990_8b.jpg → 83.67KB (4.24%)
|
||||
```
|
||||
|
||||
```bash
|
||||
find . -name "*.jpg" -exec bash -c 'file="{}"; squoosh-cli --mozjpeg auto "$file"' \;
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ squoosh-cli --output-dir 'squoosh-cli' --avif '{
|
||||
"cqLevel":33,
|
||||
"cqAlphaLevel":-1,
|
||||
"denoiseLevel":0,
|
||||
"tileColsLog2":0,
|
||||
"tileRowsLog2":0,
|
||||
"speed":6,
|
||||
"subsample":1,
|
||||
"chromaDeltaQ":false,
|
||||
"sharpness":0,
|
||||
"tune":0
|
||||
}' png/*.png
|
||||
|
||||
$ squoosh-cli --output-dir 'squoosh-cli' --avif "{}" png/*.png
|
||||
```
|
||||
|
||||
|
||||
|
||||
### ImageMagick
|
||||
|
||||
Mettre des options avec [define](https://imagemagick.org/script/defines.php).
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ magick -quality 75 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b.avif
|
||||
|
||||
❯ magick -define heic:speed=2 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b_2.avif
|
||||
|
||||
❯ convert -define heic:speed=2 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b_2.avif
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ for image in png/*.png ; do convert "$image" "${image%.*}.avif" ; done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [avif-cli](https://github.com/lovell/avif-cli)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ npm install avif
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ npx avif --input="5_2019.jpg" --quality=70
|
||||
|
||||
❯ npx avif --input="**/*.{png}" --output="./avif-cli" --quality=70
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
set -o noglob
|
||||
IFS=$'\n'
|
||||
|
||||
quality=70
|
||||
#quality='lossless'
|
||||
images=$(find ./png -type f -name *.png)
|
||||
|
||||
for img in $images; do
|
||||
file=$(basename "$img")
|
||||
avif_out="avif-cli"
|
||||
|
||||
#webp_out=$img.webp
|
||||
|
||||
if [ ! -f $avif_out ]; then
|
||||
if [ "$quality" != "lossless" ]; then
|
||||
npx avif --input="$img" --output="./$avif_out" --quality=$quality
|
||||
else
|
||||
npx avif --input="$img" --output="./$avif_out" --lossless
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [cavif-rs](https://github.com/kornelski/cavif-rs)
|
||||
|
||||
Convert JPEG/PNG images to AVIF image format (based on AV1/rav1e)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ cargo install cavif
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ cavif --quality 90 2022-04-16_Brocard_8990_8b.png
|
||||
2022-04-16_Brocard_8990_8b.avif: 524KB (522893B color, 0B alpha, 242B HEIF)
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
set -o noglob
|
||||
IFS=$'\n'
|
||||
|
||||
quality=70
|
||||
images=$(find ./png -type f -name *.png)
|
||||
|
||||
for img in $images; do
|
||||
file=$(basename "$img")
|
||||
avif_out="cavif/${file%.*}_q$quality.avif"
|
||||
|
||||
if [ ! -f $avif_out ]; then
|
||||
cavif --quality $quality $img -o $avif_out
|
||||
fi
|
||||
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [sharp](https://sharp.pixelplumbing.com)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ npm install sharp
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
sharp-example.js
|
||||
|
||||
```javascript
|
||||
const sharp = require('sharp')
|
||||
|
||||
const convertToAVIF = () => {
|
||||
sharp('path_to_image')
|
||||
.toFormat('avif', {palette: true})
|
||||
.toFile(__dirname + 'path_to_output_image')
|
||||
}
|
||||
|
||||
convertToAVIF()
|
||||
```
|
||||
|
||||
```bash
|
||||
# path_to_image : ./imgs/example.jpg
|
||||
# path_to_output_image : /sharp-compressed/compressed-example.avif
|
||||
|
||||
$ node sharp-example.js
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [libheif](https://github.com/strukturag/libheif)
|
||||
|
||||
libheif is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File Format) file format decoder and encoder.
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
go env -w GO111MODULE=off
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ heif-enc 2022-04-28_Biche_8247_8b.png -A -o 2022-04-28_Biche_8247_8b_3.avif
|
||||
libpng warning: iCCP: known incorrect sRGB profile
|
||||
|
||||
❯ heif-enc 2022-04-28_Biche_8247_8b.png -A -L -p chroma=444 --matrix_coefficients=0 -o 2022-04-28_Biche_8247_8b_3.avif (lossless)
|
||||
libpng warning: iCCP: known incorrect sRGB profile
|
||||
```
|
||||
|
||||
```bash
|
||||
# Paramètres par défaut
|
||||
|
||||
❯ heif-enc -P
|
||||
Parameters for encoder `x265 HEVC encoder (3.4+31-6722fce1f)`:
|
||||
quality, default=50, [0;100]
|
||||
lossless, default=false
|
||||
preset, default=slow, { ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow,placebo }
|
||||
tune, default=ssim, { psnr,ssim,grain,fastdecode }
|
||||
tu-intra-depth, default=2, [1;4]
|
||||
complexity, [0;100]
|
||||
chroma, default=420, { 420,422,444 }
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
set -o noglob
|
||||
IFS=$'\n'
|
||||
|
||||
#quality=70
|
||||
quality='lossless'
|
||||
images=$(find ./png -type f -name *.png)
|
||||
|
||||
for img in $images; do
|
||||
file=$(basename "$img")
|
||||
avif_out="heif-enc/${file%.*}_q$quality.avif"
|
||||
|
||||
#webp_out=$img.webp
|
||||
|
||||
if [ ! -f $avif_out ]; then
|
||||
if [ "$quality" != "lossless" ]; then
|
||||
heif-enc "$img" -A -q $quality -o "$avif_out"
|
||||
else
|
||||
heif-enc "$img" -A -L -p chroma=444 --matrix_coefficients=0 -o "$avif_out"
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### avifenc
|
||||
|
||||
https://web.dev/compress-images-avif/
|
||||
|
||||
x64
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install joedrago/repo/avifenc
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
$ avifenc --max 63 image.jpg image.avif
|
||||
```
|
||||
|
||||
|
||||
|
||||
### avifenc (libavif)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install libavif
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ avifenc --min 0 --max 63 -a end-usage=q -a cq-level=18 -a tune=ssim png/2022-04-16_Brocard_8990_8b.png avifenc/2022-04-16_Brocard_8990_8b.avif
|
||||
```
|
||||
|
||||
```bash
|
||||
# 8 thread
|
||||
|
||||
❯ avifenc --min 0 --max 63 -a end-usage=q -a cq-level=18 -a tune=ssim --jobs 8 png/2022-04-16_Brocard_8990_8b.png avifenc/2022-04-16_Brocard_8990_8b.avif
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ avifenc --speed 0 --min 25 --max 35 png/2022-04-16_Brocard_8990_8b.png avifenc/2022-04-16_Brocard_8990_8b.avif
|
||||
libpng warning: iCCP: known incorrect sRGB profile
|
||||
Successfully loaded: png/2022-04-16_Brocard_8990_8b.png
|
||||
AVIF to be written: (Lossy)
|
||||
* Resolution : 1600x1067
|
||||
* Bit Depth : 8
|
||||
* Format : YUV444
|
||||
* Alpha : Not premultiplied
|
||||
* Range : Full
|
||||
* Color Primaries: 2
|
||||
* Transfer Char. : 2
|
||||
* Matrix Coeffs. : 6
|
||||
* ICC Profile : Present (3144 bytes)
|
||||
* XMP Metadata : Absent (0 bytes)
|
||||
* EXIF Metadata : Absent (0 bytes)
|
||||
* Transformations: None
|
||||
* Progressive : Unavailable
|
||||
Encoding with AV1 codec 'aom' speed [0], color QP [25 (Medium) <-> 35 (Low)], alpha QP [0 (Lossless) <-> 0 (Lossless)], tileRowsLog2 [0], tileColsLog2 [0], 1 worker thread(s), please wait...
|
||||
Encoded successfully.
|
||||
* Color AV1 total size: 70133 bytes
|
||||
* Alpha AV1 total size: 0 bytes
|
||||
Wrote AVIF: avifenc/2022-04-16_Brocard_8990_8b.avif
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
set -o noglob
|
||||
IFS=$'\n'
|
||||
|
||||
#quality=70
|
||||
quality='lossless'
|
||||
images=$(find ./png -type f -name *.png)
|
||||
|
||||
for img in $images; do
|
||||
file=$(basename "$img")
|
||||
avif_out="avifenc/${file%.*}_q$quality.avif"
|
||||
|
||||
#webp_out=$img.webp
|
||||
|
||||
if [ ! -f $avif_out ]; then
|
||||
if [ "$quality" != "lossless" ]; then
|
||||
#npx avif --input="$img" --output="./$avif_out" --quality=$quality
|
||||
avifenc --min 0 --max 63 -a end-usage=q -a cq-level=18 -a tune=ssim --jobs 8 $img $avif_out
|
||||
else
|
||||
#npx avif --input="$img" --output="./$avif_out" --lossless
|
||||
avifenc -l --jobs 8 $img $avif_out
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [go-avif](https://github.com/Kagami/go-avif)
|
||||
|
||||
go-avif implements AVIF (AV1 Still Image File Format) encoder for Go using libaom, the high quality AV1 codec.
|
||||
x64
|
||||
|
||||
|
||||
|
||||
### [AVIFQuickLook](https://github.com/dreampiggy/AVIFQuickLook)
|
||||
|
||||
|
||||
|
||||
### Bench
|
||||
|
||||
Conversion de 70 PNG 8bits:
|
||||
|
||||
| avif-cli | avifenc (libavif) | cavif | heif-enc (libheif) | squoosh-cli | |
|
||||
| -------- | ----------------- | ----- | ------------------ | ----------- | ---- |
|
||||
| 148s | 23s | 183s | 92s | 107s | |
|
||||
|
||||
511
docs/Divers/images/exif.md
Normal file
511
docs/Divers/images/exif.md
Normal file
@@ -0,0 +1,511 @@
|
||||
# exif
|
||||
|
||||
|
||||
|
||||
### Supprimer les exifs:
|
||||
|
||||
#### Avec exiv2:
|
||||
|
||||
```bash
|
||||
# exiv2
|
||||
|
||||
exiv2 rm 12-2017.jpg
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Avec exiftool:
|
||||
|
||||
```bash
|
||||
# Crée une copie de l'original (12_2017-2.jpg_original)
|
||||
|
||||
exiftool -all= 12_2017-2.jpg
|
||||
Warning: ICC_Profile deleted. Image colors may be affected - 12_2017-2.jpg
|
||||
1 image files updated
|
||||
|
||||
|
||||
# Sans backup
|
||||
|
||||
exiftool -overwrite_original -all= 12_2017-2.jpg_original
|
||||
Warning: ICC_Profile deleted. Image colors may be affected - 12_2017-2.jpg_original
|
||||
1 image files updated
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Voir les exifs:
|
||||
|
||||
Afficher tous les tags que exiftool reconnait:
|
||||
|
||||
```bash
|
||||
$ exiftool -list
|
||||
Available tags:
|
||||
A100DataOffset AAFManufacturerID ABDate ABLabel ABRelatedNames AB_UID
|
||||
ACoordOfBottomRightCorner ACoordOfTopRightCorner ADJDebugInfo
|
||||
ADLBracketingStep ADLBracketingType AEAperture AEApertureSteps AEBAutoCancel
|
||||
AEBBracketValue AEBSequence AEBSequenceAutoCancel AEBShotCount AEBXv
|
||||
AEBracketingSteps AECAggressiveness AECCurrentExpIndex AECCurrentSensorLuma
|
||||
.../...
|
||||
Command-line shortcuts:
|
||||
AllDates Canon ColorSpaceTags Common CommonIFD0 LargeTags MakerNotes Nikon
|
||||
Unsafe ls-l
|
||||
|
||||
$ exiftool -list | grep Keyword
|
||||
AppleDataOffsets AppleKeywords AppleMailDateReceived AppleMailDateSent
|
||||
ArchivedFileName Arranger ArrangerKeywords ArtDirector ArtFilter
|
||||
ComponentsInSequence Composer ComposerKeywords ComposerSortOrder Composers
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
AllDates:
|
||||
|
||||
```bash
|
||||
$ exiftool -AllDates 2022-08-12_Chevreuils_6405.jpg
|
||||
Date/Time Original : 2022:08:12 19:55:01
|
||||
Create Date : 2022:08:12 19:55:01
|
||||
Modify Date : 2022:08:14 21:05:21
|
||||
```
|
||||
|
||||
Canon:
|
||||
|
||||
```bash
|
||||
$ exiftool -Canon 2022-08-12_Chevreuils_6405.jpg
|
||||
File Name : 2022-08-12_Chevreuils_6405.jpg
|
||||
Camera Model Name : Canon EOS R6
|
||||
Date/Time Original : 2022:08:12 19:55:01
|
||||
Shutter Speed : 1/1250
|
||||
Aperture : 4.0
|
||||
Metering Mode : Multi-segment
|
||||
Exposure Compensation : +4/3
|
||||
ISO : 320
|
||||
Lens : EF600mm f/4L IS III USM
|
||||
Focal Length : 600.0 mm
|
||||
Image Size : 1600x1067
|
||||
Flash : No Flash
|
||||
White Balance : Manual
|
||||
Sharpness : 40
|
||||
Saturation : +6
|
||||
Color Space : sRGB
|
||||
File Size : 335 kB
|
||||
Serial Number : 083021004471
|
||||
```
|
||||
|
||||
Common:
|
||||
|
||||
```bash
|
||||
$ exiftool -Common 2022-08-12_Chevreuils_6405.jpg
|
||||
File Name : 2022-08-12_Chevreuils_6405.jpg
|
||||
File Size : 335 kB
|
||||
Camera Model Name : Canon EOS R6
|
||||
Date/Time Original : 2022:08:12 19:55:01
|
||||
Image Size : 1600x1067
|
||||
Focal Length : 600.0 mm
|
||||
Shutter Speed : 1/1250
|
||||
Aperture : 4.0
|
||||
ISO : 320
|
||||
White Balance : Manual
|
||||
Flash : No Flash
|
||||
```
|
||||
|
||||
CommonIFD0:
|
||||
|
||||
```bash
|
||||
$ exiftool -CommonIFD0 2022-08-12_Chevreuils_6405.jpg
|
||||
Make : Canon
|
||||
Camera Model Name : Canon EOS R6
|
||||
Software : Adobe Photoshop Lightroom Classic 11.4.1 (Macintosh)
|
||||
Modify Date : 2022:08:14 21:05:21
|
||||
Artist : Pesenti
|
||||
Copyright : clicclac.info
|
||||
```
|
||||
|
||||
LargeTags:
|
||||
|
||||
```bash
|
||||
$ exiftool -LargeTags 2022-08-12_Chevreuils_6405.jpg
|
||||
EXIF : (Binary data 20300 bytes, use -b option to extract)
|
||||
ICC Profile : (Binary data 3144 bytes, use -b option to extract)
|
||||
IPTC : (Binary data 192 bytes, use -b option to extract)
|
||||
Thumbnail Image : (Binary data 19320 bytes, use -b option to extract)
|
||||
XMP : (Binary data 13314 bytes, use -b option to extract)
|
||||
```
|
||||
|
||||
ls-l:
|
||||
|
||||
```bash
|
||||
$ exiftool -ls-l 2022-08-12_Chevreuils_6405.jpg
|
||||
File Permissions : -rw-r--r--
|
||||
File Hard Links : 1
|
||||
File User ID : bruno
|
||||
File Group ID : staff
|
||||
File Size : 334966
|
||||
File Modification Date/Time : 2022:08:14 21:05:22+02:00
|
||||
File Name : 2022-08-12_Chevreuils_6405.jpg
|
||||
```
|
||||
|
||||
Sans option:
|
||||
|
||||
```bash
|
||||
$ exiftool 2022-08-12_Chevreuils_6405.jpg
|
||||
ExifTool Version Number : 12.42
|
||||
File Name : 2022-08-12_Chevreuils_6405.jpg
|
||||
Directory : .
|
||||
File Size : 335 kB
|
||||
File Modification Date/Time : 2022:08:14 21:05:22+02:00
|
||||
File Access Date/Time : 2022:08:15 08:56:12+02:00
|
||||
File Inode Change Date/Time : 2022:08:15 08:56:10+02:00
|
||||
File Permissions : -rw-r--r--
|
||||
File Type : JPEG
|
||||
File Type Extension : jpg
|
||||
MIME Type : image/jpeg
|
||||
Exif Byte Order : Little-endian (Intel, II)
|
||||
Make : Canon
|
||||
Camera Model Name : Canon EOS R6
|
||||
X Resolution : 72
|
||||
Y Resolution : 72
|
||||
Resolution Unit : inches
|
||||
Software : Adobe Photoshop Lightroom Classic 11.4.1 (Macintosh)
|
||||
Modify Date : 2022:08:14 21:05:21
|
||||
Artist : Pesenti
|
||||
Copyright : clicclac.info
|
||||
Exposure Time : 1/1250
|
||||
F Number : 4.0
|
||||
Exposure Program : Shutter speed priority AE
|
||||
ISO : 320
|
||||
Sensitivity Type : Recommended Exposure Index
|
||||
Recommended Exposure Index : 320
|
||||
Exif Version : 0231
|
||||
Date/Time Original : 2022:08:12 19:55:01
|
||||
Create Date : 2022:08:12 19:55:01
|
||||
Offset Time : +02:00
|
||||
Offset Time Original : +02:00
|
||||
Offset Time Digitized : +02:00
|
||||
Shutter Speed Value : 1/1250
|
||||
Aperture Value : 4.0
|
||||
Exposure Compensation : +4/3
|
||||
Max Aperture Value : 4.2
|
||||
Metering Mode : Multi-segment
|
||||
Flash : No Flash
|
||||
Focal Length : 600.0 mm
|
||||
Sub Sec Time Original : 29
|
||||
Sub Sec Time Digitized : 29
|
||||
Color Space : sRGB
|
||||
Focal Plane X Resolution : 1520
|
||||
Focal Plane Y Resolution : 1520
|
||||
Focal Plane Resolution Unit : cm
|
||||
Custom Rendered : Normal
|
||||
Exposure Mode : Auto
|
||||
White Balance : Manual
|
||||
Scene Capture Type : Standard
|
||||
Serial Number : 083021004471
|
||||
Lens Info : 600mm f/?
|
||||
Lens Model : EF600mm f/4L IS III USM
|
||||
Lens Serial Number : 7110000203
|
||||
Compression : JPEG (old-style)
|
||||
Thumbnail Offset : 992
|
||||
Thumbnail Length : 19320
|
||||
Displayed Units X : inches
|
||||
Displayed Units Y : inches
|
||||
Current IPTC Digest : 118667209c5b6206903e30011744a4a4
|
||||
Coded Character Set : UTF8
|
||||
Application Record Version : 4
|
||||
Keywords : accouplement, brocard, capreolus capreolus, chevrette, chevreuil, rut
|
||||
Time Created : 19:55:01+02:00
|
||||
Digital Creation Date : 2022:08:12
|
||||
Digital Creation Time : 19:55:01+02:00
|
||||
By-line : Pesenti
|
||||
Copyright Notice : clicclac.info
|
||||
Copyright Flag : True
|
||||
Photoshop Thumbnail : (Binary data 19320 bytes, use -b option to extract)
|
||||
IPTC Digest : 118667209c5b6206903e30011744a4a4
|
||||
Profile CMM Type : Linotronic
|
||||
Profile Version : 2.1.0
|
||||
Profile Class : Display Device Profile
|
||||
Color Space Data : RGB
|
||||
Profile Connection Space : XYZ
|
||||
Profile Date Time : 1998:02:09 06:49:00
|
||||
Profile File Signature : acsp
|
||||
Primary Platform : Microsoft Corporation
|
||||
CMM Flags : Not Embedded, Independent
|
||||
Device Manufacturer : Hewlett-Packard
|
||||
Device Model : sRGB
|
||||
Device Attributes : Reflective, Glossy, Positive, Color
|
||||
Rendering Intent : Perceptual
|
||||
Connection Space Illuminant : 0.9642 1 0.82491
|
||||
Profile Creator : Hewlett-Packard
|
||||
Profile ID : 0
|
||||
Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
|
||||
Profile Description : sRGB IEC61966-2.1
|
||||
Media White Point : 0.95045 1 1.08905
|
||||
Media Black Point : 0 0 0
|
||||
Red Matrix Column : 0.43607 0.22249 0.01392
|
||||
Green Matrix Column : 0.38515 0.71687 0.09708
|
||||
Blue Matrix Column : 0.14307 0.06061 0.7141
|
||||
Device Mfg Desc : IEC http://www.iec.ch
|
||||
Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
|
||||
Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
|
||||
Viewing Cond Illuminant : 19.6445 20.3718 16.8089
|
||||
Viewing Cond Surround : 3.92889 4.07439 3.36179
|
||||
Viewing Cond Illuminant Type : D50
|
||||
Luminance : 76.03647 80 87.12462
|
||||
Measurement Observer : CIE 1931
|
||||
Measurement Backing : 0 0 0
|
||||
Measurement Geometry : Unknown
|
||||
Measurement Flare : 0.999%
|
||||
Measurement Illuminant : D65
|
||||
Technology : Cathode Ray Tube Display
|
||||
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
|
||||
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
|
||||
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
|
||||
XMP Toolkit : Adobe XMP Core 7.0-c000 1.000000, 0000/00/00-00:00:00
|
||||
Metadata Date : 2022:08:14 21:05:21+02:00
|
||||
Rating : 4
|
||||
Label : Selection
|
||||
Creator Tool : Adobe Photoshop Lightroom Classic 11.4.1 (Macintosh)
|
||||
Format : image/jpeg
|
||||
Lens : EF600mm f/4L IS III USM
|
||||
Image Number : 0
|
||||
Approximate Focus Distance : 46.1
|
||||
Flash Compensation : 0
|
||||
Firmware : 1.5.2
|
||||
Distortion Correction Already Applied: True
|
||||
Lateral Chromatic Aberration Correction Already Applied: True
|
||||
Vignette Correction Already Applied: True
|
||||
Date Created : 2022:08:12 19:55:01.29+02:00
|
||||
Document ID : xmp.did:3de77c21-df1e-4bd1-9559-2cf2841fbb35
|
||||
Preserved File Name : IMG_6405.CR3
|
||||
Original Document ID : C63EBF3F8F3BED8866DB0BDC4A24F281
|
||||
Instance ID : xmp.iid:3de77c21-df1e-4bd1-9559-2cf2841fbb35
|
||||
Marked : True
|
||||
Raw File Name : 2022-08-12_Chevreuils_6405.CR3
|
||||
Version : 14.4.1
|
||||
Process Version : 11.0
|
||||
Color Temperature : 6050
|
||||
Tint : +4
|
||||
Exposure 2012 : +1.50
|
||||
Contrast 2012 : 0
|
||||
Highlights 2012 : +13
|
||||
Shadows 2012 : +8
|
||||
Whites 2012 : +12
|
||||
Blacks 2012 : 0
|
||||
Texture : +13
|
||||
Clarity 2012 : +16
|
||||
Dehaze : 0
|
||||
Vibrance : +9
|
||||
Saturation : +6
|
||||
Parametric Shadows : 0
|
||||
Parametric Darks : 0
|
||||
Parametric Lights : 0
|
||||
Parametric Highlights : 0
|
||||
Parametric Shadow Split : 25
|
||||
Parametric Midtone Split : 50
|
||||
Parametric Highlight Split : 75
|
||||
Sharpness : 40
|
||||
Sharpen Radius : +1.0
|
||||
Sharpen Detail : 25
|
||||
Sharpen Edge Masking : 0
|
||||
Luminance Smoothing : 0
|
||||
Color Noise Reduction : 25
|
||||
Color Noise Reduction Detail : 50
|
||||
Color Noise Reduction Smoothness: 50
|
||||
Hue Adjustment Red : 0
|
||||
Hue Adjustment Orange : 0
|
||||
Hue Adjustment Yellow : 0
|
||||
Hue Adjustment Green : 0
|
||||
Hue Adjustment Aqua : 0
|
||||
Hue Adjustment Blue : 0
|
||||
Hue Adjustment Purple : 0
|
||||
Hue Adjustment Magenta : 0
|
||||
Saturation Adjustment Red : 0
|
||||
Saturation Adjustment Orange : 0
|
||||
Saturation Adjustment Yellow : 0
|
||||
Saturation Adjustment Green : 0
|
||||
Saturation Adjustment Aqua : 0
|
||||
Saturation Adjustment Blue : 0
|
||||
Saturation Adjustment Purple : 0
|
||||
Saturation Adjustment Magenta : 0
|
||||
Luminance Adjustment Red : 0
|
||||
Luminance Adjustment Orange : 0
|
||||
Luminance Adjustment Yellow : 0
|
||||
Luminance Adjustment Green : 0
|
||||
Luminance Adjustment Aqua : 0
|
||||
Luminance Adjustment Blue : 0
|
||||
Luminance Adjustment Purple : 0
|
||||
Luminance Adjustment Magenta : 0
|
||||
Split Toning Shadow Hue : 0
|
||||
Split Toning Shadow Saturation : 0
|
||||
Split Toning Highlight Hue : 0
|
||||
Split Toning Highlight Saturation: 0
|
||||
Split Toning Balance : 0
|
||||
Color Grade Midtone Hue : 0
|
||||
Color Grade Midtone Sat : 0
|
||||
Color Grade Shadow Lum : 0
|
||||
Color Grade Midtone Lum : 0
|
||||
Color Grade Highlight Lum : 0
|
||||
Color Grade Blending : 50
|
||||
Color Grade Global Hue : 0
|
||||
Color Grade Global Sat : 0
|
||||
Color Grade Global Lum : 0
|
||||
Auto Lateral CA : 1
|
||||
Lens Profile Enable : 1
|
||||
Lens Manual Distortion Amount : 0
|
||||
Vignette Amount : 0
|
||||
Defringe Purple Amount : 0
|
||||
Defringe Purple Hue Lo : 30
|
||||
Defringe Purple Hue Hi : 70
|
||||
Defringe Green Amount : 0
|
||||
Defringe Green Hue Lo : 40
|
||||
Defringe Green Hue Hi : 60
|
||||
Perspective Upright : 0
|
||||
Perspective Vertical : 0
|
||||
Perspective Horizontal : 0
|
||||
Perspective Rotate : 0.0
|
||||
Perspective Aspect : 0
|
||||
Perspective Scale : 100
|
||||
Perspective X : 0.00
|
||||
Perspective Y : 0.00
|
||||
Grain Amount : 0
|
||||
Post Crop Vignette Amount : 0
|
||||
Shadow Tint : 0
|
||||
Red Hue : 0
|
||||
Red Saturation : 0
|
||||
Green Hue : 0
|
||||
Green Saturation : 0
|
||||
Blue Hue : 0
|
||||
Blue Saturation : 0
|
||||
Override Look Vignette : False
|
||||
Tone Curve Name 2012 : Custom
|
||||
Camera Profile : Adobe Standard
|
||||
Camera Profile Digest : 441F68BD6BC3369B59256B103CE2CD5C
|
||||
Lens Profile Setup : Custom
|
||||
Lens Profile Name : Adobe (Canon EF 600mm f/4L IS III USM)
|
||||
Lens Profile Filename : Canon (Canon EF 600mm f4L IS III USM) - RAW.lcp
|
||||
Lens Profile Digest : A58C82ECDC77A3A3EAD3EA167A0DED19
|
||||
Lens Profile Is Embedded : False
|
||||
Lens Profile Distortion Scale : 100
|
||||
Lens Profile Vignetting Scale : 100
|
||||
Has Settings : True
|
||||
Crop Top : 0.174748
|
||||
Crop Left : 0
|
||||
Crop Bottom : 1
|
||||
Crop Right : 0.825252
|
||||
Crop Angle : 0
|
||||
Crop Constrain To Warp : 0
|
||||
Has Crop : True
|
||||
Already Applied : True
|
||||
Creator : Pesenti
|
||||
Rights : clicclac.info
|
||||
Subject : accouplement, brocard, capreolus capreolus, chevrette, chevreuil, rut
|
||||
History Action : derived, saved
|
||||
History Parameters : converted from image/x-canon-cr3 to image/jpeg, saved to new location
|
||||
History Instance ID : xmp.iid:3de77c21-df1e-4bd1-9559-2cf2841fbb35
|
||||
History When : 2022:08:14 21:05:21+02:00
|
||||
History Software Agent : Adobe Photoshop Lightroom Classic 11.4.1 (Macintosh)
|
||||
History Changed : /
|
||||
Derived From Document ID : C63EBF3F8F3BED8866DB0BDC4A24F281
|
||||
Derived From Original Document ID: C63EBF3F8F3BED8866DB0BDC4A24F281
|
||||
Weighted Flat Subject : accouplement, brocard, capreolus capreolus, chevrette, chevreuil, rut
|
||||
Tone Curve PV2012 : 0, 0, 31, 42, 56, 88, 191, 208, 255, 255
|
||||
Tone Curve PV2012 Red : 0, 0, 255, 255
|
||||
Tone Curve PV2012 Green : 0, 0, 255, 255
|
||||
Tone Curve PV2012 Blue : 0, 0, 255, 255
|
||||
Look Name : Adobe Color
|
||||
Look Amount : 1
|
||||
Look UUID : B952C231111CD8E0ECCF14B86BAA7077
|
||||
Look Supports Amount : false
|
||||
Look Supports Monochrome : false
|
||||
Look Supports Output Referred : false
|
||||
Look Group : Profiles
|
||||
Look Parameters Version : 14.4.1
|
||||
Look Parameters Process Version : 11.0
|
||||
Look Parameters Convert To Grayscale: False
|
||||
Look Parameters Camera Profile : Adobe Standard
|
||||
Look Parameters Look Table : E1095149FDB39D7A057BAB208837E2E1
|
||||
Look Parameters Tone Curve PV2012: 0, 0, 22, 16, 40, 35, 127, 127, 224, 230, 240, 246, 255, 255
|
||||
Look Parameters Tone Curve PV2012 Red: 0, 0, 255, 255
|
||||
Look Parameters Tone Curve PV2012 Green: 0, 0, 255, 255
|
||||
Look Parameters Tone Curve PV2012 Blue: 0, 0, 255, 255
|
||||
DCT Encode Version : 100
|
||||
APP14 Flags 0 : [14], Encoded with Blend=1 downsampling
|
||||
APP14 Flags 1 : (none)
|
||||
Color Transform : YCbCr
|
||||
Comment : Optimized by JPEGmini 3.18.9.220874607-AV 0xf034c802
|
||||
Image Width : 1600
|
||||
Image Height : 1067
|
||||
Encoding Process : Baseline DCT, Huffman coding
|
||||
Bits Per Sample : 8
|
||||
Color Components : 3
|
||||
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
|
||||
Aperture : 4.0
|
||||
Image Size : 1600x1067
|
||||
Megapixels : 1.7
|
||||
Scale Factor To 35 mm Equivalent: 3.4
|
||||
Shutter Speed : 1/1250
|
||||
Create Date : 2022:08:12 19:55:01.29+02:00
|
||||
Date/Time Original : 2022:08:12 19:55:01.29+02:00
|
||||
Modify Date : 2022:08:14 21:05:21+02:00
|
||||
Thumbnail Image : (Binary data 19320 bytes, use -b option to extract)
|
||||
Date/Time Created : 2022:08:12 19:55:01+02:00
|
||||
Digital Creation Date/Time : 2022:08:12 19:55:01+02:00
|
||||
Circle Of Confusion : 0.009 mm
|
||||
Depth Of Field : 0.41 m (45.90 - 46.31 m)
|
||||
Field Of View : 1.0 deg
|
||||
Focal Length : 600.0 mm (35 mm equivalent: 2051.8 mm)
|
||||
Hyperfocal Distance : 10243.22 m
|
||||
Light Value : 12.6
|
||||
Lens ID : Canon EF 600mm f/4L IS III USM
|
||||
|
||||
```
|
||||
|
||||
Voir les infos GPS:
|
||||
|
||||
```bash
|
||||
# zsh
|
||||
❯ exiftool 12_2017.jpg -'GPS*'
|
||||
|
||||
# bash
|
||||
❯ exiftool 12_2017.jpg -GPS*
|
||||
GPS Version ID : 2.2.0.0
|
||||
GPS Latitude Ref : North
|
||||
GPS Longitude Ref : East
|
||||
GPS Altitude : 0.7094 m
|
||||
GPS Latitude : 43 deg 31' 30.64" N
|
||||
GPS Longitude : 4 deg 38' 15.31" E
|
||||
GPS Position : 43 deg 31' 30.64" N, 4 deg 38' 15.31" E
|
||||
|
||||
```
|
||||
|
||||
Mots-clé:
|
||||
|
||||
```bash
|
||||
$ exiftool -s -Keywords 2022-08-12_Chevreuils_6405.jpg
|
||||
Keywords : accouplement, brocard, capreolus capreolus, chevrette, chevreuil, rut
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# Supprimer les coord. GPS:
|
||||
|
||||
❯ exiftool -gps:all= 12_2017.jpg
|
||||
1 image files updated
|
||||
|
||||
❯ exiftool 12_2017.jpg -'GPS*'
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# Restaurer l'original:
|
||||
|
||||
❯ exiftool -restore_original 12_2017.jpg
|
||||
1 image files found
|
||||
1 image files restored from original
|
||||
|
||||
```
|
||||
|
||||
https://adamtheautomator.com/exiftool/
|
||||
16
docs/Divers/images/heic.md
Normal file
16
docs/Divers/images/heic.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# heic
|
||||
|
||||
|
||||
|
||||
### sips (scriptable image processing system)
|
||||
|
||||
```bash
|
||||
$ sips -s format heic -s formatOptions 50 png/2022-04-16_Brocard_8990_8b.png --out sips/2022-04-16_Brocard_8990_8b.heic
|
||||
/Users/bruno/Desktop/avif/png/2022-04-16_Brocard_8990_8b.png
|
||||
/Users/bruno/Desktop/avif/sips/2022-04-16_Brocard_8990_8b.heic
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
heif-enc - convert image to HEIC/HEIF
|
||||
51
docs/Divers/images/mozjpeg.md
Normal file
51
docs/Divers/images/mozjpeg.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# mozjpeg
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
```bash
|
||||
brew install mozjpeg
|
||||
```
|
||||
|
||||
Si libjpeg est déjà installé, cjpeg et jpegtran sont déjà présent. Il faut linker les binaires de mozjpeg:
|
||||
|
||||
```bash
|
||||
ln -s /opt/homebrew/opt/mozjpeg/bin/cjpeg /usr/local/bin/mozcjpeg
|
||||
ln -s /opt/homebrew/opt/mozjpeg/bin/jpegtran /usr/local/bin/mozjpegtran
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Usage:
|
||||
|
||||
**cjpeg** = lossy (avec pertes).
|
||||
|
||||
**cjpeg** accepte les image aux formats JPEG, PNG, BMP et Targa.
|
||||
|
||||
<u>Options:</u>
|
||||
|
||||
- -quality (entre 5 et 95)(défaut 75)
|
||||
- -progressive (par défaut) sinon -baseline
|
||||
- -optimize (par défaut)
|
||||
- -outfile <name>
|
||||
|
||||
|
||||
|
||||
**jpegtran** = lossless (sans pertes).
|
||||
|
||||
**jpegtran** accepte les image au format JPEG.
|
||||
|
||||
<u>Options:</u>
|
||||
|
||||
- -progressive (défaut) sinon -baseline
|
||||
- -optimize (par défaut)
|
||||
- -outfile <name>
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
❯ mozcjpeg 2022-05-10_Cerf_8869-CR3_DxO_DeepPRIME.png > 5_2022.jpg
|
||||
libpng warning: iCCP: known incorrect sRGB profile
|
||||
```
|
||||
|
||||
273
docs/Divers/images/webp.md
Normal file
273
docs/Divers/images/webp.md
Normal file
@@ -0,0 +1,273 @@
|
||||
# webp
|
||||
|
||||
|
||||
|
||||
#### Convertisseurs:
|
||||
|
||||
- Photoshop 23.2 +
|
||||
- XnConvert
|
||||
- WebPShop
|
||||
- [cwebp](#cwebp)
|
||||
- [squoosh-cli](#squoosh)
|
||||
- [ImageMagick](#ImageMagick)
|
||||
- WebpConvert
|
||||
|
||||
|
||||
|
||||
### <a id="cwebp"></a>cwebp
|
||||
|
||||
Doc: https://developers.google.com/speed/webp/docs/cwebp
|
||||
|
||||
App: https://developers.google.com/speed/webp/docs/precompiled
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install webp
|
||||
```
|
||||
|
||||
#### Aide:
|
||||
|
||||
```bash
|
||||
❯ cwebp -longhelp
|
||||
Usage:
|
||||
cwebp [-preset <...>] [options] in_file [-o out_file]
|
||||
|
||||
If input size (-s) for an image is not specified, it is
|
||||
assumed to be a PNG, JPEG, TIFF or WebP file.
|
||||
Note: Animated PNG and WebP files are not supported.
|
||||
|
||||
Options:
|
||||
-h / -help ............. short help
|
||||
-H / -longhelp ......... long help
|
||||
-q <float> ............. quality factor (0:small..100:big), default=75
|
||||
-alpha_q <int> ......... transparency-compression quality (0..100),
|
||||
default=100
|
||||
-preset <string> ....... preset setting, one of:
|
||||
default, photo, picture,
|
||||
drawing, icon, text
|
||||
-preset must come first, as it overwrites other parameters
|
||||
-z <int> ............... activates lossless preset with given
|
||||
level in [0:fast, ..., 9:slowest]
|
||||
|
||||
-m <int> ............... compression method (0=fast, 6=slowest), default=4
|
||||
-segments <int> ........ number of segments to use (1..4), default=4
|
||||
-size <int> ............ target size (in bytes)
|
||||
-psnr <float> .......... target PSNR (in dB. typically: 42)
|
||||
|
||||
-s <int> <int> ......... input size (width x height) for YUV
|
||||
-sns <int> ............. spatial noise shaping (0:off, 100:max), default=50
|
||||
-f <int> ............... filter strength (0=off..100), default=60
|
||||
-sharpness <int> ....... filter sharpness (0:most .. 7:least sharp), default=0
|
||||
-strong ................ use strong filter instead of simple (default)
|
||||
-nostrong .............. use simple filter instead of strong
|
||||
-sharp_yuv ............. use sharper (and slower) RGB->YUV conversion
|
||||
-partition_limit <int> . limit quality to fit the 512k limit on
|
||||
the first partition (0=no degradation ... 100=full)
|
||||
-pass <int> ............ analysis pass number (1..10)
|
||||
-qrange <min> <max> .... specifies the permissible quality range
|
||||
(default: 0 100)
|
||||
-crop <x> <y> <w> <h> .. crop picture with the given rectangle
|
||||
-resize <w> <h> ........ resize picture (after any cropping)
|
||||
-mt .................... use multi-threading if available
|
||||
-low_memory ............ reduce memory usage (slower encoding)
|
||||
-map <int> ............. print map of extra info
|
||||
-print_psnr ............ prints averaged PSNR distortion
|
||||
-print_ssim ............ prints averaged SSIM distortion
|
||||
-print_lsim ............ prints local-similarity distortion
|
||||
-d <file.pgm> .......... dump the compressed output (PGM file)
|
||||
-alpha_method <int> .... transparency-compression method (0..1), default=1
|
||||
-alpha_filter <string> . predictive filtering for alpha plane,
|
||||
one of: none, fast (default) or best
|
||||
-exact ................. preserve RGB values in transparent area, default=off
|
||||
-blend_alpha <hex> ..... blend colors against background color
|
||||
expressed as RGB values written in
|
||||
hexadecimal, e.g. 0xc0e0d0 for red=0xc0
|
||||
green=0xe0 and blue=0xd0
|
||||
-noalpha ............... discard any transparency information
|
||||
-lossless .............. encode image losslessly, default=off
|
||||
-near_lossless <int> ... use near-lossless image
|
||||
preprocessing (0..100=off), default=100
|
||||
-hint <string> ......... specify image characteristics hint,
|
||||
one of: photo, picture or graph
|
||||
|
||||
-metadata <string> ..... comma separated list of metadata to
|
||||
copy from the input to the output if present.
|
||||
Valid values: all, none (default), exif, icc, xmp
|
||||
|
||||
-short ................. condense printed message
|
||||
-quiet ................. don't print anything
|
||||
-version ............... print version number and exit
|
||||
-noasm ................. disable all assembly optimizations
|
||||
-v ..................... verbose, e.g. print encoding/decoding times
|
||||
-progress .............. report encoding progress
|
||||
|
||||
Experimental Options:
|
||||
-jpeg_like ............. roughly match expected JPEG size
|
||||
-af .................... auto-adjust filter strength
|
||||
-pre <int> ............. pre-processing filter
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
$ cwebp -q 90 image.png -o image.webp
|
||||
```
|
||||
|
||||
```bash
|
||||
for infile in Screenshot*.png
|
||||
do
|
||||
echo $infile
|
||||
base=$(basename "$infile" .png)
|
||||
cwebp -preset picture -v "$infile" -o "$base".webp
|
||||
done
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cwebp png/2022-04-16_Brocard_8990_8b.png -q 75 -mt -o cwebp/2022-04-16_Brocard_8990_8b_q75.webp
|
||||
|
||||
$ cwebp png/2022-04-16_Brocard_8990_8b.png -preset photo -mt -o cwebp/2022-04-16_Brocard_8990_8b_preset-photo.webp
|
||||
```
|
||||
|
||||
```bash
|
||||
# lossless
|
||||
|
||||
$ cwebp png/2022-04-16_Brocard_8990_8b.png -z 9 -mt -o cwebp/2022-04-16_Brocard_8990_8b.webp
|
||||
|
||||
$ cwebp png/2022-04-16_Brocard_8990_8b.png -lossless -m 6 -q 100 -mt -o cwebp/2022-04-16_Brocard_8990_8b.webp
|
||||
```
|
||||
|
||||
|
||||
|
||||
### <a id="squoosh"></a>[squoosh-cli](https://www.npmjs.com/package/@squoosh/cli)
|
||||
|
||||
Supporte mozjpeg, webp, avif, jxl, wp2
|
||||
|
||||
Les options sont visibles dans [codecs.ts](https://github.com/GoogleChromeLabs/squoosh/blob/dev/libsquoosh/src/codecs.ts)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ npm i -g @squoosh/cli
|
||||
```
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
Usage: squoosh-cli [options] <files...>
|
||||
|
||||
Options:
|
||||
-d, --output-dir <dir> Output directory (default: ".")
|
||||
-s, --suffix <suffix> Append suffix to output files (default: "")
|
||||
--max-optimizer-rounds <rounds> Maximum number of compressions to use for auto optimizations (default: "6")
|
||||
--optimizer-butteraugli-target <butteraugli distance> Target Butteraugli distance for auto optimizer (default: "1.4")
|
||||
--resize [config] Resize the image before compressing
|
||||
--quant [config] Reduce the number of colors used (aka. paletting)
|
||||
--rotate [config] Rotate image
|
||||
--mozjpeg [config] Use MozJPEG to generate a .jpg file with the given configuration
|
||||
--webp [config] Use WebP to generate a .webp file with the given configuration
|
||||
--avif [config] Use AVIF to generate a .avif file with the given configuration
|
||||
--jxl [config] Use JPEG-XL to generate a .jxl file with the given configuration
|
||||
--wp2 [config] Use WebP2 to generate a .wp2 file with the given configuration
|
||||
--oxipng [config] Use OxiPNG to generate a .png file with the given configuration
|
||||
-h, --help display help for command
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ squoosh-cli --webp true -d webp ./2022-04-28_Biche_8247_8b.png
|
||||
1/1 ✔ Squoosh results:
|
||||
./2022-04-28_Biche_8247_8b.png: 2.18MB
|
||||
└ webp/2022-04-28_Biche_8247_8b.webp → 75.00KB (3.37%)
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ squoosh-cli --output-dir 'squoosh-cli' --webp '{
|
||||
"quality":75,
|
||||
"target_size":0,
|
||||
"target_PSNR":0,
|
||||
"method":4,
|
||||
"sns_strength":50,
|
||||
"filter_strength":60,
|
||||
"filter_sharpness":0,
|
||||
"filter_type":1,
|
||||
"partitions":0,
|
||||
"segments":4,
|
||||
"pass":1,
|
||||
"show_compressed":0,
|
||||
"preprocessing":0,
|
||||
"autofilter":0,
|
||||
"partition_limit":0,
|
||||
"alpha_compression":1,
|
||||
"alpha_filtering":1,
|
||||
"alpha_quality":100,
|
||||
"lossless":0,
|
||||
"exact":0,
|
||||
"image_hint":0,
|
||||
"emulate_jpeg_size":0,
|
||||
"thread_level":0,
|
||||
"low_memory":0,
|
||||
"near_lossless":100,
|
||||
"use_delta_palette":0,
|
||||
"use_sharp_yuv":0
|
||||
}' png/*.png
|
||||
```
|
||||
|
||||
|
||||
|
||||
### <a id="ImageMagick"></a>ImageMagick
|
||||
|
||||
[Webp options](https://imagemagick.org/script/webp.php).
|
||||
|
||||
[-define](https://imagemagick.org/script/defines.php) command-line option.
|
||||
|
||||
[Command-line tools](https://imagemagick.org/script/command-line-tools.php)
|
||||
|
||||
[Command-line Options](https://imagemagick.org/script/command-line-options.php#quality)
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ magick -quality 75 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b.webp
|
||||
|
||||
❯ magick -define heic:speed=2 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b_2.webp
|
||||
|
||||
❯ convert -define heic:speed=2 png/2022-04-16_Brocard_8990_8b.png magick/2022-04-16_Brocard_8990_8b_2.webp
|
||||
```
|
||||
|
||||
```bash
|
||||
magick png/2022-04-16_Brocard_8990_8b.png -quality 50 -define webp:lossless=true png/2022-04-16_Brocard_8990_8b_ll-true.webp
|
||||
|
||||
magick png/2022-04-16_Brocard_8990_8b.png -quality 90 -define webp:lossless=false png/2022-04-16_Brocard_8990_8b_ll-false.webp
|
||||
```
|
||||
|
||||
|
||||
|
||||
### [WebpConvert](https://github.com/rizqirizqi/webpconvert)
|
||||
|
||||
#### Installation:
|
||||
|
||||
```bash
|
||||
$ npm install -g webpconvert
|
||||
```
|
||||
|
||||
#### Options:
|
||||
|
||||
```bash
|
||||
-p, --prefix Specify the prefix of output filename. [chaîne de caractères] [défaut : ""]
|
||||
-s, --suffix Specify the suffix of output filename. [chaîne de caractères] [défaut : ""]
|
||||
-q, --quality Specify the quality of webp image. Lower values yield better compression but the least image quality. [nombre] [défaut : 80]
|
||||
-m, --mute Disable output messages. [booléen] [défaut : false]
|
||||
-h, --help Affiche l'aide [booléen]
|
||||
-v, --version Affiche le numéro de version [booléen]
|
||||
```
|
||||
|
||||
#### Usage:
|
||||
|
||||
```bash
|
||||
❯ webpconvert -q 80 --suffix="webpconvert-q80" png/2022-05-10_Cerf_8817_8b.png webpconvert/2022-05-10_Cerf_8817_8b.webp
|
||||
|
||||
❯ webpconvert -q 80 --suffix="webpconvert-q80" png/ webpconvert/
|
||||
```
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
|
||||
|
||||
|
||||
### Backup (paramètres et partition JFFS)
|
||||
|
||||
A faire avant la mise-à-jour du firmware;
|
||||
|
||||
Administration -> Restaurer -> **Router settings** -> Enregistrer les Paramètres
|
||||
|
||||
Administration -> Restaurer -> **JFFS Partition** -> Backup JFFS partition
|
||||
|
||||
|
||||
|
||||
### Activer SSH et les scripts JFFS:
|
||||
|
||||
1. Aller à **Administration** puis onglet **Système**.
|
||||
@@ -51,7 +61,7 @@ $ service restart_dnsmasq
|
||||
|
||||
### Dnsmasq:
|
||||
|
||||
Configuration:
|
||||
#### Configuration:
|
||||
|
||||
```bash
|
||||
$ nano /etc/dnsmasq.conf
|
||||
@@ -59,13 +69,13 @@ $ nano /etc/dnsmasq.conf
|
||||
|
||||
|
||||
|
||||
Vérifier la configuration:
|
||||
#### Vérifier la configuration:
|
||||
|
||||
```bash
|
||||
$ dnsmasq --test
|
||||
```
|
||||
|
||||
Vérifier la résolution DNS:
|
||||
#### Vérifier la résolution DNS:
|
||||
|
||||
```bash
|
||||
$ dig clicclac.synology.me +short
|
||||
@@ -97,9 +107,9 @@ clicclac.synology.me. 171 IN A 90.62.226.41
|
||||
|
||||
|
||||
|
||||
Bloquer un domain:
|
||||
#### Bloquer un domain:
|
||||
|
||||
Ajouter dans le dnsmasq.conf:
|
||||
Ajouter dans le fichier `/etc/dnsmasq.conf`:
|
||||
|
||||
```bash
|
||||
address=/blocked.example/
|
||||
@@ -116,6 +126,16 @@ conf-dir=/etc/dnsmasq.d/,*.conf
|
||||
|
||||
|
||||
|
||||
#### Notification de mise-à-jour:
|
||||
|
||||
https://github.com/RMerl/asuswrt-merlin.ng/wiki/Update-Notification-Example
|
||||
|
||||
```bash
|
||||
bruno@RT-AC88U-0928:/bin# /jffs/scripts/update-notification
|
||||
```
|
||||
|
||||
|
||||
|
||||
### amtm
|
||||
|
||||
[amtm](https://diversion.ch/amtm.html) est une GUI qui permet d'installer des scripts dans les routeurs Asus fonctionnant sous le firmware [Asuswrt-Merlin](https://www.asuswrt-merlin.net) (depuis la v384.15, amtm est installé d'office) ([forum](https://www.snbforums.com/threads/amtm-the-asuswrt-merlin-terminal-menu.42415/page-124)).
|
||||
@@ -155,7 +175,11 @@ Modules installés:
|
||||
- Skynet (nécessite un fichier swap de 2 Go):
|
||||
- LED Control: éteint les LED de 21h30 à 7h
|
||||
|
||||
Désinstaller Skynet:
|
||||
|
||||
```bash
|
||||
sh /jffs/scripts/firewall uninstall
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -177,4 +201,8 @@ Asus-wrt vs Asus-Merlin:
|
||||
|
||||
https://www.snbforums.com/threads/dnsmasq-conf-add-without-custom-firmware.43244/
|
||||
|
||||
https://www.snbforums.com/threads/how-to-use-dnsmasq-conf-add.8785/
|
||||
https://www.snbforums.com/threads/how-to-use-dnsmasq-conf-add.8785/
|
||||
|
||||
|
||||
|
||||
https://www.henriksommerfeld.se/firmware-update-notifications-for-my-asus-router/
|
||||
30
docs/Divers/zsh/completion.md
Normal file
30
docs/Divers/zsh/completion.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# completion
|
||||
|
||||
|
||||
|
||||
https://scriptingosx.com/2019/07/moving-to-zsh-part-5-completions/
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
❯ echo $fpath
|
||||
/Users/bruno/.zinit/completions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh/5.8.1/functions /Users/bruno/.zinit/plugins/zsh-users---zsh-completions/src
|
||||
```
|
||||
|
||||
|
||||
|
||||
```
|
||||
/opt/homebrew/etc/bash_completion.d
|
||||
```
|
||||
|
||||
|
||||
|
||||
### .zshrc
|
||||
|
||||
```bash
|
||||
autoload -U +X compinit && compinit
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
|
||||
source /opt/homebrew/etc/bash_completion.d/soco-cli-gui-completion.bash
|
||||
```
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#### You Should Use *
|
||||
|
||||
Simple zsh plugin that reminds you that you should use one of your existing aliases for a command you just typed.
|
||||
|
||||
https://github.com/MichaelAquilina/zsh-you-should-use
|
||||
|
||||
```bash
|
||||
@@ -35,7 +37,11 @@ check_alias_usage
|
||||
|
||||
|
||||
|
||||
#### zsh-fast-alias-tips *
|
||||
#### zsh-fast-alias-tips
|
||||
|
||||
Helps you remembering the aliases you defined once.
|
||||
|
||||
https://github.com/sei40kr/zsh-fast-alias-tips
|
||||
|
||||
```bash
|
||||
|
||||
@@ -147,6 +153,8 @@ drwxr-xr-x 3 bruno staff 96 jul 31 21:28 TVD
|
||||
|
||||
#### zsh-notify *
|
||||
|
||||
Desktop notifications for long-running commands in ZSH.
|
||||
|
||||
https://github.com/marzocchi/zsh-notify
|
||||
|
||||
```bash
|
||||
@@ -172,6 +180,8 @@ zstyle ':notify:*' success-sound "default"
|
||||
|
||||
#### forgit *
|
||||
|
||||
This tool is designed to help you use git more efficiently (fzf).
|
||||
|
||||
https://github.com/wfxr/forgit
|
||||
|
||||
```bash
|
||||
@@ -306,7 +316,9 @@ zinit light zsh-users/zsh-completions
|
||||
|
||||
|
||||
|
||||
#### venv-wrapper *
|
||||
#### venv-wrapper
|
||||
|
||||
zsh plugin defining functions to wrap working with python's builtin venv module
|
||||
|
||||
https://github.com/glostis/venv-wrapper
|
||||
|
||||
@@ -353,6 +365,8 @@ export PATH="$HOME/Documents/venv/soco-cli/bin:$PATH"
|
||||
|
||||
#### web-search *
|
||||
|
||||
Lance une recherche depuis le terminal.
|
||||
|
||||
https://github.com/sineto/web-search
|
||||
|
||||
```bash
|
||||
|
||||
@@ -96,6 +96,23 @@ Total: 0.109 sec
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# Self update
|
||||
zinit self-update
|
||||
|
||||
# Plugin update
|
||||
zinit update
|
||||
zinit update --no-pager --quiet
|
||||
|
||||
# Plugin parallel update
|
||||
zinit update --parallel
|
||||
|
||||
# Increase the number of jobs in a concurrent-set to 40
|
||||
zinit update --parallel 40
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
❯ zinit status
|
||||
Found existing alias for "zinit". You should use: "zini"
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
# ack
|
||||
|
||||
Remplaçant de *grep*
|
||||
|
||||
https://beyondgrep.com
|
||||
|
||||
|
||||
|
||||
Installation:
|
||||
|
||||
```bash
|
||||
$ brew install ack
|
||||
```
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
- [exa](exa.md)
|
||||
- [fd](fd.md)
|
||||
- [fzf](fzf.md)
|
||||
- ripgrep
|
||||
- zoxide
|
||||
- [ripgrep](ripgrep.md)
|
||||
- [zoxide](zoxide.md)
|
||||
|
||||
|
||||
|
||||
@@ -15,14 +15,20 @@
|
||||
|
||||
### bat
|
||||
|
||||
alternative à *cat*
|
||||
|
||||
https://github.com/sharkdp/bat
|
||||
|
||||
### exa
|
||||
|
||||
alternative à *ls*
|
||||
|
||||
https://the.exa.website
|
||||
|
||||
### fd
|
||||
|
||||
alternative à *find*
|
||||
|
||||
https://github.com/sharkdp/fd
|
||||
|
||||
### fzf
|
||||
@@ -31,175 +37,13 @@ https://github.com/junegunn/fzf
|
||||
|
||||
### ripgrep (rg)
|
||||
|
||||
alternative à *grep*
|
||||
|
||||
https://github.com/BurntSushi/ripgrep
|
||||
|
||||
##### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install ripgrep
|
||||
```
|
||||
|
||||
##### Utilisation:
|
||||
|
||||
```bash
|
||||
$ rg PATH ~/.zshrc
|
||||
```
|
||||
|
||||

|
||||
|
||||
```bash
|
||||
# regex ('core' plus 1 ou plusiers lettres)
|
||||
$ rg 'core\w+' ~/.zshrc
|
||||
22:PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH
|
||||
25:coreutils=false
|
||||
|
||||
# regex ('core' plus 0 ou plusiers lettres)
|
||||
$ rg 'core\w*' ~/.zshrc
|
||||
22:PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH
|
||||
25:coreutils=false
|
||||
|
||||
# string
|
||||
$ rg -F 'eval "$(' ~/.zshrc
|
||||
83:eval "$(zoxide init --cmd j zsh)"
|
||||
107:eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
|
||||
```
|
||||
|
||||
[https://docs.rs/regex/*/regex/#syntax](https://docs.rs/regex/*/regex/#syntax)
|
||||
|
||||
rg dans tout un répertoire:
|
||||
|
||||
```bash
|
||||
$ rg '#!'
|
||||
handbrake-batchconvert.sh
|
||||
1:#!/bin/sh
|
||||
|
||||
composer.sh
|
||||
1:#!/bin/bash
|
||||
|
||||
tmutil.sh
|
||||
1:#!/bin/bash
|
||||
```
|
||||
|
||||
```bash
|
||||
$ rg '#!' Scripts
|
||||
Scripts/kymsu2/kymsu2.sh
|
||||
1:#!/usr/bin/env bash
|
||||
|
||||
Scripts/sonos/test.sh
|
||||
1:#!/usr/bin/env bash
|
||||
```
|
||||
|
||||
En l'absence de chemin, rg cherche dans le répertoire courant.
|
||||
|
||||
##### Filtre manuel:
|
||||
|
||||
```bash
|
||||
# Rechercher uniquement dans les fichiers .sh
|
||||
rg echo -g '*.sh'
|
||||
|
||||
# Rechercher partout sauf dans les fichiers .sh
|
||||
rg echo -g '!*.sh'
|
||||
```
|
||||
|
||||
##### File types
|
||||
|
||||
```bash
|
||||
$ rg --type-list
|
||||
...
|
||||
config: *.cfg, *.conf, *.config, *.ini
|
||||
md: *.markdown, *.md, *.mdown, *.mkdn
|
||||
php: *.php, *.php3, *.php4, *.php5, *.phtml
|
||||
sh: *.bash, *.bashrc, *.csh, *.cshrc, *.ksh, *.kshrc, *.sh, *.tcsh, *.zsh, .bash_login, .bash_logout, .bash_profile, .bashrc, .cshrc, .kshrc, .login, .logout, .profile, .tcshrc, .zlogin, .zlogout, .zprofile, .zshenv, .zshrc, bash_login, bash_logout, bash_profile, bashrc, profile, zlogin, zlogout, zprofile, zshenv, zshrc
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# Recherche dans les fichiers shell .bashrc, .zshrc...
|
||||
|
||||
$ rg 'eval' --type sh ~/
|
||||
# ou
|
||||
$ rg 'eval' -tsh ~/
|
||||
/Users/bruno/.bash_profile
|
||||
72:eval "$(thefuck --alias)"
|
||||
/Users/bruno/.zprofile
|
||||
1:eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
...
|
||||
|
||||
# Recherche partout sauf dans les fichiers shell .bashrc, .zshrc...
|
||||
|
||||
$ rg 'eval' --type-not sh ~/
|
||||
# ou
|
||||
$ rg 'eval' -Tsh ~/
|
||||
```
|
||||
|
||||
##### Remplacement:
|
||||
|
||||
```bash
|
||||
# recherche / remplacement mot pour mot
|
||||
$ rg fast README.md --replace FAST
|
||||
$ rg fast README.md -r FAST
|
||||
|
||||
# remplacer toute une ligne
|
||||
$ rg '^.*fast.*$' README.md -r FAST
|
||||
```
|
||||
|
||||
##### Fichier de configuration:
|
||||
|
||||
```bash
|
||||
$ cat $HOME/.ripgreprc
|
||||
```
|
||||
|
||||
|
||||
|
||||
### zoxide (z-zi)(j-ji)
|
||||
|
||||
alternative à *z plugin*
|
||||
|
||||
https://github.com/ajeetdsouza/zoxide
|
||||
|
||||
##### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install zoxide
|
||||
```
|
||||
|
||||
##### Ajout au shell:
|
||||
|
||||
```bash
|
||||
# zsh
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
# bash
|
||||
eval "$(zoxide init bash)"
|
||||
```
|
||||
|
||||
##### Installer fzf:
|
||||
|
||||
```bash
|
||||
$ brew install fzf
|
||||
# To install useful key bindings and fuzzy completion:
|
||||
$(brew --prefix)/opt/fzf/install
|
||||
```
|
||||
|
||||
##### Configuration:
|
||||
|
||||
```bash
|
||||
# changer les alias prédéfinis (j au lieu de z):
|
||||
eval "$(zoxide init --cmd j zsh)"
|
||||
|
||||
```
|
||||
|
||||
##### Utilisation:
|
||||
|
||||
```bash
|
||||
z foo # cd into highest ranked directory matching foo
|
||||
z foo bar # cd into highest ranked directory matching foo and bar
|
||||
|
||||
z ~/foo # z also works like a regular cd command
|
||||
z foo/ # cd into relative path
|
||||
z .. # cd one level up
|
||||
z - # cd into previous directory
|
||||
|
||||
zi foo # cd with interactive selection (using fzf)
|
||||
```
|
||||
|
||||
|
||||
@@ -186,6 +186,27 @@ tiger
|
||||
snowleopard
|
||||
```
|
||||
|
||||
Trim toute la colonne:
|
||||
|
||||
```bash
|
||||
$ awk '{$1=$1;print}'
|
||||
```
|
||||
|
||||
Supprimer la 1ere colonne:
|
||||
|
||||
```bash
|
||||
$ awk '{$1=""; print $0}'
|
||||
|
||||
# les 3 premières colonnes
|
||||
$ awk '{$1=$2=$3=""; print $0}'
|
||||
```
|
||||
|
||||
Supprimer la dernière colonne:
|
||||
|
||||
```bash
|
||||
$ awk -F"/" 'BEGIN{OFS=FS} {NF--; print}'
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Lignes:
|
||||
@@ -195,6 +216,8 @@ Afficher la 3eme ligne:
|
||||
```bash
|
||||
$ awk 'NR==3' test.txt
|
||||
mint
|
||||
|
||||
$ awk 'FNR == 3 {print}'
|
||||
```
|
||||
|
||||
Afficher les ligne 2 à 4:
|
||||
@@ -206,6 +229,30 @@ mint
|
||||
debian
|
||||
```
|
||||
|
||||
Afficher 4e colonne de la 2e ligne:
|
||||
|
||||
```bash
|
||||
$ awk 'NR==2{print $4}'
|
||||
```
|
||||
|
||||
Supprimer les lignes vides:
|
||||
|
||||
```bash
|
||||
$ awk NF
|
||||
```
|
||||
|
||||
Nombre de lignes:
|
||||
|
||||
```bash
|
||||
$ awk 'END { print NR }' test.txt
|
||||
```
|
||||
|
||||
Supprimer tout après la 1ere ligne vide:
|
||||
|
||||
```bash
|
||||
$ awk '/^$/{exit} 1'
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Divers:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# bat
|
||||
|
||||
Remplaçant de cat
|
||||
Remplaçant de *cat*
|
||||
|
||||
https://github.com/sharkdp/bat
|
||||
|
||||
|
||||
@@ -95,6 +95,25 @@ gd.jpeg_ignore_warning = 1 | session.cookie_samesite =
|
||||
|
||||
|
||||
|
||||
##### Comparer un fichier local et un fichier distant:
|
||||
|
||||
```bash
|
||||
$ ssh bruno@212.227.191.167 "cat upgrade_nextcloud.sh" | diff - /Users/bruno/Documents/Scripts/bash/upgrade_nextcloud.sh | colordiff
|
||||
35c35
|
||||
< php_version=7.4
|
||||
---
|
||||
> php_version=8.0
|
||||
|
||||
```
|
||||
|
||||
##### Comparer 2 fichiers distants sur 2 serveurs différents:
|
||||
|
||||
```bash
|
||||
$ diff <(ssh user@remote-host1 'cat /path/to/file1') <(ssh user@remote-host2 'cat /path/to/file2')
|
||||
```
|
||||
|
||||
|
||||
|
||||
Colordiff peut comparer 2 dossiers:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -482,3 +482,8 @@ echo "Input is a string."
|
||||
fi
|
||||
```
|
||||
|
||||
```bash
|
||||
# entier
|
||||
if [ -z "${i//[0-9]}" ]; then
|
||||
```
|
||||
|
||||
|
||||
10
docs/Linux/cut.md
Normal file
10
docs/Linux/cut.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# cut
|
||||
|
||||
|
||||
|
||||
- séparateur par défaut: TAB
|
||||
|
||||
- sinon option -d ' '
|
||||
|
||||
|
||||
|
||||
@@ -12,3 +12,11 @@
|
||||
|
||||
|
||||
|
||||
#### Origine d'un lien:
|
||||
|
||||
```bash
|
||||
/usr/local/bin
|
||||
❯ readlink -f kymsu2
|
||||
/Users/bruno/Documents/Scripts/kymsu2/kymsu2.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
# exa
|
||||
|
||||
Remplaçant de *ls*
|
||||
|
||||
https://the.exa.website
|
||||
|
||||
Installation:
|
||||
|
||||
```bash
|
||||
$ brew install exa
|
||||
```
|
||||
|
||||
|
||||
|
||||
exa n'est plus maintenant. Il est remplacé par eza.
|
||||
|
||||
# eza
|
||||
|
||||
https://github.com/eza-community/eza
|
||||
|
||||
|
||||
|
||||
**exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale**
|
||||
|
||||
```bash
|
||||
❯ exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale
|
||||
$ exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale
|
||||
inode Permissions Links Size Blocks User Group Date Modified Date Created Date Accessed Git Name
|
||||
3426575 drwxr-xr-x 12 - - bruno staff 2021-08-05 17:33 2021-08-05 09:35 2021-08-05 17:33 -- .git
|
||||
3426645 drwxr-xr-x 3 - - bruno staff 2021-08-05 09:35 2021-08-05 09:35 2021-08-05 17:32 -- img
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
(alternative à [find](find.md)) (macOS / Linux / Windows)
|
||||
|
||||
https://github.com/sharkdp/fd
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ brew install fd
|
||||
```
|
||||
|
||||
@@ -65,6 +65,14 @@ $ find /usr -name toto -type f
|
||||
$ find /usr -name toto -type d
|
||||
```
|
||||
|
||||
Ne pas afficher les fichiers ou dossiers invisibles:
|
||||
|
||||
```bash
|
||||
$find -not -path '*/\.*'
|
||||
|
||||
$find . -type f | grep -v '/\.'
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Taille:
|
||||
|
||||
@@ -27,14 +27,85 @@ Parcourir les arguments passés au script:
|
||||
```bash
|
||||
for i in "$@"
|
||||
do
|
||||
echo "$i"
|
||||
echo "Hi $i"
|
||||
done
|
||||
```
|
||||
|
||||
Parcourrir une liste:
|
||||
|
||||
```bash
|
||||
for i in {1..5}
|
||||
do
|
||||
echo "Hi $i"
|
||||
done
|
||||
|
||||
Hi 1
|
||||
Hi 2
|
||||
Hi 3
|
||||
Hi 4
|
||||
Hi 5
|
||||
```
|
||||
|
||||
```bash
|
||||
# bash 4.0+
|
||||
for i in {0. .8. .2} # debut. .fin. .increment
|
||||
do
|
||||
echo "Hi $i"
|
||||
done
|
||||
|
||||
Hi 0
|
||||
Hi 2
|
||||
Hi 4
|
||||
Hi 6
|
||||
Hi 8
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
for ((i=0 ; 10 - $i ; i++))
|
||||
do echo $i
|
||||
do
|
||||
echo "Hi $i"
|
||||
done
|
||||
```
|
||||
```
|
||||
|
||||
```bash
|
||||
for (( c=1; c<=5; c++ ))
|
||||
do
|
||||
echo "Hi $c"
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Continue
|
||||
|
||||
```bash
|
||||
for i in {1..5}
|
||||
do
|
||||
[[ "$i" == '4' ]] && continue;
|
||||
echo "Hi $i"
|
||||
done
|
||||
|
||||
Hi 1
|
||||
Hi 2
|
||||
Hi 3
|
||||
Hi 5
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Break
|
||||
|
||||
```bash
|
||||
for i in {1..5}
|
||||
do
|
||||
[[ "$i" == '4' ]] && break;
|
||||
echo "Hi $i"
|
||||
done
|
||||
|
||||
Hi 1
|
||||
Hi 2
|
||||
Hi 3
|
||||
```
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ $ cat **
|
||||
|
||||
Puis **Tab**
|
||||
|
||||

|
||||
<img src="/Users/bruno/Documents/docs/docs/Linux/fzf5.png" alt="fzf5" style="zoom:100%;" />
|
||||
|
||||
Puis **Return**
|
||||
|
||||
@@ -173,7 +173,7 @@ $ nano /opt/**
|
||||
|
||||
Puis **Tab**
|
||||
|
||||

|
||||
<img src="/Users/bruno/Documents/docs/docs/Linux/fzf6.png" alt="fzf6" style="zoom:100%;" />
|
||||
|
||||
Puis **Return**
|
||||
|
||||
@@ -220,6 +220,22 @@ https://bluz71.github.io/2018/11/26/fuzzy-finding-in-bash-with-fzf.html
|
||||
|
||||
https://curatedgo.com/r/fzf-is-a-junegunnfzf/index.html
|
||||
|
||||
https://thevaluable.dev/practical-guide-fzf-example/
|
||||
|
||||
https://pragmaticpineapple.com/four-useful-fzf-tricks-for-your-terminal/
|
||||
|
||||
https://reposhub.com/linux/shell-applications/lincheney-fzf-tab-completion.html
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
function activate-venv() {
|
||||
local selected_env
|
||||
selected_env=$(ls ~/.venv/ | fzf)
|
||||
|
||||
if [ -n "$selected_env" ]; then
|
||||
source "$HOME/.venv/$selected_env/bin/activate"
|
||||
fi
|
||||
}
|
||||
```
|
||||
|
||||
###
|
||||
@@ -22,7 +22,7 @@
|
||||
| **-f** file, **--file**=file<br />Lisez un ou plusieurs modèles séparés de saut de ligne du fichier. Les lignes de motif vides correspondent à chaque ligne d'entrée. Les sauts de ligne ne sont pas considérés comme faisant partie d'un modèle. Si le fichier est vide, rien n'est trouvé. | **-f** FILE, **--file**=FILE<br/>Obtenez des modèles à partir de FILE, un par ligne. Si cette option est utilisée plusieurs fois ou est combinée avec l'option **-e** (**--regexp**), recherchez tous les modèles donnés. Le fichier vide ne contient aucun motif et ne correspond donc à rien. |
|
||||
| **-G**, **--basic-regexp**<br />Interpréter le motif comme une expression régulière de base. | **-G**, **--basic-regexp**<br/>Interpréter les MODÈLES comme des expressions régulières de base (BRE, voir ci- dessous). C'est la valeur par défaut. |
|
||||
| **-H**<br />Affchez toujours les en-têtes de nom de fichier avec des lignes de sortie. | **-H**, **--with-filename**<br/>Affchez le nom du fichier pour chaque correspondance. C'est la valeur par défaut lorsqu'il y a plus d'un fichier à rechercher. |
|
||||
| **-h**, **--no-filename**<br/>N'affchez jamais d'en-têtes de nom de fichier (c'est-à-dire des noms de fichier) avec des lignes de sortie. | **-h**, **--no-filename**<br/>Supprimez le préfixe des noms de fichiers sur la sortie. C'est la valeur par défaut lorsqu'il n'y a qu'un seul fichier (ou une seule entrée standard) à rechercher. |
|
||||
| **-h**, **--no-filename**<br/>N'affichez jamais d'en-têtes de nom de fichier (c'est-à-dire des noms de fichier) avec des lignes de sortie. | **-h**, **--no-filename**<br/>Supprimez le préfixe des noms de fichiers sur la sortie. C'est la valeur par défaut lorsqu'il n'y a qu'un seul fichier (ou une seule entrée standard) à rechercher. |
|
||||
| **--help**<br />Imprimez un bref message d'aide. | **--help**<br />Affchez un message d'utilisation et quittez. |
|
||||
| **-I**<br />Ignorez les fichiers binaires. Cette option est équivalente à l'option **--binary-file=without-match**. | **-I**<br />Traiter un fichier binaire comme s'il ne contenait pas de données correspondantes ; c'est équivalent à l'option **--binary-files=without-match**. |
|
||||
| **--include**<br />Si spécifié, seuls les fichiers correspondant au modèle de nom de fichier donné sont recherchés. Notez que les modèles **--exclude** ont priorité sur **-- include** patterns. Les motifs correspondent au chemin d'accès complet spécifié, pas seulement au composant nom de fichier. | **--include**=GLOB<br/>Recherchez uniquement les fichiers dont le nom de base correspond à GLOB (en utilisant la correspondance de caractères génériques comme décrit sous **-- exclude**).<br/> Si des options contradictoires **--include** et **--exclude** sont données, la dernière correspondante gagne.<br/> Si aucune option **--include** ou **--exclude ne** correspond, un fichier est inclus à moins que la première de ces options ne soit **--include**. |
|
||||
|
||||
@@ -121,6 +121,12 @@ Lignes commençant par les caractères compris entre a et d:
|
||||
grep ^[a-d] fichier.txt
|
||||
```
|
||||
|
||||
Lignes ne commençant pas # ou ;
|
||||
|
||||
```bash
|
||||
grep "^[^#;]" smb.conf
|
||||
```
|
||||
|
||||
|
||||
|
||||
Rechercher plusieurs chaines:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Linux
|
||||
|
||||
[Authentification automatique par SSH sans mot de passe](../macos/ssh/ssh-passwordless.md)
|
||||
[Authentification automatique par SSH sans mot de passe](../macOS/ssh/ssh-passwordless.md)
|
||||
|
||||
[Archiver / compresser](archiver.md)
|
||||
|
||||
|
||||
78
docs/Linux/links.md
Normal file
78
docs/Linux/links.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Links
|
||||
|
||||
|
||||
|
||||
### soft link (symbolic link):
|
||||
|
||||
- ln -s
|
||||
- contient le chemin du fichier original
|
||||
- link des répertoires
|
||||
|
||||
```bash
|
||||
~ mkdir link
|
||||
|
||||
~ touch link/hello.txt
|
||||
|
||||
~ ln -s link/hello.txt
|
||||
|
||||
~ ls
|
||||
hello.txt link
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Créer un lien symbolic
|
||||
|
||||
```bash
|
||||
~ ln -s link/hello.txt hello_you.txt
|
||||
|
||||
~❯ ls
|
||||
hello.txt link hello_you.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
### hard link:
|
||||
|
||||
- ln
|
||||
- contient le contenu du fichier original (le hardlink et le fichier original partagent le même inode)
|
||||
- ne link pas des répertoires
|
||||
|
||||
|
||||
|
||||
#### Inode number
|
||||
|
||||
```bash
|
||||
~ touch file_1 file_2
|
||||
|
||||
~ ls -i
|
||||
43767553 file_1 43767554 file_2
|
||||
```
|
||||
|
||||
```bash
|
||||
~ ls -l
|
||||
-rw-r--r-- 1 bruno staff 0 mai 6 18:29 file_1
|
||||
-rw-r--r-- 1 bruno staff 0 mai 6 18:29 file_2
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Créer un hard-link
|
||||
|
||||
```bash
|
||||
~ ln file_1 hard_ln
|
||||
```
|
||||
|
||||
```bash
|
||||
~ ls -li
|
||||
43767553 -rw-r--r-- 2 bruno staff 0 mai 6 18:29 file_1
|
||||
43767554 -rw-r--r-- 1 bruno staff 0 mai 6 18:29 file_2
|
||||
43767553 -rw-r--r-- 2 bruno staff 0 mai 6 18:29 hard_ln
|
||||
43768356 lrwxr-xr-x 1 bruno staff 14 mai 6 18:46 hello.txt -> link/hello.txt
|
||||
43768828 lrwxr-xr-x 1 bruno staff 14 mai 6 18:50 hello_you.txt -> link/hello.txt
|
||||
43768326 drwxr-xr-x 3 bruno staff 96 mai 6 18:46 link
|
||||
```
|
||||
|
||||
file_1 et hard_ln ont le même inode.
|
||||
|
||||
Si on supprime `file_1`, `hard_ln` conserve le même contenu.
|
||||
234
docs/Linux/locale.md
Normal file
234
docs/Linux/locale.md
Normal file
@@ -0,0 +1,234 @@
|
||||
# locale
|
||||
|
||||
|
||||
|
||||
Connaitre la locale:
|
||||
|
||||
```bash
|
||||
$ locale
|
||||
LANG="fr_FR.UTF-8"
|
||||
LC_COLLATE="fr_FR.UTF-8"
|
||||
LC_CTYPE="fr_FR.UTF-8"
|
||||
LC_MESSAGES="fr_FR.UTF-8"
|
||||
LC_MONETARY="fr_FR.UTF-8"
|
||||
LC_NUMERIC="fr_FR.UTF-8"
|
||||
LC_TIME="fr_FR.UTF-8"
|
||||
LC_ALL=
|
||||
```
|
||||
|
||||
Connaitre toutes les locales:
|
||||
|
||||
```bash
|
||||
$ locale -a
|
||||
en_NZ
|
||||
nl_NL.UTF-8
|
||||
pt_BR.UTF-8
|
||||
fr_CH.ISO8859-15
|
||||
eu_ES.ISO8859-15
|
||||
en_US.US-ASCII
|
||||
af_ZA
|
||||
bg_BG
|
||||
cs_CZ.UTF-8
|
||||
fi_FI
|
||||
zh_CN.UTF-8
|
||||
eu_ES
|
||||
sk_SK.ISO8859-2
|
||||
nl_BE
|
||||
fr_BE
|
||||
sk_SK
|
||||
en_US.UTF-8
|
||||
en_NZ.ISO8859-1
|
||||
de_CH
|
||||
sk_SK.UTF-8
|
||||
de_DE.UTF-8
|
||||
am_ET.UTF-8
|
||||
zh_HK
|
||||
be_BY.UTF-8
|
||||
uk_UA
|
||||
pt_PT.ISO8859-1
|
||||
en_AU.US-ASCII
|
||||
kk_KZ.PT154
|
||||
en_US
|
||||
nl_BE.ISO8859-15
|
||||
de_AT.ISO8859-1
|
||||
hr_HR.ISO8859-2
|
||||
fr_FR.ISO8859-1
|
||||
af_ZA.UTF-8
|
||||
am_ET
|
||||
fi_FI.ISO8859-1
|
||||
ro_RO.UTF-8
|
||||
af_ZA.ISO8859-15
|
||||
en_NZ.UTF-8
|
||||
fi_FI.UTF-8
|
||||
hr_HR.UTF-8
|
||||
da_DK.UTF-8
|
||||
ca_ES.ISO8859-1
|
||||
en_AU.ISO8859-15
|
||||
ro_RO.ISO8859-2
|
||||
de_AT.UTF-8
|
||||
pt_PT.ISO8859-15
|
||||
sv_SE
|
||||
fr_CA.ISO8859-1
|
||||
fr_BE.ISO8859-1
|
||||
en_US.ISO8859-15
|
||||
it_CH.ISO8859-1
|
||||
en_NZ.ISO8859-15
|
||||
en_AU.UTF-8
|
||||
de_AT.ISO8859-15
|
||||
af_ZA.ISO8859-1
|
||||
hu_HU.UTF-8
|
||||
et_EE.UTF-8
|
||||
he_IL.UTF-8
|
||||
uk_UA.KOI8-U
|
||||
be_BY
|
||||
kk_KZ
|
||||
hu_HU.ISO8859-2
|
||||
it_CH
|
||||
pt_BR
|
||||
ko_KR
|
||||
it_IT
|
||||
fr_BE.UTF-8
|
||||
ru_RU.ISO8859-5
|
||||
zh_TW
|
||||
zh_CN.GB2312
|
||||
no_NO.ISO8859-15
|
||||
de_DE.ISO8859-15
|
||||
en_CA
|
||||
fr_CH.UTF-8
|
||||
sl_SI.UTF-8
|
||||
uk_UA.ISO8859-5
|
||||
pt_PT
|
||||
hr_HR
|
||||
cs_CZ
|
||||
fr_CH
|
||||
he_IL
|
||||
zh_CN.GBK
|
||||
zh_CN.GB18030
|
||||
fr_CA
|
||||
pl_PL.UTF-8
|
||||
ja_JP.SJIS
|
||||
sr_YU.ISO8859-5
|
||||
be_BY.CP1251
|
||||
sr_YU.ISO8859-2
|
||||
sv_SE.UTF-8
|
||||
sr_YU.UTF-8
|
||||
de_CH.UTF-8
|
||||
sl_SI
|
||||
pt_PT.UTF-8
|
||||
ro_RO
|
||||
en_NZ.US-ASCII
|
||||
ja_JP
|
||||
zh_CN
|
||||
fr_CH.ISO8859-1
|
||||
ko_KR.eucKR
|
||||
be_BY.ISO8859-5
|
||||
nl_NL.ISO8859-15
|
||||
en_GB.ISO8859-1
|
||||
en_CA.US-ASCII
|
||||
is_IS.ISO8859-1
|
||||
ru_RU.CP866
|
||||
nl_NL
|
||||
fr_CA.ISO8859-15
|
||||
sv_SE.ISO8859-15
|
||||
hy_AM
|
||||
en_CA.ISO8859-15
|
||||
en_US.ISO8859-1
|
||||
zh_TW.Big5
|
||||
ca_ES.UTF-8
|
||||
ru_RU.CP1251
|
||||
en_GB.UTF-8
|
||||
en_GB.US-ASCII
|
||||
ru_RU.UTF-8
|
||||
eu_ES.UTF-8
|
||||
es_ES.ISO8859-1
|
||||
hu_HU
|
||||
el_GR.ISO8859-7
|
||||
en_AU
|
||||
it_CH.UTF-8
|
||||
en_GB
|
||||
sl_SI.ISO8859-2
|
||||
ru_RU.KOI8-R
|
||||
nl_BE.UTF-8
|
||||
et_EE
|
||||
fr_FR.ISO8859-15
|
||||
cs_CZ.ISO8859-2
|
||||
lt_LT.UTF-8
|
||||
pl_PL.ISO8859-2
|
||||
fr_BE.ISO8859-15
|
||||
is_IS.UTF-8
|
||||
tr_TR.ISO8859-9
|
||||
da_DK.ISO8859-1
|
||||
lt_LT.ISO8859-4
|
||||
lt_LT.ISO8859-13
|
||||
zh_TW.UTF-8
|
||||
bg_BG.CP1251
|
||||
el_GR.UTF-8
|
||||
be_BY.CP1131
|
||||
da_DK.ISO8859-15
|
||||
is_IS.ISO8859-15
|
||||
no_NO.ISO8859-1
|
||||
nl_NL.ISO8859-1
|
||||
nl_BE.ISO8859-1
|
||||
sv_SE.ISO8859-1
|
||||
pt_BR.ISO8859-1
|
||||
zh_CN.eucCN
|
||||
it_IT.UTF-8
|
||||
en_CA.UTF-8
|
||||
uk_UA.UTF-8
|
||||
de_CH.ISO8859-15
|
||||
de_DE.ISO8859-1
|
||||
ca_ES
|
||||
sr_YU
|
||||
hy_AM.ARMSCII-8
|
||||
ru_RU
|
||||
zh_HK.UTF-8
|
||||
eu_ES.ISO8859-1
|
||||
is_IS
|
||||
bg_BG.UTF-8
|
||||
ja_JP.UTF-8
|
||||
it_CH.ISO8859-15
|
||||
fr_FR.UTF-8
|
||||
ko_KR.UTF-8
|
||||
et_EE.ISO8859-15
|
||||
kk_KZ.UTF-8
|
||||
ca_ES.ISO8859-15
|
||||
en_IE.UTF-8
|
||||
es_ES
|
||||
de_CH.ISO8859-1
|
||||
en_CA.ISO8859-1
|
||||
es_ES.ISO8859-15
|
||||
en_AU.ISO8859-1
|
||||
el_GR
|
||||
da_DK
|
||||
no_NO
|
||||
it_IT.ISO8859-1
|
||||
en_IE
|
||||
zh_HK.Big5HKSCS
|
||||
hi_IN.ISCII-DEV
|
||||
ja_JP.eucJP
|
||||
it_IT.ISO8859-15
|
||||
pl_PL
|
||||
ko_KR.CP949
|
||||
fr_CA.UTF-8
|
||||
fi_FI.ISO8859-15
|
||||
en_GB.ISO8859-15
|
||||
fr_FR
|
||||
hy_AM.UTF-8
|
||||
no_NO.UTF-8
|
||||
es_ES.UTF-8
|
||||
de_AT
|
||||
tr_TR.UTF-8
|
||||
de_DE
|
||||
lt_LT
|
||||
tr_TR
|
||||
C
|
||||
POSIX
|
||||
```
|
||||
|
||||
Liste de tous les mots-clés et catégories:
|
||||
|
||||
```bash
|
||||
$ locale -ck LC_ALL
|
||||
|
||||
```
|
||||
|
||||
126
docs/Linux/ripgrep.md
Normal file
126
docs/Linux/ripgrep.md
Normal file
@@ -0,0 +1,126 @@
|
||||
# ripgrep (rg)
|
||||
|
||||
Remplaçant de *grep*
|
||||
|
||||
https://github.com/BurntSushi/ripgrep
|
||||
|
||||
|
||||
|
||||
##### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install ripgrep
|
||||
```
|
||||
|
||||
##### Utilisation:
|
||||
|
||||
```bash
|
||||
$ rg PATH ~/.zshrc
|
||||
```
|
||||
|
||||
<img src="/Users/bruno/Documents/docs/docs/Linux/rg.png" alt="rg" style="zoom:50%;" />
|
||||
|
||||
```bash
|
||||
# regex ('core' plus 1 ou plusiers lettres)
|
||||
$ rg 'core\w+' ~/.zshrc
|
||||
22:PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH
|
||||
25:coreutils=false
|
||||
|
||||
# regex ('core' plus 0 ou plusiers lettres)
|
||||
$ rg 'core\w*' ~/.zshrc
|
||||
22:PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH
|
||||
25:coreutils=false
|
||||
|
||||
# string
|
||||
$ rg -F 'eval "$(' ~/.zshrc
|
||||
83:eval "$(zoxide init --cmd j zsh)"
|
||||
107:eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
|
||||
```
|
||||
|
||||
[https://docs.rs/regex/*/regex/#syntax](https://docs.rs/regex/*/regex/#syntax)
|
||||
|
||||
rg dans tout un répertoire:
|
||||
|
||||
```bash
|
||||
$ rg '#!'
|
||||
handbrake-batchconvert.sh
|
||||
1:#!/bin/sh
|
||||
|
||||
composer.sh
|
||||
1:#!/bin/bash
|
||||
|
||||
tmutil.sh
|
||||
1:#!/bin/bash
|
||||
```
|
||||
|
||||
```bash
|
||||
$ rg '#!' Scripts
|
||||
Scripts/kymsu2/kymsu2.sh
|
||||
1:#!/usr/bin/env bash
|
||||
|
||||
Scripts/sonos/test.sh
|
||||
1:#!/usr/bin/env bash
|
||||
```
|
||||
|
||||
En l'absence de chemin, rg cherche dans le répertoire courant.
|
||||
|
||||
##### Filtre manuel:
|
||||
|
||||
```bash
|
||||
# Rechercher uniquement dans les fichiers .sh
|
||||
rg echo -g '*.sh'
|
||||
|
||||
# Rechercher partout sauf dans les fichiers .sh
|
||||
rg echo -g '!*.sh'
|
||||
```
|
||||
|
||||
##### File types
|
||||
|
||||
```bash
|
||||
$ rg --type-list
|
||||
...
|
||||
config: *.cfg, *.conf, *.config, *.ini
|
||||
md: *.markdown, *.md, *.mdown, *.mkdn
|
||||
php: *.php, *.php3, *.php4, *.php5, *.phtml
|
||||
sh: *.bash, *.bashrc, *.csh, *.cshrc, *.ksh, *.kshrc, *.sh, *.tcsh, *.zsh, .bash_login, .bash_logout, .bash_profile, .bashrc, .cshrc, .kshrc, .login, .logout, .profile, .tcshrc, .zlogin, .zlogout, .zprofile, .zshenv, .zshrc, bash_login, bash_logout, bash_profile, bashrc, profile, zlogin, zlogout, zprofile, zshenv, zshrc
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# Recherche dans les fichiers shell .bashrc, .zshrc...
|
||||
|
||||
$ rg 'eval' --type sh ~/
|
||||
# ou
|
||||
$ rg 'eval' -tsh ~/
|
||||
/Users/bruno/.bash_profile
|
||||
72:eval "$(thefuck --alias)"
|
||||
/Users/bruno/.zprofile
|
||||
1:eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
...
|
||||
|
||||
# Recherche partout sauf dans les fichiers shell .bashrc, .zshrc...
|
||||
|
||||
$ rg 'eval' --type-not sh ~/
|
||||
# ou
|
||||
$ rg 'eval' -Tsh ~/
|
||||
```
|
||||
|
||||
##### Remplacement:
|
||||
|
||||
```bash
|
||||
# recherche / remplacement mot pour mot
|
||||
$ rg fast README.md --replace FAST
|
||||
$ rg fast README.md -r FAST
|
||||
|
||||
# remplacer toute une ligne
|
||||
$ rg '^.*fast.*$' README.md -r FAST
|
||||
```
|
||||
|
||||
##### Fichier de configuration:
|
||||
|
||||
```bash
|
||||
$ cat $HOME/.ripgreprc
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ Copie d'un répertoire, avec éventuellement ses sous-répertoires, vers un rép
|
||||
~ scp -r /home/mickael/data/ root@192.168.10.131:/var/www/
|
||||
```
|
||||
|
||||
Si pas port 22
|
||||
Si pas port 22:
|
||||
|
||||
```bash
|
||||
~ scp -r -P 7256 /home/mickael/data/ root@192.168.10.131:/var/www/
|
||||
@@ -46,6 +46,13 @@ bruno@clicclac.synology.me's password:
|
||||
IPTV.bundle-master.zip 100% 673KB 84.0KB/s 00:08
|
||||
```
|
||||
|
||||
SCP to synology NAS:
|
||||
|
||||
```bash
|
||||
# option -O
|
||||
scp -v -O -P 7256 -r $HOME//Documents/Scripts/bash/template.txt bruno@clicclac.synology.me:/volume1/web/photos/img/
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Serveur -> Client
|
||||
|
||||
@@ -328,6 +328,14 @@ debian
|
||||
raspbian
|
||||
```
|
||||
|
||||
Afficher les <u>n emes lignes</u>:
|
||||
|
||||
```bash
|
||||
# affiche les lignes 3..6..9..
|
||||
# GNU sed
|
||||
$ sed -n '0~3p' test.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Supression de caractères:
|
||||
@@ -405,7 +413,7 @@ debian
|
||||
raspbian
|
||||
```
|
||||
|
||||
Supprimer le dernier caractère de chaque ligne, mais seulement celui spécifié (ici le 'u'):
|
||||
Supprimer le dernier caractère de chaque ligne, mais seulement celui spécifié (ici le 'n'):
|
||||
|
||||
```bash
|
||||
$ sed 's/n$//' test.txt
|
||||
@@ -668,6 +676,100 @@ rAspbiAn
|
||||
|
||||
|
||||
|
||||
#### Ajout de caractères:
|
||||
|
||||
Ajouter un (ou plusieurs) caractère (#) en début de ligne:
|
||||
|
||||
```bash
|
||||
$ sed 's/^/#/' test.txt
|
||||
#red hat
|
||||
#ubuntu
|
||||
#mint
|
||||
#debian
|
||||
#raspbian
|
||||
|
||||
$ sed 's/^/#Prefixe: &/' test.txt
|
||||
#Prefixe: red hat
|
||||
#Prefixe: ubuntu
|
||||
#Prefixe: mint
|
||||
#Prefixe: debian
|
||||
#Prefixe: raspbian
|
||||
|
||||
# Pour modifier le fichiet
|
||||
$ sed -i 's/^/#/' file.txt
|
||||
```
|
||||
|
||||
Ajouter un (ou plusieurs) caractère (#) en fin de ligne:
|
||||
|
||||
```bash
|
||||
$ sed 's/$/#/' test.txt
|
||||
red hat#
|
||||
ubuntu#
|
||||
mint#
|
||||
debian#
|
||||
raspbian#
|
||||
|
||||
$ sed 's/$/ _suffixe/' test.txt
|
||||
red hat _suffixe
|
||||
ubuntu _suffixe
|
||||
mint _suffixe
|
||||
debian _suffixe
|
||||
raspbian _suffixe
|
||||
|
||||
# Pour modifier le fichiet
|
||||
$ sed -i 's/$/#/' file.txt
|
||||
```
|
||||
|
||||
Ajouter un (ou plusieurs) caractère (#) en début d'une ligne précise:
|
||||
|
||||
```bash
|
||||
$ sed 2's/^/#Prefixe: &/' test.txt
|
||||
red hat
|
||||
#Prefixe: ubuntu
|
||||
mint
|
||||
debian
|
||||
raspbian
|
||||
```
|
||||
|
||||
Si on ne connait pas le numéro de ligne:
|
||||
|
||||
```bash
|
||||
$ sed 's/ubuntu/Prefixe: &/' test.txt
|
||||
red hat
|
||||
Prefixe: ubuntu
|
||||
mint
|
||||
debian
|
||||
raspbian
|
||||
|
||||
# ou trouver le numero:
|
||||
$ grep -n "ubuntu" test.txt | cut -d: -f -1
|
||||
2
|
||||
```
|
||||
|
||||
Ajouter un (ou plusieurs) caractère (#) en fin d'une ligne précise:
|
||||
|
||||
```bash
|
||||
$ sed 3's/$/ _suffixe &/' test.txt
|
||||
red hat
|
||||
ubuntu
|
||||
mint _suffixe
|
||||
debian
|
||||
raspbian
|
||||
```
|
||||
|
||||
Ajouter un (ou plusieurs) caractère en début ET en fin d'une ligne précise:
|
||||
|
||||
```bash
|
||||
$ sed 2's/.*/#Prefixe: & _suffixe/' test.txt
|
||||
red hat
|
||||
#Prefixe: ubuntu _suffixe
|
||||
mint
|
||||
debian
|
||||
raspbian
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Ajouter une ligne (à voir pour macOS):
|
||||
|
||||
Ajouter une ligne d'entête:
|
||||
|
||||
@@ -64,12 +64,21 @@ MemTotal: 1963472 kB
|
||||
#### Exécuter un script distant sur un serveur distant:
|
||||
|
||||
```bash
|
||||
bruno@SilverBook:~$ ssh -p34987 bruno@xxxxxxx.synology.me ./test.sh
|
||||
$ ssh -p34987 bruno@xxxxxxx.synology.me ./test.sh
|
||||
bruno@clicclac.synology.me's password:
|
||||
09:55:03 up 2 days, 21:49, 0 users, load average: 1.14, 1.25, 1.23
|
||||
DS916
|
||||
```
|
||||
|
||||
Si le script nécessite un sudo:
|
||||
|
||||
```bash
|
||||
$ ssh -t bruno@maboiteverte.fr ./purge_server.sh
|
||||
|
||||
# sinon erreur:
|
||||
# sudo: no tty present and no askpass program specified
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Exécuter un script local sur un serveur distant:
|
||||
|
||||
@@ -28,6 +28,14 @@ $ tail -n 15 /var/log/messages
|
||||
$ tail -f /var/log/messages
|
||||
```
|
||||
|
||||
Supprimer la 1ere ligne
|
||||
|
||||
```bash
|
||||
$ tail -n+2
|
||||
|
||||
$ awk NR\>1
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Head
|
||||
@@ -40,6 +48,14 @@ $ head -n5 /var/log/messages
|
||||
$ head -n 5 /var/log/messages
|
||||
```
|
||||
|
||||
Supprime la dernière ligne
|
||||
|
||||
```bash
|
||||
$ head -n -1
|
||||
|
||||
$ awk 'NR>1{print p}{p=$0}'
|
||||
```
|
||||
|
||||
|
||||
|
||||
### MultiTail
|
||||
|
||||
52
docs/Linux/zoxide.md
Normal file
52
docs/Linux/zoxide.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# zoxide (z-zi)(j-ji)
|
||||
|
||||
https://github.com/ajeetdsouza/zoxide
|
||||
|
||||
|
||||
|
||||
##### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install zoxide
|
||||
```
|
||||
|
||||
##### Ajout au shell:
|
||||
|
||||
```bash
|
||||
# zsh
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
# bash
|
||||
eval "$(zoxide init bash)"
|
||||
```
|
||||
|
||||
##### Installer fzf:
|
||||
|
||||
```bash
|
||||
$ brew install fzf
|
||||
# To install useful key bindings and fuzzy completion:
|
||||
$(brew --prefix)/opt/fzf/install
|
||||
```
|
||||
|
||||
##### Configuration:
|
||||
|
||||
```bash
|
||||
# changer les alias prédéfinis (j au lieu de z):
|
||||
eval "$(zoxide init --cmd j zsh)"
|
||||
|
||||
```
|
||||
|
||||
##### Utilisation:
|
||||
|
||||
```bash
|
||||
z foo # cd into highest ranked directory matching foo
|
||||
z foo bar # cd into highest ranked directory matching foo and bar
|
||||
|
||||
z ~/foo # z also works like a regular cd command
|
||||
z foo/ # cd into relative path
|
||||
z .. # cd one level up
|
||||
z - # cd into previous directory
|
||||
|
||||
zi foo # cd with interactive selection (using fzf)
|
||||
```
|
||||
|
||||
@@ -556,6 +556,12 @@ $ sudo service gitea restart
|
||||
|
||||
|
||||
|
||||
### Gitea Doctor
|
||||
|
||||
https://blog.gitea.io/2022/06/a-gentle-introduction-to-the-gitea-doctor/
|
||||
|
||||
|
||||
|
||||
### Liens
|
||||
|
||||
https://wiki.visionduweb.fr/index.php?title=Installer_un_serveur_Git_avec_Gitea#Copier_les_certificats_SSL_de_Let.27s_Encrypt_vers_le_r.C3.A9pertoire_keys_cr.C3.A9.C3.A9_pour_Gitea
|
||||
|
||||
@@ -110,6 +110,16 @@ service mysql restart || service mariadb restart || service mysqld restart
|
||||
|
||||
|
||||
|
||||
#### Redémarrer PHP:
|
||||
|
||||
```bash
|
||||
# sous root:
|
||||
|
||||
plesk bin php_handler --list | grep -E plesk.*fpm | awk -F" " '{ print $1 }' | while read i; do service $i restart; done
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liste des modules installés:
|
||||
|
||||
```bash
|
||||
@@ -189,10 +199,10 @@ https://support.plesk.com/hc/en-us/articles/115002557954-How-to-remove-Plesk-bac
|
||||
root@localhost:~# df -h /tmp
|
||||
Filesystem Size Used Avail Use% Mounted on
|
||||
/dev/mapper/vg00-lv01 47G 44G 1,2G 98% /
|
||||
|
||||
root@localhost:~# df -h /
|
||||
Filesystem Size Used Avail Use% Mounted on
|
||||
/dev/mapper/vg00-lv01 47G 44G 1,2G 98% /
|
||||
|
||||
```
|
||||
|
||||
Remove backup logfiles:
|
||||
@@ -234,3 +244,77 @@ find / -type f -size +200M -exec du -h {} + 2>/dev/null | sort -r -h
|
||||
251M /var/lib/psa/dumps/domains/sur-le-sentier.fr/backup_user-data_2108080143_2108220143.tgz
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### How to Clear Systemd Journal Logs
|
||||
|
||||
##### Voir les derniers logs:
|
||||
|
||||
```bash
|
||||
$ journalctl -r
|
||||
|
||||
Hint: You are currently not seeing messages from other users and the system.
|
||||
Users in groups 'adm', 'systemd-journal' can see all messages.
|
||||
Pass -q to turn off this notice.
|
||||
-- Logs begin at Tue 2023-08-01 13:45:12 CEST, end at Tue 2023-08-01 14:18:59 CEST. --
|
||||
août 01 14:18:59 localhost sshd[66502]: Disconnected from user bruno 92.184.105.67 port 59557
|
||||
août 01 14:18:59 localhost sshd[66502]: Received disconnect from 92.184.105.67 port 59557:11: cleanup
|
||||
août 01 14:03:57 localhost sshd[66463]: Disconnected from user bruno 92.184.105.67 port 59553
|
||||
|
||||
```
|
||||
|
||||
##### Voir la place occupée par les logs:
|
||||
|
||||
```bash
|
||||
$ journalctl --disk-usage -q
|
||||
Archived and active journals take up 24.0M in the file system.
|
||||
```
|
||||
|
||||
##### Faire tourner les journeaux de logs:
|
||||
|
||||
Le journal courant est archivé, un nouveau est crée
|
||||
|
||||
```bash
|
||||
$ sudo journalctl --rotate
|
||||
```
|
||||
|
||||
##### Supprimer les journaux vieux de plus de 2 jours:
|
||||
|
||||
```bash
|
||||
# 2h(ours), 2m(onths), 2w(eeks)
|
||||
|
||||
$ sudo journalctl --vacuum-time=2d
|
||||
|
||||
Vacuuming done, freed 0B of archived journals from /var/log/journal.
|
||||
Deleted archived journal /var/log/journal/5fd6a638ff89491ab71a5b5150cf1c13/user-10001@74abf00168a74a3884bd8c3fc35ea7c1-0000000002757ece-0005fb79b9881a67.journal (8.0M).
|
||||
Deleted archived journal /var/log/journal/5fd6a638ff89491ab71a5b5150cf1c13/system@72ce45a2f8954e2c92ac122b6c16569e-00000000027580a5-0005fb79e618be9c.journal (96.0M).
|
||||
```
|
||||
|
||||
##### Garder 100Mo de journaux:
|
||||
|
||||
```bash
|
||||
$ sudo journalctl --vacuum-size=100M
|
||||
```
|
||||
|
||||
##### Garder 5 fichiers de journaux:
|
||||
|
||||
```bash
|
||||
$ sudo journalctl --vacuum-files=5
|
||||
```
|
||||
|
||||
##### Nettoyer automatiquement les vieux journaux:
|
||||
|
||||
```bash
|
||||
# Sauvegarder le fichier de config de journald
|
||||
$ cp /etc/systemd/journald.conf /etc/systemd/journald.conf.back
|
||||
|
||||
# Editer le fichier de configuration de journald
|
||||
$ sudo nano /etc/systemd/journald.conf
|
||||
|
||||
# Décommenter la ligne SystemMaxUse
|
||||
SystemMaxUse=250M
|
||||
|
||||
# Redémarrer journald
|
||||
$ sudo systemctl restart systemd-journald
|
||||
```
|
||||
|
||||
|
||||
@@ -6,6 +6,157 @@ https://docs.nextcloud.com/server/18/admin_manual/index.html
|
||||
|
||||
|
||||
|
||||
### Paramètres PHP:
|
||||
|
||||
#### Directives supplémentaires:
|
||||
|
||||
```ini
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=128
|
||||
opcache.save_comments=1
|
||||
opcache.revalidate_freq=1
|
||||
|
||||
[php-fpm-pool-settings]
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
```
|
||||
|
||||
### Paramètres Apache et Nginx:
|
||||
|
||||
#### Directives supplémentaires Apache:
|
||||
|
||||
```ini
|
||||
<LocationMatch "(?i:(?:wp-config\\.bak|\\.wp-config\\.php\\.swp|(?:license|changelog|-config|-sample)\\.(?:php|md|txt|htm|html)))">
|
||||
Require all denied
|
||||
</LocationMatch>
|
||||
```
|
||||
|
||||
#### Directives supplémentaires Nginx:
|
||||
|
||||
```ini
|
||||
# wordpress
|
||||
location ~* "(?:wp-config\.bak|\.wp-config\.php\.swp|(?:license|changelog|-config|-sample)\.(?:php|md|txt|htm|html))" {
|
||||
return 403;
|
||||
}
|
||||
|
||||
# Add headers to serve security related headers
|
||||
# Before enabling Strict-Transport-Security headers please read into this
|
||||
# topic first.
|
||||
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
|
||||
# HTTP response headers borrowed from Nextcloud `.htaccess`
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Make a regex exception for `/.well-known` so that clients can still
|
||||
# access it despite the existence of the regex rule
|
||||
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
|
||||
# for `/.well-known`.
|
||||
|
||||
location ^~ /.well-known {
|
||||
# The rules in this block are an adaptation of the rules
|
||||
# in the Nextcloud `.htaccess` that concern `/.well-known`.
|
||||
|
||||
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
|
||||
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
|
||||
|
||||
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
|
||||
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
|
||||
|
||||
# Let Nextcloud's API for `/.well-known` URIs handle all other
|
||||
# requests by passing them to the front-end controller.
|
||||
return 301 /nextcloud/index.php$request_uri;
|
||||
}
|
||||
|
||||
# Enable gzip but do not remove ETag headers
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
# Pagespeed is not supported by Nextcloud, so if your server is built
|
||||
# with the `ngx_pagespeed` module, uncomment this line to disable it.
|
||||
#pagespeed off;
|
||||
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
||||
deny all;
|
||||
}
|
||||
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
|
||||
try_files $uri/ =404;
|
||||
index index.php;
|
||||
}
|
||||
|
||||
# Adding the cache control header for js, css and map files
|
||||
# Make sure it is BELOW the PHP block
|
||||
# Add headers to serve security related headers (It is intended to
|
||||
# have those duplicated to the ones above)
|
||||
# Before enabling Strict-Transport-Security headers please read into
|
||||
# this topic first.
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
|
||||
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
# Add headers to serve security related headers (It is intended
|
||||
# to have those duplicated to the ones above)
|
||||
# Before enabling Strict-Transport-Security headers please read
|
||||
# into this topic first.
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
#
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Optional: Don't log access to assets
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Réparation
|
||||
|
||||
Se mettre dans le répertoire de Nextcloud:
|
||||
|
||||
```bash
|
||||
@@ -15,7 +166,7 @@ Se mettre dans le répertoire de Nextcloud:
|
||||
Activer le mode maintenance:
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php occ maintenance:mode --on
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php occ maintenance:mode --on
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode enabled
|
||||
```
|
||||
@@ -23,11 +174,11 @@ Maintenance mode enabled
|
||||
Lance une réparation:
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php occ maintenance:repair
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php occ maintenance:repair
|
||||
```
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php updater/updater.phar
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php updater/updater.phar
|
||||
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty
|
||||
|
||||
Current version is 18.0.3.
|
||||
@@ -38,19 +189,19 @@ Nothing to do.
|
||||
```
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php occ upgrade
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php occ upgrade
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Nextcloud is already latest version
|
||||
```
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php occ maintenance:mode --off
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php occ maintenance:mode --off
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode disabled
|
||||
```
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.3/bin/php console.php files:scan --all
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php console.php files:scan --all
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Starting scan for user 1 out of 1 (bruno)
|
||||
+---------+-------+--------------+
|
||||
@@ -62,18 +213,34 @@ Starting scan for user 1 out of 1 (bruno)
|
||||
|
||||
|
||||
|
||||
#### Mise-à-jour de Nextcloud:
|
||||
### Mise-à-jour de Nextcloud:
|
||||
|
||||
```bash
|
||||
~$ ./upgrade_nextcloud.sh
|
||||
```
|
||||
|
||||
Si erreur pendant la m-à-j : PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
|
||||
|
||||
```bash
|
||||
[✔] Downloading
|
||||
[ ] Verify integrity ...PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 189370744 bytes) in phar:///var/www/vhosts/maboiteverte.fr/httpdocs/nextcloud/updater/updater.phar/lib/Updater.php on line 652
|
||||
```
|
||||
|
||||
executer la commande avec `-d memory_limit=-1`en paramètre:
|
||||
|
||||
```bash
|
||||
[bruno@localhost nextcloud]$ sudo -u bruno /opt/plesk/php/8.0/bin/php -d memory_limit=-1 updater/updater.phar
|
||||
Nextcloud Updater - version: v25.0.3-2-gd49ee0d
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Erreurs:
|
||||
|
||||
#### La base de données a quelques index manquants:
|
||||
|
||||
```bash
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/7.4/bin/php occ db:add-missing-indices
|
||||
~/httpdocs/nextcloud$ sudo -u bruno /opt/plesk/php/8.0/bin/php occ db:add-missing-indices
|
||||
```
|
||||
|
||||
|
||||
@@ -112,7 +279,7 @@ https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/loggi
|
||||
Afficher les logs:
|
||||
|
||||
```lo
|
||||
tail -f /var/www/vhosts/maboiteverte.fr/httpdocs/nextcloud/nextcloud.log
|
||||
tail -f /var/www/vhosts/maboiteverte.fr/httpdocs/nextcloud/data/nextcloud.log
|
||||
```
|
||||
|
||||
Configuration:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
|
||||
Installer l'extension Gestionnaire Node.js:
|
||||
#### Installer l'extension Gestionnaire Node.js:
|
||||
|
||||
```bash
|
||||
# plesk ext nodejs --versions
|
||||
@@ -38,18 +38,80 @@ root@localhost:~# ln -s /opt/plesk/node/16/bin/node /usr/bin/node
|
||||
root@localhost:~# ln -s /opt/plesk/node/16/bin/npm /usr/bin/npm
|
||||
```
|
||||
|
||||
Installer thumsup:
|
||||
|
||||
|
||||
#### Installer thumsup (en root):
|
||||
|
||||
```bash
|
||||
[sentier@localhost ~]$ sudo -i
|
||||
|
||||
This server is powered by Plesk.
|
||||
|
||||
Run the 'plesk login' command and log in by browsing either of the links received in the output.
|
||||
Use the 'plesk' command to manage the server. Run 'plesk help' for more info.
|
||||
|
||||
root@localhost:~#
|
||||
```
|
||||
|
||||
```bash
|
||||
root@localhost:~# npm install -g thumbsup
|
||||
|
||||
/opt/plesk/node/16/lib/node_modules/thumbsup'
|
||||
/opt/plesk/node/17/lib/node_modules/thumbsup'
|
||||
|
||||
root@localhost:~# ln -s /opt/plesk/node/16/lib/node_modules/thumbsup/bin/thumbsup.js /usr/bin/thumbsup
|
||||
root@localhost:~# ln -s /opt/plesk/node/17/lib/node_modules/thumbsup/bin/thumbsup.js /usr/bin/thumbsup
|
||||
|
||||
```
|
||||
|
||||
Installer les dépendances:
|
||||
Bug macOS Ventura
|
||||
|
||||
```bash
|
||||
/Users/bruno/.nvm/versions/node/v18.12.0/lib/node_modules/thumbsup/node_modules/macos-release/index.js
|
||||
```
|
||||
|
||||
```js
|
||||
'use strict';
|
||||
const os = require('os');
|
||||
|
||||
const nameMap = new Map([
|
||||
[22, ['Ventura', '13']],
|
||||
[21, ['Monterey', '12']],
|
||||
[20, ['Big Sur', '11']],
|
||||
[19, ['Catalina', '10.15']],
|
||||
[18, ['Mojave', '10.14']],
|
||||
[17, ['High Sierra', '10.13']],
|
||||
[16, ['Sierra', '10.12']],
|
||||
[15, ['El Capitan', '10.11']],
|
||||
[14, ['Yosemite', '10.10']],
|
||||
[13, ['Mavericks', '10.9']],
|
||||
[12, ['Mountain Lion', '10.8']],
|
||||
[11, ['Lion', '10.7']],
|
||||
[10, ['Snow Leopard', '10.6']],
|
||||
[9, ['Leopard', '10.5']],
|
||||
[8, ['Tiger', '10.4']],
|
||||
[7, ['Panther', '10.3']],
|
||||
[6, ['Jaguar', '10.2']],
|
||||
[5, ['Puma', '10.1']]
|
||||
]);
|
||||
|
||||
const macosRelease = release => {
|
||||
release = Number((release || os.release()).split('.')[0]);
|
||||
|
||||
const [name, version] = nameMap.get(release);
|
||||
|
||||
return {
|
||||
name,
|
||||
version
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = macosRelease;
|
||||
// TODO: remove this in the next major version
|
||||
module.exports.default = macosRelease;
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Installer les dépendances:
|
||||
|
||||
```bash
|
||||
# apt install libimage-exiftool-perl
|
||||
|
||||
219
docs/Programmation/Sqlite.md
Normal file
219
docs/Programmation/Sqlite.md
Normal file
@@ -0,0 +1,219 @@
|
||||
|
||||
|
||||
# Sqlite
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_BOTH);`
|
||||
|
||||
Retourne un tableau indexé par les noms de colonnes et aussi par les numéros de colonnes, commençant à l'index 0, comme retournés dans le jeu de résultats
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
[0] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
[0] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
[0] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_ASSOC);`
|
||||
|
||||
Retourne un tableau indexé par le nom de la colonne comme retourné dans le jeu de résultats
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_BOUND);`
|
||||
|
||||
Retourne **`true`** et assigne les valeurs des colonnes de votre jeu de résultats dans les variables PHP à laquelle elles sont liées avec la méthode [PDOStatement::bindColumn()](https://www.php.net/manual/fr/pdostatement.bindcolumn.php)
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => 1
|
||||
[1] => 1
|
||||
[2] => 1
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_CLASS);`
|
||||
|
||||
Retourne une nouvelle instance de la classe demandée, liant les colonnes du jeu de résultats aux noms des propriétés de la classe et en appelant le constructeur par la suite, sauf si `PDO::FETCH_PROPS_LATE` est également donné. Si `fetch_style` inclut PDO::FETCH_CLASS (c'est-à-dire `PDO::FETCH_CLASS | PDO::FETCH_CLASSTYPE`), alors le nom de la classe est déterminé à partir d'une valeur de la première colonne.
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_INTO);`
|
||||
|
||||
Met à jour une instance existante de la classe demandée, liant les colonnes du jeu de résultats aux noms des propriétés de la classe
|
||||
|
||||
```
|
||||
error
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_LAZY);`
|
||||
|
||||
Combine `PDO::FETCH_BOTH` et `PDO::FETCH_OBJ`, créant ainsi les noms des variables de l'objet, comme elles sont accédées
|
||||
|
||||
```
|
||||
Fatal error
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_NAMED);`
|
||||
|
||||
Retourne un tableau de la même forme que `PDO::FETCH_ASSOC`, excepté que s'il y a plusieurs colonnes avec les mêmes noms, la valeur pointée par cette clé sera un tableau de toutes les valeurs de la ligne qui a ce nom comme colonne
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_NUM);`
|
||||
|
||||
Retourne un tableau indexé par le numéro de la colonne comme elle est retourné dans votre jeu de résultat, commençant à 0
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[0] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[0] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[0] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_OBJ);`
|
||||
|
||||
Retourne un objet anonyme avec les noms de propriétés qui correspondent aux noms des colonnes retournés dans le jeu de résultats
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => stdClass Object
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
|
||||
`$result = $stmt->fetchAll(PDO::FETCH_PROPS_LATE);`
|
||||
|
||||
Lorsqu'il est utilisé avec `PDO::FETCH_CLASS`, le constructeur de la classe est appelé avant que les propriétés ne soient assignées à partir des valeurs de colonne respectives.
|
||||
|
||||
```php
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2005.jpg
|
||||
[0] => photos/img/10_2005.jpg
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2006.jpg
|
||||
[0] => photos/img/10_2006.jpg
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[filename] => photos/img/10_2007.jpg
|
||||
[0] => photos/img/10_2007.jpg
|
||||
)
|
||||
```
|
||||
|
||||
@@ -91,6 +91,8 @@ Le serveur est disponible depuis l'extérieur sur: https://clicclac.synology.me:
|
||||
|
||||
On se connecte à https://clicclac.synology.me:22301/login en administrateur avec l'utilisateur **admin@localhost** et le mot-de-passe **admin**, puis on change l'émail et la password. On peut un utilisateur non-admin juste pour la synchro avec les clients Joplin.
|
||||
|
||||
|
||||
|
||||
#### Voir les logs:
|
||||
|
||||
```bash
|
||||
@@ -104,6 +106,45 @@ db_1 | WARNING: no logs are available with the 'db' log driver
|
||||
|
||||
|
||||
|
||||
#### Mise-à-jour:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/docker/joplin $ sudo docker-compose stop
|
||||
[sudo] password for bruno:
|
||||
Stopping joplin_app_1 ... done
|
||||
Stopping joplin_db_1 ... done
|
||||
|
||||
bruno@DS916:/volume1/docker/joplin $ sudo docker-compose pull
|
||||
Pulling db ... done
|
||||
Pulling app ... done
|
||||
|
||||
bruno@DS916:/volume1/docker/joplin $ sudo docker-compose up -d
|
||||
Starting joplin_db_1 ...
|
||||
Starting joplin_db_1 ... done
|
||||
Recreating joplin_app_1 ...
|
||||
Recreating joplin_app_1 ... done
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
COMPOSE_HTTP_TIMEOUT=200 sudo docker-compose up -d
|
||||
```
|
||||
|
||||
ou
|
||||
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
```bash
|
||||
#.env
|
||||
COMPOSE_HTTP_TIMEOUT=200
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Application Joplin
|
||||
|
||||
Préférences :material-arrow-right: Synchronisation:
|
||||
|
||||
@@ -82,7 +82,7 @@ w write support
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: utility.c/ExpandFilenames/971/Configure
|
||||
Command line: /usr/local/bin/identify {-debug} {configure} {-list} {configure}
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "/usr/local/etc/ImageMagick-7/configure.xml"
|
||||
Searching for configure file: "cd/configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
Searching for configure file: "/usr/local/share/ImageMagick-7/configure.xml"
|
||||
2021-07-10T09:22:23+00:00 0:00.001 0.000u 7.0.11 Configure identify[6366]: configure.c/GetConfigureOptions/675/Configure
|
||||
|
||||
@@ -135,7 +135,7 @@ Nextcloud is in maintenance mode - no apps have been loaded
|
||||
#### Ajouter les index manquants à la base de donnée:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ db:add-missing-indices
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php80 occ db:add-missing-indices
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Check indices of the share table.
|
||||
Check indices of the filecache table.
|
||||
@@ -155,7 +155,7 @@ schedulingobjects table updated successfully.
|
||||
#### Quitter le mode maintenance:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:mode --off
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php80 occ maintenance:mode --off
|
||||
Password:
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode disabled
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
|
||||
|
||||
Version d'Apache:
|
||||
|
||||
```bash title="Version"
|
||||
httpd24 -v
|
||||
|
||||
@@ -11,6 +13,8 @@ Server built: Apr 19 2021 14:41:36
|
||||
|
||||
|
||||
|
||||
Logs:
|
||||
|
||||
```bash title="Voir les logs"
|
||||
cd /var/log/httpd/
|
||||
|
||||
@@ -18,3 +22,169 @@ cd /var/log/httpd/
|
||||
bruno@DS916:/var/log/httpd $
|
||||
```
|
||||
|
||||
|
||||
|
||||
Arrêt du serveur Apache:
|
||||
|
||||
```bash
|
||||
$ sudo synosystemctl stop pkg-apache24
|
||||
Password:
|
||||
[pkg-apache24] stopped.
|
||||
```
|
||||
|
||||
Démarrage du serveur Apache:
|
||||
|
||||
```bash
|
||||
$ sudo synosystemctl start pkg-apache24
|
||||
[pkg-apache24] started.
|
||||
```
|
||||
|
||||
Redémarrage du serveur Apache:
|
||||
|
||||
```bash
|
||||
$ sudo synosystemctl restart pkg-apache24
|
||||
[pkg-apache24] restarted.
|
||||
```
|
||||
|
||||
|
||||
|
||||
Modules activés:
|
||||
|
||||
```bash
|
||||
$ httpd24 -M
|
||||
Loaded Modules:
|
||||
core_module (static)
|
||||
so_module (static)
|
||||
http_module (static)
|
||||
mpm_worker_module (static)
|
||||
```
|
||||
|
||||
|
||||
|
||||
Tester la configuration:
|
||||
|
||||
```bash
|
||||
$ httpd24 -t
|
||||
l: httpd24: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
|
||||
AH00316: WARNING: MaxRequestWorkers of 150 is not an integer multiple of ThreadsPerChild of 32, decreasing to nearest multiple 128, for a maximum of 4 servers.
|
||||
Syntax OK
|
||||
```
|
||||
|
||||
|
||||
|
||||
Configuration des VirtualHosts:
|
||||
|
||||
```bash
|
||||
$ httpd24 -S
|
||||
VirtualHost configuration:
|
||||
*:443 127.0.0.1 (/usr/local/etc/apache24/conf/httpd24.conf:99)
|
||||
*:80 127.0.0.1 (/usr/local/etc/apache24/conf/httpd24.conf:99)
|
||||
ServerRoot: "/usr/local/etc/apache24"
|
||||
Main DocumentRoot: "/usr/htdocs"
|
||||
```
|
||||
|
||||
|
||||
|
||||
Configuration:
|
||||
|
||||
```bash
|
||||
$ httpd24 -V
|
||||
Server version: Apache/2.4.51 (Unix)
|
||||
Server built: Jan 5 2022 15:16:28
|
||||
Server's Module Magic Number: 20120211:118
|
||||
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
|
||||
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
|
||||
Architecture: 64-bit
|
||||
Server MPM: worker
|
||||
threaded: yes (fixed thread count)
|
||||
forked: yes (variable process count)
|
||||
Server compiled with....
|
||||
-D BIG_SECURITY_HOLE
|
||||
-D SECURITY_HOLE_PASS_AUTHORIZATION
|
||||
-D APR_HAS_SENDFILE
|
||||
-D APR_HAS_MMAP
|
||||
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
|
||||
-D APR_USE_SYSVSEM_SERIALIZE
|
||||
-D APR_USE_PTHREAD_SERIALIZE
|
||||
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
|
||||
-D APR_HAS_OTHER_CHILD
|
||||
-D AP_HAVE_RELIABLE_PIPED_LOGS
|
||||
-D DYNAMIC_MODULE_LIMIT=256
|
||||
-D HTTPD_ROOT="/usr"
|
||||
-D SUEXEC_BIN="/usr/bin/suexec"
|
||||
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
|
||||
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
|
||||
-D DEFAULT_ERRORLOG="logs/error_log"
|
||||
-D AP_TYPES_CONFIG_FILE="local/etc/apache24/conf/mime.types"
|
||||
-D SERVER_CONFIG_FILE="local/etc/apache24/conf/httpd24.conf"
|
||||
```
|
||||
|
||||
|
||||
|
||||
Aide:
|
||||
|
||||
```bash
|
||||
$ httpd24 -h
|
||||
Usage: httpd24 [-D name] [-d directory] [-f file]
|
||||
[-C "directive"] [-c "directive"]
|
||||
[-k start|restart|graceful|graceful-stop|stop]
|
||||
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
|
||||
Options:
|
||||
-D name : define a name for use in <IfDefine name> directives
|
||||
-d directory : specify an alternate initial ServerRoot
|
||||
-f file : specify an alternate ServerConfigFile
|
||||
-C "directive" : process directive before reading config files
|
||||
-c "directive" : process directive after reading config files
|
||||
-e level : show startup errors of level (see LogLevel)
|
||||
-E file : log startup errors to file
|
||||
-v : show version number
|
||||
-V : show compile settings
|
||||
-h : list available command line options (this page)
|
||||
-l : list compiled in modules
|
||||
-L : list available configuration directives
|
||||
-t -D DUMP_VHOSTS : show parsed vhost settings
|
||||
-t -D DUMP_RUN_CFG : show parsed run settings
|
||||
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
|
||||
-t -D DUMP_MODULES : show all loaded modules
|
||||
-M : a synonym for -t -D DUMP_MODULES
|
||||
-t -D DUMP_INCLUDES: show all included configuration files
|
||||
-t : run syntax check for config files
|
||||
-T : start without DocumentRoot(s) check
|
||||
-X : debug mode (only one worker, do not detach)
|
||||
```
|
||||
|
||||
|
||||
|
||||
Fichiers de configuration:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/etc/apache24 $ l
|
||||
total 24
|
||||
drwxr-xr-x 6 root root 4096 Feb 23 06:30 .
|
||||
drwxr-xr-x 21 root root 4096 May 4 08:17 ..
|
||||
lrwxrwxrwx 1 root root 58 Feb 23 06:30 conf -> /var/packages/Apache2.4/target/usr/local/etc/apache24/conf
|
||||
drwxr-xr-x 2 root root 4096 Dec 10 11:50 conf-available
|
||||
drwxr-xr-x 2 root root 4096 Dec 10 11:50 conf-enabled
|
||||
lrwxrwxrwx 1 root root 58 Feb 23 06:30 logs -> /var/packages/Apache2.4/target/usr/local/etc/apache24/logs
|
||||
lrwxrwxrwx 1 root root 52 Feb 23 06:30 modules -> /var/packages/Apache2.4/target/usr/local/lib/modules
|
||||
lrwxrwxrwx 1 root root 57 Feb 23 06:30 run -> /var/packages/Apache2.4/target/usr/local/etc/apache24/run
|
||||
drwxr-xr-x 2 root root 4096 Jun 30 2021 sites-available
|
||||
drwxr-xr-x 2 root root 4096 Jul 16 2021 sites-enabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
Dossiers des modules:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/etc/apache24/modules $ l
|
||||
total 3284
|
||||
drwxr-xr-x 1 root root 3570 Jan 5 08:21 .
|
||||
drwxr-xr-x 1 root root 14 Jan 5 08:21 ..
|
||||
-rwxr-xr-x 1 root root 10456 Jan 5 08:21 mod_access_compat.so
|
||||
-rwxr-xr-x 1 root root 10456 Jan 5 08:21 mod_actions.so
|
||||
-rwxr-xr-x 1 root root 18744 Jan 5 08:21 mod_alias.so
|
||||
-rwxr-xr-x 1 root root 10392 Jan 5 08:21 mod_allowmethods.so
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
@@ -255,3 +255,24 @@ $ sudo dpkg -i bat_0.18.3_amd64.deb
|
||||
$ sudo dpkg -i --force-bad-verify bat_0.18.3_amd64.deb
|
||||
```
|
||||
|
||||
Désinstaller un paquet debian:
|
||||
|
||||
```bash
|
||||
$ sudo dpkg -r bat
|
||||
```
|
||||
|
||||
Statut d'un paquet:
|
||||
|
||||
```bash
|
||||
$ sudo dpkg -l '*bat*'
|
||||
Desired=Unknown/Install/Remove/Purge/Hold
|
||||
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|
||||
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
|
||||
||/ Name Version Architecture Description
|
||||
+++-==============-============-============-==================================
|
||||
ii bat 0.19.0 amd64 cat(1) clone with wings.
|
||||
un bat-musl <none> <none> (no description available)
|
||||
```
|
||||
|
||||
ii dans la 1ere colonne: correctement installé
|
||||
|
||||
|
||||
@@ -2,16 +2,66 @@
|
||||
|
||||
|
||||
|
||||
Le paquet [gitea-spk](https://github.com/flipswitchingmonkey/gitea-spk) n'a pas été mis à jour pour DSM7. Il faut donc installer Gitea d'après les [binaires](https://docs.gitea.io/en-us/install-from-binary/).
|
||||
Le paquet [gitea-spk](https://github.com/flipswitchingmonkey/gitea-spk) a été mis à jour pour DSM7. Il est dispo chez [SynoCommunity](https://synocommunity.com/package/gitea).
|
||||
|
||||
Sinon, on peut installer Gitea d'après les [binaires](https://docs.gitea.io/en-us/install-from-binary/).
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
### Installation (paquet):
|
||||
|
||||
```bash
|
||||
bruno@DS916:/var/packages/gitea/var $ l
|
||||
total 1672
|
||||
drwxr-xr-x 1 sc-gitea synocommunity 66 May 7 10:46 .
|
||||
drwxr-xr-x 1 root root 648 May 6 16:26 ..
|
||||
-rw------- 1 sc-gitea synocommunity 1790 May 7 10:47 conf.ini
|
||||
drwxr-xr-x 1 sc-gitea synocommunity 150 May 8 17:14 data
|
||||
-rw-r--r-- 1 sc-gitea synocommunity 1701804 May 8 19:23 gitea.log
|
||||
-rw-r--r-- 1 sc-gitea synocommunity 5 May 7 10:47 gitea.pid
|
||||
drwxr-xr-x 1 sc-gitea synocommunity 0 May 7 10:46 log
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
❯ git push -u gitea916 master
|
||||
💡 gp -u gitea916 master
|
||||
Username for 'https://clicclac.synology.me:3000': bruno
|
||||
Password for 'https://bruno@clicclac.synology.me:3000':
|
||||
```
|
||||
|
||||
`git config credential.helper store`
|
||||
|
||||
Aide pour stocker les informations d’identification sur disque (en clair)(seules les permissions du fichiers .git-credentials protègent)
|
||||
https://techexpertise.medium.com/storing-git-credentials-with-git-credential-helper-33d22a6b5ce7
|
||||
|
||||
```bash
|
||||
~ $ bat .git-credentials
|
||||
File: .git-credentials
|
||||
1 https://bruno:%yy%xxxxxxx%yyz@clicclac.synology.me%3a3000
|
||||
```
|
||||
|
||||
Sur macOS, on peut stocker stocker les informations d’identification dans la keychain (encrypté)
|
||||
`git config --global credential.helper osxkeychain`
|
||||
|
||||
|
||||
|
||||
### Installation (binaires):
|
||||
|
||||
Créer un utilisateur `gitea`.
|
||||
|
||||
```bash
|
||||
bruno@DS916:~ $ sudo su - gitea
|
||||
|
||||
gitea@DS916:~$
|
||||
```
|
||||
|
||||
Déclarer le répertoire d'installation dans `.bashrc`:
|
||||
|
||||
```
|
||||
export GITEA_WORK_DIR=/var/services/homes/bruno/gitea
|
||||
export GITEA_WORK_DIR=/var/services/homes/gitea
|
||||
```
|
||||
|
||||
Préparer les répertoires:
|
||||
@@ -19,21 +69,19 @@ Préparer les répertoires:
|
||||
```bash
|
||||
# dossier d'installation
|
||||
mkdir -p $GITEA_WORK_DIR/{custom,data,log}
|
||||
#chown -R git:git $GITEA_WORK_DIR/
|
||||
chown -R bruno:users $GITEA_WORK_DIR/
|
||||
chown -R gitea:users $GITEA_WORK_DIR/
|
||||
chmod -R 750 $GITEA_WORK_DIR/
|
||||
|
||||
# dossier de configuration
|
||||
mkdir /etc/gitea
|
||||
#chown root:git /etc/gitea
|
||||
chown bruno:users /etc/gitea
|
||||
chown gitea:users /etc/gitea
|
||||
chmod 770 /etc/gitea
|
||||
```
|
||||
|
||||
Télécharger Gitea
|
||||
|
||||
```bash
|
||||
wget -O gitea https://dl.gitea.io/gitea/1.15.4/gitea-1.15.4-linux-amd64
|
||||
wget -O gitea https://dl.gitea.io/gitea/1.16.6/gitea-1.16.6-linux-amd64
|
||||
chmod +x gitea
|
||||
mv gitea /usr/local/bin/
|
||||
```
|
||||
@@ -41,11 +89,22 @@ mv gitea /usr/local/bin/
|
||||
Lancer Gitea
|
||||
|
||||
```bash
|
||||
gitea web
|
||||
|
||||
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
gitea@DS916:~$ /usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
```
|
||||
|
||||
Erreur *'bind: address already in use'*:
|
||||
|
||||
```bash
|
||||
$ netstat -tulpn
|
||||
tcp6 0 0 :::3000 :::* LISTEN 9829/gitea
|
||||
|
||||
$ kill 9829
|
||||
|
||||
```
|
||||
|
||||
Configurer gitea:
|
||||
http://192.168.2.7:3000
|
||||
|
||||
|
||||
|
||||
### Configuration:
|
||||
@@ -114,13 +173,13 @@ chmod 640 /etc/gitea/app.ini
|
||||
Les repos sont stockés ici:
|
||||
|
||||
```bash
|
||||
ROOT = /var/services/homes/bruno/gitea/data/gitea-repositories
|
||||
ROOT = /var/services/homes/gitea/data/gitea-repositories
|
||||
```
|
||||
|
||||
et les logs là:
|
||||
|
||||
```bash
|
||||
ROOT_PATH = /var/services/homes/bruno/gitea/log
|
||||
ROOT_PATH = /var/services/homes/gitea/log
|
||||
```
|
||||
|
||||
|
||||
@@ -226,6 +285,11 @@ WantedBy=multi-user.target
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
bruno@DS916:/etc/gitea $ cd /etc/systemd/system
|
||||
-rw-r--r-- 1 root root 2192 Oct 8 2021 gitea.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash title="Activer le service gitea au démarrage"
|
||||
@@ -246,6 +310,17 @@ bruno 8220 0.8 6.2 2038820 122672 ? Ssl 20:26 0:02 /usr/local/bin/
|
||||
bruno 9790 0.0 0.0 2860 184 pts/1 D+ 20:32 0:00 grep gitea
|
||||
```
|
||||
|
||||
```bash
|
||||
gitea@DS916:~ $ systemctl status gitea.service
|
||||
● gitea.service - Gitea (Git with a cup of tea)
|
||||
Loaded: loaded (/etc/systemd/system/gitea.service; enabled; vendor preset: disabled)
|
||||
Active: active (running) since Wed 2022-05-04 19:32:00 CEST; 15h ago
|
||||
Main PID: 16222 (gitea)
|
||||
Memory: 39.2M
|
||||
CGroup: /system.slice/gitea.service
|
||||
└─16222 /usr/local/bin/gitea web --config /etc/gitea/app.ini
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Mise-à-jour
|
||||
@@ -319,3 +394,67 @@ fi
|
||||
exit 1
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Personnaliser:
|
||||
|
||||
https://docs.gitea.io/en-us/customizing-gitea/
|
||||
|
||||
```bash
|
||||
$ gitea embedded list | grep 'login'
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Ajouter un lien dans la barre de navigation:
|
||||
|
||||
```bash
|
||||
# Ajouter un fichier extra_links.tmpl
|
||||
|
||||
$ nano /var/services/homes/gitea/custom/templates/custom/extra_links.tmpl
|
||||
|
||||
<a class="item" href="https://maboiteverte.fr">maboiteverte.fr</a>
|
||||
|
||||
# Redémarrer Gitea
|
||||
$ sudo service gitea restart
|
||||
```
|
||||
|
||||
#### Ajouter un lien dans la barre de navigation inférieure:
|
||||
|
||||
```bash
|
||||
# Ajouter un fichier extra_links_footer.tmpl
|
||||
|
||||
$ nano /var/services/homes/gitea/custom/templates/custom/extra_links_footer.tmpl
|
||||
|
||||
<a class="item" href="{{AppSubUrl}}/privacy.html">Privacy Policy</a>
|
||||
|
||||
$ cd /var/lib/gitea/custom/public
|
||||
privacy.html
|
||||
|
||||
# Redémarrer Gitea
|
||||
$ sudo service gitea restart
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Backup
|
||||
|
||||
Pour sqlite:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/var/services/homes $zip -r gitea.zip gitea/
|
||||
```
|
||||
|
||||
Les repos sont là `/var/services/homes/gitea/data/gitea-repositories`
|
||||
|
||||
Pour MySQL, sauvegarder la base en plus.
|
||||
|
||||
|
||||
|
||||
Gitea ajoute dans le `authorized_keys`:
|
||||
|
||||
```
|
||||
#command="/usr/local/bin/gitea --config=/etc/gitea/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+V9iatTyPN/4prnbnRhUdP13RMTSPeajqvpyJzcNmVGUeGLOT6zCY4RQQAbd1ZCRWNZ3W/OmjiQ0a2r1yp26pxJlS9UWl8DUGc3D7StGAbHpP20ydZ++VvXCcqbAgpuPnScmWCzk/flPzcDiFOGwo2fh5bHGjO+XjOVaIhP608cMkw8UR2Dcg+BkOuBb5oX9SScvb2U5elosMbsDSR+Hghip4Wf8QFYyCJxpgZXjEucp0rm5fe19mKL/bF3PLS3OqUgN24WZv7jdDTK/QICz+cCHU8cG8+A4MYkdBaMZysXIJtdk5MzLbRhaD6yohP403MxA3BrMCGPXnk9cHi4JQ1meClP0OiyrPaC36iX7tvtszzFbnjmElHYmMTSWp0sstMfWt+7nIDJMbxOee3g5MUu1AbHrNyds4DiP4AKy25t9q8TMSYWPN8M84N5sUIKao9SUeHLLU7BoqiSJTpHuIS4967ETdkunu7OipKEueUXjxA4WK+qp3KCa+lGncTkog72DN6j8kR86H/rfW+b2KqKj4vQr9Covd+W9WoC2e558qHlqWKY8B1Wh/kt5oo+4paw7yBgkGS3hsHBdd+uzG0y5BL7DiUDdC45I71oSTsOqBosW9mtEA4d9cmeQjjrVFGlSWpfD6+46MGn9uyOp7W5ndpHJe1iorAmdl2nTcbw== Commentaire: ma clé sur le airbook
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -26,3 +26,8 @@ https://blog.viking-studios.net/en/nextcloud-hub-optimization-on-a-synology-disk
|
||||
apc.enable_cli=1
|
||||
```
|
||||
|
||||
|
||||
|
||||
Erreur Nextcloud dans les logs *Exception: Call to undefined function OCA\Settings\Controller\posix_getuid() in file*:
|
||||
|
||||
L'extension PHP Posix n'est pas installée.
|
||||
|
||||
@@ -2,16 +2,30 @@
|
||||
|
||||
|
||||
|
||||
#### Paquets Synology
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/@appstore/Node.js_v18/usr/local $ cd bin/
|
||||
total 47520
|
||||
drwxr-xr-x 1 root root 30 Oct 26 2022 .
|
||||
drwxr-xr-x 1 root root 18 Oct 26 2022 ..
|
||||
lrwxrwxrwx 1 root root 45 Oct 26 2022 corepack -> ../lib/node_modules/corepack/dist/corepack.js
|
||||
-rwxr-xr-x 1 root root 48651256 Oct 26 2022 node
|
||||
lrwxrwxrwx 1 root root 38 Oct 26 2022 npx -> ../lib/node_modules/npm/bin/npx-cli.js
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Installer nvm
|
||||
|
||||
```bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
```
|
||||
|
||||
Installer node=lts/fermium (ou mettre-à-jour)
|
||||
|
||||
```bash
|
||||
nvm install --lts=fermium
|
||||
nvm install --lts=hydrogen
|
||||
```
|
||||
|
||||
Mettre-à-jour npm:
|
||||
|
||||
269
docs/Synology/dsm7/php.md
Normal file
269
docs/Synology/dsm7/php.md
Normal file
@@ -0,0 +1,269 @@
|
||||
# php
|
||||
|
||||
|
||||
|
||||
Le paquet **php 8.0** est dispo:
|
||||
|
||||
https://www.synology.com/fr-fr/support/download/DS916+?version=7.0#packages
|
||||
|
||||
|
||||
|
||||
#### Les services **php** actifs:
|
||||
|
||||
```bash
|
||||
$ systemctl | grep PHP
|
||||
pkg-WebStation-php74@182b445b-6caf-469f-acaa-a763582ba8db.service loaded active running WebStation PHP7.4 fpm process
|
||||
pkg-WebStation-php74@da937888-3180-4a69-96d6-076b750f2b06.service loaded active running WebStation PHP7.4 fpm process
|
||||
pkg-WebStation-php74@e32d3cf6-055c-43f0-802d-6b72e9437f42.service loaded active running WebStation PHP7.4 fpm process
|
||||
pkg-WebStation-php80@746b57c5-03a4-4210-bf14-1d7df30c8b79.service loaded active running WebStation PHP8.0 fpm process
|
||||
pkgctl-PHP7.4.service loaded active exited PHP7.4's service unit
|
||||
pkgctl-PHP8.0.service loaded active exited PHP8.0's service unit
|
||||
PHP7.3.slice loaded active active PHP7.3.slice
|
||||
PHP7.4.slice loaded active active PHP7.4's slice
|
||||
PHP8.0.slice loaded active active PHP8.0's slice
|
||||
```
|
||||
|
||||
#### Les services **apache** actifs:
|
||||
|
||||
```bash
|
||||
$ systemctl | grep apache
|
||||
pkg-apache24.service loaded active running Apache2.4 daemon
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Redémarrer un service:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart pkgctl-PHP8.0.service
|
||||
```
|
||||
|
||||
```bash
|
||||
$ sudo systemctl stop pkgctl-PHP8.0.service
|
||||
$ sudo systemctl start pkgctl-PHP8.0.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Mettre PHP 8.0 cli par défaut:
|
||||
|
||||
```bash
|
||||
$ sudo -i
|
||||
Password:
|
||||
root@DS916:~# cd /usr/bin/
|
||||
|
||||
root@DS916:/usr/bin# mv php php73
|
||||
root@DS916:/usr/bin# ln -s /volume1/@appstore/PHP8.0/usr/local/bin/php80 php
|
||||
|
||||
root@DS916:/usr/bin# php -v
|
||||
PHP 8.0.17 (cli) (built: Mar 22 2022 17:54:40) ( NTS )
|
||||
Copyright (c) The PHP Group
|
||||
Zend Engine v4.0.17, Copyright (c) Zend Technologies
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liste des php.ini:
|
||||
|
||||
```bash
|
||||
$ find / -name php.ini 2>/dev/null
|
||||
|
||||
/usr/local/etc/php73/cli/php.ini
|
||||
/usr/local/etc/php80/cli/php.ini memory_limit = 512M
|
||||
/usr/local/etc/php74/cli/php.ini memory_limit = 128M
|
||||
/etc.defaults/php/php.ini memory_limit = 128M
|
||||
/volume1/@appstore/PHP7.0/usr/local/etc/php70/php.ini
|
||||
/volume1/@appstore/PHP7.2/usr/local/etc/php72/cli/php.ini
|
||||
/volume1/@appstore/PHP7.4/usr/local/etc/php74/cli/php.ini memory_limit = 128M
|
||||
/volume1/@appstore/PHP8.0/usr/local/etc/php80/cli/php.ini memory_limit = 512M
|
||||
/etc/php/php.ini memory_limit = 512M
|
||||
/volume1/@appstore/PHP8.0/misc/php-fpm.ini <- memory_limit pris en compte par php-info memory_limit = 512M
|
||||
```
|
||||
|
||||
|
||||
|
||||
### PHP 8.0
|
||||
|
||||
#### Liste des fichiers de conf:
|
||||
|
||||
```bash
|
||||
$ php --ini
|
||||
|
||||
Configuration File (php.ini) Path: /usr/local/etc/php80/cli
|
||||
Loaded Configuration File: /usr/local/etc/php80/cli/php.ini
|
||||
Scan for additional .ini files in: /usr/local/etc/php80/cli/conf.d
|
||||
Additional .ini files parsed: /usr/local/etc/php80/cli/conf.d/extension.ini,
|
||||
/usr/local/etc/php80/cli/conf.d/nextcloud.ini,
|
||||
/usr/local/etc/php80/cli/conf.d/timezone.ini
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
bruno@DS916:~ $ cd /usr/local/etc/php80/cli/conf.d
|
||||
total 20
|
||||
-rw-r--r-- 1 root root 773 May 4 08:17 extension.ini
|
||||
-rw-r--r-- 1 root root 68 May 4 09:48 nextcloud.ini
|
||||
-rw-r--r-- 1 root root 32 May 4 08:17 timezone.ini
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Erreur Nextcloud *OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache*:
|
||||
|
||||
Il faut rajouter l'extension apcu mais elle n'est pas dispo dans le profil PHP.
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/etc/php80/cli/conf.d $ cat nextcloud.ini
|
||||
|
||||
extension = apcu.so
|
||||
|
||||
[apc]
|
||||
apc.shm_size = 512M
|
||||
apc.enable_cli = 1
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liste des modules PHP:
|
||||
|
||||
```bash
|
||||
$ php -m
|
||||
[PHP Modules]
|
||||
apcu
|
||||
bcmath
|
||||
bz2
|
||||
calendar
|
||||
Core
|
||||
ctype
|
||||
curl
|
||||
date
|
||||
dba
|
||||
dom
|
||||
exif
|
||||
fileinfo
|
||||
filter
|
||||
ftp
|
||||
gd
|
||||
gettext
|
||||
gmp
|
||||
hash
|
||||
iconv
|
||||
imap
|
||||
intl
|
||||
json
|
||||
ldap
|
||||
libxml
|
||||
mailparse
|
||||
mbstring
|
||||
mysqli
|
||||
mysqlnd
|
||||
openssl
|
||||
pcntl
|
||||
pcre
|
||||
PDO
|
||||
pdo_dblib
|
||||
pdo_mysql
|
||||
pdo_pgsql
|
||||
pdo_sqlite
|
||||
pgsql
|
||||
Phar
|
||||
posix
|
||||
readline
|
||||
redis
|
||||
Reflection
|
||||
session
|
||||
shmop
|
||||
SimpleXML
|
||||
soap
|
||||
sockets
|
||||
sodium
|
||||
SPL
|
||||
sqlite3
|
||||
ssh2
|
||||
standard
|
||||
sysvmsg
|
||||
sysvsem
|
||||
sysvshm
|
||||
tokenizer
|
||||
xml
|
||||
xmlreader
|
||||
xmlwriter
|
||||
xsl
|
||||
zip
|
||||
zlib
|
||||
|
||||
[Zend Modules]
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Dossier des modules:
|
||||
|
||||
`/volume1/@appstore/PHP8.0/usr/local/lib/php80/modules/`
|
||||
|
||||
`/volume1/@appstore/PHP7.4/usr/local/lib/php74/modules/`
|
||||
|
||||
|
||||
|
||||
Les extensions n'apparaissent pas dans les <u>Extensions du profil PHP</u> (Web Station). Il faut éditer `extension_list.json`:
|
||||
|
||||
```bash
|
||||
$ sudo nano /volume1/@appstore/PHP8.0/misc/extension_list.json
|
||||
|
||||
"apcu": {
|
||||
"enable_default": true,
|
||||
"desc": "APC User Cache."
|
||||
},
|
||||
|
||||
|
||||
|
||||
"redis": {
|
||||
"enable_default": true,
|
||||
"desc": "The php redis extension provides an API for communicating with the Redis key-value store.."
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Installer Composer:
|
||||
|
||||
On se place dans /usr/local/bin:
|
||||
|
||||
```bash
|
||||
bruno@DS916:~ $ cd /usr/local/bin
|
||||
```
|
||||
|
||||
et on installe Composer:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/bin $ sudo curl -s http://getcomposer.org/installer | sudo php80
|
||||
Password:
|
||||
All settings correct for using Composer
|
||||
Downloading...
|
||||
|
||||
Composer (version 2.5.7) successfully installed to: /usr/local/bin/composer.phar
|
||||
Use it: php composer.phar
|
||||
|
||||
```
|
||||
|
||||
Pour l'appeler directement, on crée un script:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/bin $ sudo nano composer
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
php /usr/local/bin/composer.phar $*
|
||||
```
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/bin $ sudo chmod --reference=composer.phar composer
|
||||
```
|
||||
|
||||
```bash
|
||||
bruno@DS916:/usr/local/bin $ composer --version
|
||||
Composer version 2.5.7 2023-05-24 15:00:39
|
||||
```
|
||||
|
||||
@@ -41,12 +41,12 @@ Activer **Redis** dans PHP:
|
||||
Redis n'est pas proposé dans les extensions, bien que le module soit présent..
|
||||
|
||||
```bash
|
||||
ls /volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
/volume1/@appstore/PHP7.3/usr/local/lib/php73/modules/redis.so
|
||||
ls /volume1/@appstore/PHP8.0/usr/local/lib/php80/modules/redis.so
|
||||
/volume1/@appstore/PHP8.0/usr/local/lib/php80/modules/redis.so
|
||||
```
|
||||
|
||||
```bash title="Editer le fichier extension.ini"
|
||||
sudo nano /usr/local/etc/php73/cli/conf.d/extension.ini
|
||||
sudo nano /usr/local/etc/php80/cli/conf.d/extension.ini
|
||||
|
||||
# Ajouter la ligne extension = redis.so juste après posix.po
|
||||
```
|
||||
@@ -65,3 +65,22 @@ sudo nano /volume1/@appstore/PHP7.3/misc/extension_list.json
|
||||
|
||||
**Redis** est maintenant disponible dans les extensions PHP. On l'active.
|
||||
|
||||
|
||||
|
||||
### Nextcloud:
|
||||
|
||||
A ajouter dans le fichier de configuration `/volume1/web/nextcloud/config/config.php`:
|
||||
|
||||
```php
|
||||
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
||||
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
||||
'memcache.local' => '\\OC\\Memcache\\APCu',
|
||||
'redis' =>
|
||||
array (
|
||||
'host' => '/sockets/redis.socket',
|
||||
'port' => 0,
|
||||
'password' => '[PASSWORD]',
|
||||
'timeout' => 1.5,
|
||||
),
|
||||
```
|
||||
|
||||
|
||||
172
docs/Synology/dsm7/webserver-opkg.md
Normal file
172
docs/Synology/dsm7/webserver-opkg.md
Normal file
@@ -0,0 +1,172 @@
|
||||
# Installer Apache/PHP via opkg (Entware)
|
||||
|
||||
|
||||
|
||||
### Apache
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
#### Configuration:
|
||||
|
||||
```bash
|
||||
sudo nano /opt/etc/apache2/apache2.conf
|
||||
```
|
||||
|
||||
```http
|
||||
Listen 81
|
||||
|
||||
User http
|
||||
Group http
|
||||
|
||||
ServerName clicclac.synology.me:81
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
<VirtualHost *:*>
|
||||
ProxyPassMatch "^/(.*\.php(/.*)?)$" "fcgi://127.0.0.1:9000/opt/homebrew/local/var/www/$1"
|
||||
</VirtualHost>
|
||||
<FilesMatch \.php$>
|
||||
# 2.4.10+ can proxy to unix socket
|
||||
# SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
|
||||
# Else we can just use a tcp socket:
|
||||
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
</FilesMatch>
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.php index.html
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch \.php$>
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
|
||||
|
||||
DocumentRoot "/opt/share/apache2/htdocs"
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo /opt/etc/init.d/S80apache restart
|
||||
```
|
||||
|
||||
#### Liste des modules:
|
||||
|
||||
```bash
|
||||
apachectl -M
|
||||
```
|
||||
|
||||
|
||||
|
||||
### PHP
|
||||
|
||||
#### Installer PHP 8.2:
|
||||
|
||||
```bash
|
||||
sudo opkg install php8 php8-cgi php8-cli php8-fastcgi
|
||||
```
|
||||
|
||||
```bash
|
||||
/opt/etc $ cd init.d/
|
||||
total 16
|
||||
drwxr-xr-x 1 root root 74 May 29 07:40 .
|
||||
drwxr-xr-x 1 root root 390 Feb 27 08:44 ..
|
||||
-rw-r--r-- 1 root root 2822 Apr 19 2021 rc.func
|
||||
-rwxr-xr-x 1 root root 966 Apr 19 2021 rc.unslung
|
||||
-rwxr-xr-x 1 root root 241 Feb 27 08:44 S79php8-fpm
|
||||
lrwxrwxrwx 1 root root 19 May 29 07:40 S80apache -> /opt/sbin/apachectl
|
||||
```
|
||||
|
||||
#### Installer des modules PHP:
|
||||
|
||||
```bash
|
||||
sudo opkg install php8-mod-bcmath php8-mod-ctype php8-mod-curl php8-mod-dom php8-mod-exif php8-mod-fileinfo php8-mod-filter php8-mod-ftp php8-mod-gd php8-mod-gettext php8-mod-gmp php8-mod-iconv php8-mod-imap php8-mod-intl
|
||||
icu-full-data php8-mod-mbstring php8-mod-mysqli php8-mod-mysqlnd php8-mod-opcache php8-mod-openssl php8-mod-pcntl php8-mod-pdo php8-mod-pdo-mysql php8-mod-pdo-sqlite php8-mod-phar php8-mod-session php8-mod-sysvsem php8-mod-tokenizer php8-mod-xml php8-mod-xmlwriter php8-mod-zip php8-pecl-imagick php8-pecl-redis
|
||||
|
||||
```
|
||||
|
||||
#### PHP via opkg:
|
||||
|
||||
```bash
|
||||
/opt/bin
|
||||
-rwxr-xr-x 1 root root 4322256 Feb 27 08:44 php8-cgi
|
||||
-rwxr-xr-x 1 root root 4392192 Feb 27 08:44 php8-cli
|
||||
lrwxrwxrwx 1 root root 8 May 29 09:50 php8-fcgi -> php8-cgi
|
||||
-rwxr-xr-x 1 root root 4439296 Feb 27 08:44 php8-fpm
|
||||
lrwxrwxrwx 1 root root 8 May 29 09:50 php-cgi -> php8-cgi
|
||||
lrwxrwxrwx 1 root root 8 May 29 08:05 php-cli -> php8-cli
|
||||
lrwxrwxrwx 1 root root 9 May 29 09:50 php-fcgi -> php8-fcgi
|
||||
```
|
||||
|
||||
#### Paquet Synology PHP:
|
||||
|
||||
```bash
|
||||
/usr/local/bin
|
||||
lrwxrwxrwx 1 root root 47 May 28 09:22 php80 -> /var/packages/PHP8.0/target/usr/local/bin/php80
|
||||
lrwxrwxrwx 1 root root 51 May 28 09:22 php80-cgi -> /var/packages/PHP8.0/target/usr/local/bin/php80-cgi
|
||||
lrwxrwxrwx 1 root root 51 May 28 09:22 php80-fpm -> /var/packages/PHP8.0/target/usr/local/bin/php80-fpm
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Démarrer PHP
|
||||
|
||||
```bash
|
||||
bruno@DS916:/opt/etc/init.d $ ./S79php8-fpm start
|
||||
Starting php8-fpm... done.
|
||||
```
|
||||
|
||||
#### Statut de PHP
|
||||
|
||||
```bash
|
||||
bruno@DS916:/opt/etc/init.d $ ./S79php8-fpm status
|
||||
Usage: ./S79php8-fpm (start|stop|restart|check|kill|reconfigure)
|
||||
```
|
||||
|
||||
#### Configuration:
|
||||
|
||||
```bash
|
||||
sudo nano /opt/etc/php.ini
|
||||
```
|
||||
|
||||
```ini
|
||||
post_max_size = 500M
|
||||
display_errors = Off
|
||||
error_log = /opt/var/log/php_errors.log
|
||||
output_buffering = Off
|
||||
|
||||
; Resource Limits
|
||||
|
||||
max_execution_time = 30 ; Maximum execution time of each script, in seconds.
|
||||
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data.
|
||||
;max_input_nesting_level = 64
|
||||
memory_limit = 32M ; Maximum amount of memory a script may consume.
|
||||
|
||||
; Paths and Directories
|
||||
|
||||
;doc_root = "/opt/share/www/lighttpd"
|
||||
;user_dir =
|
||||
extension_dir = "/opt/lib/php"
|
||||
enable_dl = On
|
||||
;cgi.force_redirect = 1
|
||||
;cgi.nph = 1
|
||||
;cgi.redirect_status_env = ;
|
||||
cgi.fix_pathinfo=1
|
||||
|
||||
; File Uploads
|
||||
|
||||
file_uploads = O
|
||||
upload_tmp_dir = "/opt/tmp"
|
||||
upload_max_filesize = 500M
|
||||
max_file_uploads = 50
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Apache:
|
||||
|
||||
```bash
|
||||
/opt/lib/apache2/libphp.so
|
||||
```
|
||||
|
||||
@@ -14,18 +14,26 @@
|
||||
|
||||
### DSM
|
||||
|
||||
- [Bash](bash.md)
|
||||
- [crontab](crontab.md)
|
||||
- [ImageMagick.md](ImageMagick.md)
|
||||
- [Installer le shell bash](bash.md)
|
||||
- [Dossiers @eaDir](eadir.md)
|
||||
- [nginx](nginx.md)
|
||||
- [Scripts](scripts.md)
|
||||
|
||||
|
||||
|
||||
### DSM7
|
||||
|
||||
- [Apache](dsm7/apache.md)
|
||||
- [DSM 7](dsm7/dsm7.md)
|
||||
- [Gitea](dsm7/gitea.md)
|
||||
- [Nextcloud](dsm7/nextcloud.md)
|
||||
- [Node.js](dsm7/node.md)
|
||||
- [Piwigo](dsm7/piwigo.md)
|
||||
- [Python](dsm7/python.md)
|
||||
- [Redis](dsm7/redis.md)
|
||||
- [WordPress](dsm7/wordpress.md)
|
||||
|
||||
|
||||
@@ -37,7 +45,7 @@
|
||||
- [Installer ownCloud (depuis archive)](dsm6/owncloud.md)
|
||||
- [Installer Nextcloud](dsm6/nextcloud.md)
|
||||
- [PHP](dsm6/php.md)
|
||||
- [Python](dsm6/python)
|
||||
- [Python](dsm6/python.md)
|
||||
- [Services](dsm6/services.md)
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
[Distributions Linux](Distributions/index.md)
|
||||
|
||||
[macos](macos/index.md)
|
||||
[macOS](macOS/index.md)
|
||||
|
||||
[Linux](Linux/index.md)
|
||||
|
||||
|
||||
174
docs/macos/TimeMachine.md
Normal file
174
docs/macos/TimeMachine.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Time Machine
|
||||
|
||||
|
||||
|
||||
https://www.macworld.com/article/220774/control-time-machine-from-the-command-line.html
|
||||
|
||||
|
||||
|
||||
Activer Time Machine:
|
||||
|
||||
```bash
|
||||
$ tmutil enable
|
||||
```
|
||||
|
||||
Désactiver Time Machine:
|
||||
|
||||
```bash
|
||||
$ tmutil disable
|
||||
```
|
||||
|
||||
Démarrer une sauvegarde:
|
||||
|
||||
```bash
|
||||
$ tmutil startbackup
|
||||
```
|
||||
|
||||
Stopper une sauvegarde:
|
||||
|
||||
```bash
|
||||
$ tmutil stopbackup
|
||||
```
|
||||
|
||||
Connaitre le répertoire de stockage de Time Machine:
|
||||
|
||||
```bash
|
||||
$ tmutil machinedirectory
|
||||
/Volumes/Karadoc
|
||||
```
|
||||
|
||||
Liste des backups locaux:
|
||||
|
||||
```bash
|
||||
$ tmutil listlocalsnapshots /
|
||||
Snapshots for disk /:
|
||||
com.apple.TimeMachine.2023-08-06-183708.local
|
||||
com.apple.TimeMachine.2023-08-06-224319.local
|
||||
com.apple.TimeMachine.2023-08-06-234317.local
|
||||
com.apple.TimeMachine.2023-08-07-004401.local
|
||||
com.apple.TimeMachine.2023-08-07-014414.local
|
||||
com.apple.TimeMachine.2023-08-07-024419.local
|
||||
com.apple.TimeMachine.2023-08-07-034434.local
|
||||
com.apple.TimeMachine.2023-08-07-044445.local
|
||||
com.apple.TimeMachine.2023-08-07-054449.local
|
||||
com.apple.TimeMachine.2023-08-07-074454.local
|
||||
com.apple.TimeMachine.2023-08-07-084455.local
|
||||
com.apple.TimeMachine.2023-08-07-094541.local
|
||||
com.apple.TimeMachine.2023-08-07-104623.local
|
||||
com.apple.TimeMachine.2023-08-07-122033.local
|
||||
```
|
||||
|
||||
Date des backup locaux:
|
||||
|
||||
```bash
|
||||
$ tmutil listlocalsnapshotdates /
|
||||
Snapshot dates for disk /:
|
||||
2023-08-06-183708
|
||||
2023-08-06-224319
|
||||
2023-08-06-234317
|
||||
2023-08-07-004401
|
||||
2023-08-07-014414
|
||||
2023-08-07-024419
|
||||
2023-08-07-034434
|
||||
2023-08-07-044445
|
||||
2023-08-07-054449
|
||||
2023-08-07-074454
|
||||
2023-08-07-084455
|
||||
2023-08-07-094541
|
||||
2023-08-07-104623
|
||||
2023-08-07-122033
|
||||
```
|
||||
|
||||
Supprimer un backup local:
|
||||
|
||||
```bash
|
||||
$ sudo tmutil deletelocalsnapshots <snapshot_date>
|
||||
|
||||
$ sudo tmutil deletelocalsnapshots 2023-08-07-084455
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ tmutil calculatedrift "/Volumes/Karadoc"
|
||||
|
||||
Drift Averages
|
||||
-------------------------------------
|
||||
Added: 0B
|
||||
Removed: 0B
|
||||
Changed: 0B
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ tmutil --help
|
||||
Usage: tmutil version
|
||||
|
||||
Usage: tmutil enable
|
||||
|
||||
Usage: tmutil disable
|
||||
|
||||
Usage: tmutil startbackup [-a | --auto] [-b | --block] [-r | --rotation] [-d | --destination dest_id]
|
||||
|
||||
Usage: tmutil stopbackup
|
||||
|
||||
Usage: tmutil delete [-d backup_mount_point -t timestamp] [-p path]
|
||||
|
||||
Usage: tmutil deleteinprogress machine_directory
|
||||
|
||||
Usage: tmutil restore [-v] src ... dst
|
||||
|
||||
Usage: tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name]
|
||||
tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name] snapshot_path
|
||||
tmutil compare [-@acdefghlmnstuEUX] [-D depth] [-I name] path1 path2
|
||||
|
||||
Usage: tmutil setdestination [-a] mount_point
|
||||
tmutil setdestination [-ap] afp://user[:pass]@host/share
|
||||
|
||||
Usage: tmutil setdestination destination_id quota_in_gigabytes
|
||||
|
||||
Usage: tmutil removedestination destination_id
|
||||
|
||||
Usage: tmutil destinationinfo [-X]
|
||||
|
||||
Usage: tmutil addexclusion [-p|-v] item ...
|
||||
|
||||
Usage: tmutil removeexclusion [-p|-v] item ...
|
||||
|
||||
Usage: tmutil isexcluded item ...
|
||||
|
||||
Usage: tmutil inheritbackup machine_directory
|
||||
tmutil inheritbackup sparse_bundle
|
||||
|
||||
Usage: tmutil associatedisk [-a] mount_point volume_backup_directory
|
||||
|
||||
Usage: tmutil latestbackup [-m] [-t] [-d mount_point]
|
||||
|
||||
Usage: tmutil listbackups [-m] [-t] [-d mount_point]
|
||||
|
||||
Usage: tmutil machinedirectory
|
||||
|
||||
Usage: tmutil calculatedrift machine_directory
|
||||
|
||||
Usage: tmutil uniquesize path ...
|
||||
|
||||
Usage: tmutil verifychecksums path ...
|
||||
|
||||
Usage: tmutil localsnapshot
|
||||
|
||||
Usage: tmutil listlocalsnapshots <mount_point>
|
||||
|
||||
Usage: tmutil listlocalsnapshotdates [<mount_point>]
|
||||
|
||||
Usage: tmutil deletelocalsnapshots [<mount_point> | <snapshot_date>]
|
||||
|
||||
Usage: tmutil thinlocalsnapshots <mount_point> [purgeamount] [urgency]
|
||||
```
|
||||
|
||||
@@ -2,6 +2,24 @@
|
||||
|
||||
|
||||
|
||||
### Avec Sonoma
|
||||
|
||||
```bash
|
||||
$ sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
|
||||
|
||||
$ sudo nano /etc/pam.d/sudo_local
|
||||
```
|
||||
|
||||
Dé-commentez la 3e ligne:
|
||||
|
||||
```bash
|
||||
auth sufficient pam_tid.so
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Avant Sonoma
|
||||
|
||||
```bash
|
||||
$ sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.bak
|
||||
|
||||
@@ -29,4 +47,3 @@ session required pam_permit.so
|
||||
!!! attention
|
||||
Les connections ssh sans mot-de-passe ne fonctionnent plus.
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,42 @@ $ brew upgrade
|
||||
# --cleanup Met à jour et supprime les anciennes versions installées.
|
||||
```
|
||||
|
||||
### Toutes les commandes:
|
||||
|
||||
```bash
|
||||
$ brew commands
|
||||
==> Built-in commands
|
||||
--cache deps list search
|
||||
--caskroom desc log shellenv
|
||||
--cellar developer migrate tap-info
|
||||
--env docs missing tap
|
||||
--prefix doctor nodenv-sync uninstall
|
||||
--repository fetch options unlink
|
||||
--version formulae outdated unpin
|
||||
analytics gist-logs pin untap
|
||||
autoremove help postgresql-upgrade-database update-report
|
||||
casks home postinstall update-reset
|
||||
cleanup info pyenv-sync update
|
||||
commands install rbenv-sync upgrade
|
||||
completions leaves readall uses
|
||||
config link reinstall vendor-install
|
||||
|
||||
==> Built-in developer commands
|
||||
audit contributions generate-man-completions prof typecheck
|
||||
bottle create install-bundler-gems release unbottled
|
||||
bump-cask-pr determine-test-runners irb rubocop unpack
|
||||
bump-formula-pr dispatch-build-bottle linkage ruby update-license-data
|
||||
bump-revision edit livecheck sh update-maintainers
|
||||
bump-unversioned-casks extract pr-automerge style update-python-resources
|
||||
bump formula pr-publish tap-new update-sponsors
|
||||
cat generate-cask-api pr-pull test update-test
|
||||
command generate-formula-api pr-upload tests vendor-gems
|
||||
|
||||
==> External commands
|
||||
bundle services
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Formules:
|
||||
@@ -563,13 +599,15 @@ $ brew bundle
|
||||
```bash
|
||||
bruno@SilverBook:~$ brew services list
|
||||
|
||||
Name Status User Plist
|
||||
|
||||
mariadb started bruno /Users/bruno/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
|
||||
|
||||
php71 started bruno /Users/bruno/Library/LaunchAgents/homebrew.mxcl.php71.plist
|
||||
|
||||
httpd started root /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
|
||||
Name Status User File
|
||||
dbus none
|
||||
emacs none
|
||||
httpd started bruno ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
|
||||
mariadb started bruno ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
|
||||
php started bruno ~/Library/LaunchAgents/homebrew.mxcl.php.plist
|
||||
php@7.4 none
|
||||
redis started bruno ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
|
||||
unbound none
|
||||
```
|
||||
|
||||
#### Lancer au démarrage:
|
||||
@@ -606,22 +644,23 @@ $ brew services restart mysql
|
||||
|
||||
```bash
|
||||
$ brew tap
|
||||
caskroom/cask
|
||||
homebrew/apache
|
||||
homebrew/bundle
|
||||
homebrew/cask
|
||||
homebrew/cask-drivers
|
||||
homebrew/cask-fonts
|
||||
homebrew/core
|
||||
homebrew/dupes
|
||||
homebrew/php
|
||||
homebrew/services
|
||||
homebrew/versions
|
||||
tideways/profiler
|
||||
vapor/tap
|
||||
joedrago/repo
|
||||
shivammathur/extensions
|
||||
shivammathur/php
|
||||
sidneys/homebrew
|
||||
```
|
||||
|
||||
<u>Les tap sont situés là:</u>
|
||||
|
||||
```bash
|
||||
bruno@silverbook:/usr/local/Homebrew/Library/Taps$ ls
|
||||
caskroom homebrew tideways vapor
|
||||
/opt/homebrew/Library/Taps $ ls
|
||||
homebrew joedrago shivammathur sidneys
|
||||
```
|
||||
|
||||
#### Ajouter un repo:
|
||||
@@ -640,26 +679,27 @@ $ brew untap <tapname>
|
||||
|
||||
```bash
|
||||
$ brew config
|
||||
HOMEBREW_VERSION: 2.2.4-6-g7fcae58
|
||||
HOMEBREW_VERSION: 3.6.10
|
||||
ORIGIN: https://github.com/Homebrew/brew
|
||||
HEAD: 7fcae58af70da20b3be04327ebeebdf236333d27
|
||||
Last commit: 19 hours ago
|
||||
HEAD: eaf887656ffb8e9e35ccf08081814d4735637564
|
||||
Last commit: 13 hours ago
|
||||
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
|
||||
Core tap HEAD: 91f4df97adc4fcb9459b1a8dbd026c9fa1e45c31
|
||||
Core tap last commit: 73 minutes ago
|
||||
HOMEBREW_PREFIX: /usr/local
|
||||
HOMEBREW_DEV_CMD_RUN: 1
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
CPU: octa-core 64-bit skylake
|
||||
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
|
||||
Clang: 11.0 build 1100
|
||||
Git: 2.25.0 => /usr/local/bin/git
|
||||
Curl: 7.64.1 => /usr/bin/curl
|
||||
Java: 13.0.1
|
||||
macOS: 10.15.2-x86_64
|
||||
CLT: N/A
|
||||
Xcode: 11.3.1
|
||||
XQuartz: 2.7.11 => /opt/X11
|
||||
Core tap HEAD: 27b9f0718bb03e5ea933b5ceb5cd0cadb2bbd4a0
|
||||
Core tap last commit: 19 minutes ago
|
||||
Core tap branch: master
|
||||
HOMEBREW_PREFIX: /opt/homebrew
|
||||
HOMEBREW_CASK_OPTS: []
|
||||
HOMEBREW_EDITOR: nano
|
||||
HOMEBREW_MAKE_JOBS: 8
|
||||
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
|
||||
CPU: octa-core 64-bit arm_firestorm_icestorm
|
||||
Clang: 14.0.0 build 1400
|
||||
Git: 2.38.1 => /opt/homebrew/bin/git
|
||||
Curl: 7.79.1 => /usr/bin/curl
|
||||
macOS: 12.6-arm64
|
||||
CLT: 14.1.0.0.1.1663981106
|
||||
Xcode: 14.0.1
|
||||
Rosetta 2: false
|
||||
```
|
||||
|
||||
#### Afficher les formules qui ont le paquet cité comme dépendance (brew uses):
|
||||
@@ -781,41 +821,68 @@ Les outils GNU sont préfixés par la lettre **g** (**g**ls, **g**cat, **g**chmo
|
||||
|
||||
*Les outils GNU sont installés dans /usr/local/bin/*
|
||||
|
||||
*Un alias sans le préfixe **g** est crée dans /usr/local/opt/coreutils/libexec/gnubin/*
|
||||
*Un alias sans le préfixe **g** est crée dans /usr/local/opt/coreutils/libexec/gnubin/* ou */opt/homebrew/opt/coreutils/libexec/gnubin*
|
||||
|
||||
|
||||
|
||||
On peut ajouter le dossier /usr/local/opt/coreutils/libexec/gnubin dans le $PATH. Les outils GNU sont alors disponibles sans préfixe, à la place des outils BSD.
|
||||
```bash
|
||||
❯ ls /opt/homebrew/opt/coreutils/libexec/gnubin/
|
||||
'['
|
||||
b2sum, base32, base64, basename, basenc,
|
||||
cat, chcon, chgrp, chmod, chown, chroot, cksum, comm, cp, csplit, cut
|
||||
date, dd, df, dir, dircolors, dirname, du,
|
||||
echo, env, expand, expr,
|
||||
factor, false, fmt, fold,
|
||||
groups
|
||||
head, hostid,
|
||||
id, install,
|
||||
join
|
||||
kill
|
||||
link, ln, logname ,ls
|
||||
md5sum, mkdir, mkfifo, mknod, mktemp, mv
|
||||
nice, nl, nohup, nproc, numfmt,
|
||||
od
|
||||
paste, pathchk, pinky, pr, printenv, printf, ptx, pwd,
|
||||
readlink, realpath, rm, rmdir, runcon,
|
||||
seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, sync
|
||||
tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, tty,
|
||||
uname, unexpand, uniq, unlink, uptime, users,
|
||||
vdir
|
||||
wc, who, whoami
|
||||
yes
|
||||
```
|
||||
|
||||
On peut ajouter le dossier /usr/local/opt/coreutils/libexec/gnubin (/opt/homebrew/opt/coreutils/libexec/gnubin) dans le $PATH. Les outils GNU sont alors disponibles sans préfixe, à la place des outils BSD.
|
||||
|
||||
De même pour les man (`MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"`)
|
||||
|
||||
```bash
|
||||
# AVEC PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
||||
# AVEC PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
|
||||
|
||||
❯ which ls
|
||||
/usr/local/opt/coreutils/libexec/gnubin/ls
|
||||
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
|
||||
|
||||
❯ which gls
|
||||
/usr/local/bin/gls
|
||||
/opt/homebrew/bin/gls
|
||||
(gls -> ../Cellar/coreutils/8.31/bin/gls)
|
||||
|
||||
❯ which /bin/ls
|
||||
/bin/ls
|
||||
|
||||
❯ ls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
ls (GNU coreutils) 9.1
|
||||
|
||||
❯ gls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
ls (GNU coreutils) 9.1
|
||||
|
||||
|
||||
# SANS PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
||||
# SANS PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
|
||||
|
||||
❯ which ls
|
||||
/bin/ls
|
||||
|
||||
❯ which gls
|
||||
/usr/local/bin/gls
|
||||
/opt/homebrew/bin/gls
|
||||
|
||||
❯ which /bin/ls
|
||||
/bin/ls
|
||||
@@ -824,7 +891,7 @@ ls (GNU coreutils) 8.31
|
||||
ls: illegal option -- -
|
||||
|
||||
❯ gls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
ls (GNU coreutils) 9.1
|
||||
```
|
||||
|
||||
Utiliser date ou gdate:
|
||||
@@ -848,27 +915,27 @@ Comprend les versions GNU de *find, locate, xargs* (pas de updatedb dans osx )
|
||||
```bash
|
||||
$ brew install findutils
|
||||
|
||||
# SANS PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
|
||||
# SANS PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"
|
||||
|
||||
$ which find
|
||||
/usr/bin/find
|
||||
|
||||
$ which gfind
|
||||
/usr/local/bin/gfind
|
||||
/opt/homebrew/bin/gfind
|
||||
|
||||
$ gfind --version
|
||||
find (GNU findutils) 4.7.0
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
find (GNU findutils) 4.9.0
|
||||
Packaged by Homebrew
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
|
||||
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
|
||||
|
||||
```
|
||||
|
||||
Ajouter `PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"` et `PATH="/usr/local/opt/findutils/libexec/gnuman:$PATH"` au $PATH pour accéder aux commandes sans le préfixe **g**.
|
||||
Ajouter `PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"` et `PATH="/opt/homebrew/opt/coreutils/libexec/gnuman:$PATH"` au $PATH pour accéder aux commandes sans le préfixe **g**.
|
||||
|
||||
|
||||
|
||||
@@ -1007,6 +1074,27 @@ brew update-reset
|
||||
|
||||
|
||||
|
||||
#### 4. error: Unable to create '/opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': File exists.
|
||||
|
||||
```bash
|
||||
error: Unable to create '/opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': File exists.
|
||||
|
||||
Another git process seems to be running in this repository, e.g.
|
||||
an editor opened by 'git commit'. Please make sure all processes
|
||||
are terminated then try again. If it still fails, a git process
|
||||
may have crashed in this repository earlier:
|
||||
remove the file manually to continue.
|
||||
error: could not detach HEAD
|
||||
```
|
||||
|
||||
Pour corriger, lancer:
|
||||
|
||||
```bash
|
||||
rm /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Réinstaller Homebrew
|
||||
|
||||
```bash
|
||||
|
||||
@@ -85,8 +85,11 @@ $ nvm install 8.9.4
|
||||
# la dernière version 6
|
||||
$ nvm install 6
|
||||
|
||||
# la dernière version LTS (v10)
|
||||
$ nvm install --lts=dubnium
|
||||
# la dernière version LTS (v16)
|
||||
$ nvm install --lts=gallium
|
||||
|
||||
# la dernière version LTS (v18)
|
||||
$ nvm install --lts=hydrogen
|
||||
```
|
||||
|
||||
Mettre à jour NodeJS et réinstaller les paquets.
|
||||
@@ -100,6 +103,8 @@ Stable (LTS) version:
|
||||
nvm install lts/* --reinstall-packages-from=node
|
||||
# nvm install --lts=erbium && nvm reinstall-packages $(nvm current | sed 's/^.//')
|
||||
# nvm install --lts=erbium && nvm reinstall-packages 12.18.3
|
||||
|
||||
nvm install --lts=hydrogen --reinstall-packages-from=18.17.0
|
||||
```
|
||||
|
||||
Liste des versions de Node installées:
|
||||
@@ -149,8 +154,11 @@ v10.9.0 v8.11.4
|
||||
Version en usage:
|
||||
|
||||
```bash
|
||||
$ nvm current
|
||||
v16.17.1
|
||||
|
||||
$ node -v
|
||||
v8.11.4
|
||||
v16.17.1
|
||||
```
|
||||
|
||||
Changer de version:
|
||||
@@ -183,6 +191,23 @@ Now using node v12.20.0 (npm v6.14.8)
|
||||
# Utilise la dernière version LTS=erbium
|
||||
```
|
||||
|
||||
Alias:
|
||||
|
||||
```bash
|
||||
$ nvm alias maintenance 16.17.0
|
||||
maintenance -> 16.17.0 (-> v16.17.0)
|
||||
```
|
||||
|
||||
```bash
|
||||
$ nvm use maintenance
|
||||
Now using node v16.17.0 (npm v8.19.2)
|
||||
```
|
||||
|
||||
```bash
|
||||
$ nvm unalias maintenance
|
||||
Deleted alias maintenance - restore it with `nvm alias "maintenance" "16.17.0"`
|
||||
```
|
||||
|
||||
Changer la version par défaut (résiste à un changement de fenêtre du terminal):
|
||||
|
||||
```bash
|
||||
@@ -276,3 +301,29 @@ Entrer:
|
||||
$ nvm alias default 12
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Desinstaller nvm:
|
||||
|
||||
1. Désactiver nvm
|
||||
|
||||
```bash
|
||||
$ nvm deactivate
|
||||
```
|
||||
|
||||
2. Désinstaller nvm
|
||||
|
||||
```bash
|
||||
$ nvm unload
|
||||
```
|
||||
|
||||
3. Nettoyer .zshrc ou .bashrc
|
||||
|
||||
```bash
|
||||
# Supprimer les lignes:
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm
|
||||
```
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
# WebServer
|
||||
# Python
|
||||
|
||||
|
||||
|
||||
[Conda](conda.md)
|
||||
|
||||
[Django](Django.md)
|
||||
|
||||
[pip](pip.md)
|
||||
|
||||
[python3](python3.md)
|
||||
|
||||
[pipx](pipx.md)
|
||||
|
||||
[poetry](poetry.md)
|
||||
|
||||
[venv](virtuel.md)
|
||||
|
||||
@@ -452,6 +452,58 @@ mkdocs-tooltipster-links-plugin (0.1.0) - An MkDocs plugin
|
||||
|
||||
|
||||
|
||||
#### Connaitre toutes les versions disponibles d'un module:
|
||||
|
||||
*Depuis pypi.org avec curl:*
|
||||
|
||||
```bash
|
||||
# $ curl -L -s "https://pypi.org/pypi/<$PACKAGE>/json" | jq -r '.releases | keys | .[]' | sort -V
|
||||
|
||||
$ curl -L -s "https://pypi.org/pypi/geomet/json" | jq -r '.releases | keys | .[]' | sort -V
|
||||
0.1.0
|
||||
0.1.1
|
||||
0.1.2
|
||||
0.2.0.post2
|
||||
0.2.1
|
||||
0.2.1.post1
|
||||
0.3.0
|
||||
```
|
||||
|
||||
*pip >= 21.2*
|
||||
|
||||
```bash
|
||||
$ pip index versions geomet
|
||||
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
|
||||
geomet (0.3.0)
|
||||
Available versions: 0.3.0, 0.2.1.post1, 0.2.0.post2, 0.1.2, 0.1.1, 0.1.0
|
||||
INSTALLED: 0.3.0
|
||||
LATEST: 0.3.0
|
||||
```
|
||||
|
||||
*Précédentes versions de pip:*
|
||||
|
||||
```bash
|
||||
# en ne précisant pas la version
|
||||
$ pip install geomet==
|
||||
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
|
||||
ERROR: Ignored the following versions that require a different python version: 0.2.1 Requires-Python >2.6, !=3.3.*, <3.8
|
||||
ERROR: Could not find a version that satisfies the requirement geomet== (from versions: 0.1.0, 0.1.1, 0.1.2, 0.2.0.post2, 0.2.1.post1, 0.3.0)
|
||||
ERROR: No matching distribution found for geomet==
|
||||
```
|
||||
|
||||
```bash
|
||||
$ pip install geomet== --use-deprecated=legacy-resolver
|
||||
```
|
||||
|
||||
```bash
|
||||
# en spécifiant une version qui n'existe pas:
|
||||
$ pip install geomet==9999
|
||||
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
|
||||
ERROR: Ignored the following versions that require a different python version: 0.2.1 Requires-Python >2.6, !=3.3.*, <3.8
|
||||
ERROR: Could not find a version that satisfies the requirement geomet==9999 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.2.0.post2, 0.2.1.post1, 0.3.0)
|
||||
ERROR: No matching distribution found for geomet==9999
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Dépendances:
|
||||
|
||||
@@ -8,7 +8,7 @@ Python 3 peut s'installer avec Homebrew:
|
||||
$ brew install python3
|
||||
```
|
||||
|
||||
Les extensions Python 3 s'installent dans `/usr/local/lib/python3.7/site-packages/`
|
||||
Les extensions Python 3 s'installent dans `/usr/local/lib/python3.7/site-packages/` (Intel) ou `/opt/homebrew/lib/python3.9/site-packages/` (Arm)
|
||||
|
||||
Pour lancer un script Python 3:
|
||||
|
||||
|
||||
@@ -184,21 +184,107 @@ pipenv install requests
|
||||
|
||||
|
||||
|
||||
### Mise-à-jour de Python dans un venv
|
||||
|
||||
1. On sauvegarde les dépendances:
|
||||
|
||||
```bash
|
||||
~/venv master* ⇡
|
||||
❯ python3 -m venv rpd
|
||||
|
||||
> cd rpd
|
||||
|
||||
❯ bin/pip3 install -U pip setuptools
|
||||
|
||||
❯ cp /Users/bruno/Downloads/install.py /Users/bruno/Documents/venv/rpd
|
||||
|
||||
|
||||
|
||||
❯ source bin/activate
|
||||
~/Documents/venv mkdocs soco-cli
|
||||
|
||||
❯ source soco-cli/bin/activate
|
||||
soco-cli ❯ pip3 freeze > requirements.txt
|
||||
soco-cli ❯ deactivate
|
||||
```
|
||||
|
||||
2. On supprime le venv:
|
||||
|
||||
```bash
|
||||
❯ rm -rf soco-cli
|
||||
```
|
||||
|
||||
3. On recrée le venv (avec la version courante de python):
|
||||
|
||||
```bash
|
||||
# avec la version courante de python:
|
||||
❯ python3 -m venv soco-cli
|
||||
|
||||
# avec une version précise de python:
|
||||
❯ python3.10 -m venv soco-cli
|
||||
```
|
||||
|
||||
4. On met à jour les outils:
|
||||
|
||||
```bash
|
||||
❯ source soco-cli/bin/activate
|
||||
soco-cli ❯ pip3 install -U pip setuptools wheel
|
||||
```
|
||||
|
||||
5. On réinstalle les dépendances:
|
||||
|
||||
```bash
|
||||
soco-cli ❯ pip3 install -r requirements.txt
|
||||
soco-cli ❯ deactivate
|
||||
```
|
||||
|
||||
```
|
||||
❯ $HOME/Documents/venv/soco-cli/bin/soco -v
|
||||
soco-cli version: 0.4.52
|
||||
soco version: 0.28.0
|
||||
python version: 3.10.8
|
||||
command path: /Users/bruno/Documents/venv/soco-cli/bin/soco
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Installer LiveboxMonitor dans un venv
|
||||
|
||||
Cloner le [dépot](https://p-dor.github.io/LiveboxMonitor/):
|
||||
|
||||
```bash
|
||||
~/Downloads $ git clone https://github.com/p-dor/LiveboxMonitor.git
|
||||
```
|
||||
|
||||
Créer le venv:
|
||||
|
||||
```bash
|
||||
~/Documents/venv $ python -m venv liveboxmonitor
|
||||
```
|
||||
|
||||
Activer le venv:
|
||||
|
||||
```bash
|
||||
~/Documents/venv $ source liveboxmonitor/bin/activate
|
||||
```
|
||||
|
||||
Mettre à jour:
|
||||
|
||||
```bash
|
||||
~/Documents/venv liveboxmonitor ❯ pip3 install -U pip setuptools wheel
|
||||
Requirement already satisfied: pip in ./liveboxmonitor/lib/python3.10/site-packages (23.0)
|
||||
Requirement already satisfied: setuptools in ./liveboxmonitor/lib/python3.10/site-packages (67.2.0)
|
||||
Collecting setuptools
|
||||
```
|
||||
|
||||
Copier LiveboxMonitor dans le venv:
|
||||
|
||||
```bash
|
||||
~/Downloads/LiveboxMonitor $ cp -R * ~/Documents/venv/liveboxmonitor
|
||||
```
|
||||
|
||||
Installer les dépendances:
|
||||
|
||||
```bash
|
||||
~/Documents/venv/liveboxmonitor
|
||||
liveboxmonitor ❯ pip3 install -r requirements.txt
|
||||
Collecting PyQt6
|
||||
```
|
||||
|
||||
Créer un exécutable avec [PyInstaller](https://pyinstaller.org/en/stable/index.html):
|
||||
|
||||
```bash
|
||||
pyinstaller --paths liveboxmonitor/lib/python3.10/site-packages LiveboxMonitor.py
|
||||
|
||||
# Ne marche pas: PyQt6 est installé dans /opt/homebrew/lib
|
||||
```
|
||||
|
||||
https://stackoverflow.com/questions/55312146/how-to-include-only-needed-modules-in-pyinstaller#55312170
|
||||
|
||||
@@ -62,7 +62,11 @@ Current installation options:
|
||||
|
||||
|
||||
|
||||
### Installer kiro-editor:
|
||||
### Cargo:
|
||||
|
||||
Cargo est le gestionnaire de paquets de Rust.
|
||||
|
||||
#### Installer un paquet:
|
||||
|
||||
```bash
|
||||
$ cargo install kiro-editor
|
||||
@@ -108,3 +112,231 @@ $ cargo install kiro-editor
|
||||
|
||||
```
|
||||
|
||||
Les paquets sont installés dans `~/.cargo/bin`
|
||||
|
||||
```bash
|
||||
~/.cargo/bin 11:33:15
|
||||
❯ ls -la
|
||||
total 3492
|
||||
drwxr-xr-x 16 bruno staff 512 mai 9 2022 .
|
||||
drwxr-xr-x 8 bruno staff 256 fév 4 2022 ..
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 cargo -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 cargo-clippy -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 cargo-fmt -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 cargo-miri -> /opt/homebrew/bin/rustup-init
|
||||
-rwxr-xr-x 1 bruno staff 2483315 mai 9 2022 cavif
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 clippy-driver -> /opt/homebrew/bin/rustup-init
|
||||
-rwxr-xr-x 1 bruno staff 1088162 fév 4 2022 kiro
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rls -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rust-gdb -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rust-lldb -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rustc -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rustdoc -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rustfmt -> /opt/homebrew/bin/rustup-init
|
||||
lrwxr-xr-x 12 bruno staff 29 fév 4 2022 rustup -> /opt/homebrew/bin/rustup-init
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Chercher un paquet:
|
||||
|
||||
```bash
|
||||
$ cargo search avif
|
||||
avif = "0.0.0" # RESERVED. Open for adoption by projects that fulfill some criteria. Please see the gist in the home…
|
||||
avif-serialize = "0.7.6" # Minimal writer for AVIF header structure (MPEG/HEIF/MIAF/ISO-BMFF)
|
||||
avif-decode = "0.2.2" # Convert AVIF images to PNG or decompressed pixel data
|
||||
avif-parse = "1.0.0" # Parser for AVIF image files
|
||||
cavif = "1.4.0" # Encodes images in AVIF format (image2avif converter) using a pure-Rust encoder.
|
||||
ravif = "0.9.1" # rav1e-based pure Rust library for encoding images in AVIF format (powers the `cavif` tool)
|
||||
libavif = "0.10.1" # High-level API for AVIF image files
|
||||
libavif-image = "0.9.0" # Load AVIF files into the `image` crate
|
||||
aom-decode = "0.2.4" # Minimal safe wrapper for libaom AV1 decoder
|
||||
libavif-sys = "0.13.1" # Unsafe wrapper around libavif, the image codec
|
||||
... and 23 crates more (use --limit N to see more)
|
||||
```
|
||||
|
||||
#### Supprimer un paquet:
|
||||
|
||||
```bash
|
||||
$ cargo uninstall kiro-editor
|
||||
|
||||
Removing /Users/bruno/.cargo/bin/kiro
|
||||
```
|
||||
|
||||
#### Mettre à jour un paquet:
|
||||
|
||||
```bash
|
||||
$ cargo install <crate>
|
||||
```
|
||||
|
||||
Installe la dernière version du paquet si nécessaire, sinon ne fait rien.
|
||||
|
||||
#### Force la réinstallation:
|
||||
|
||||
-> Supprime le paquet -> télécharge la dernière version -> installe
|
||||
|
||||
```bash
|
||||
$ cargo install --force <crate>
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Liste des paquets installés:
|
||||
|
||||
```bash
|
||||
$ cargo install --list
|
||||
cavif v1.3.4:
|
||||
cavif
|
||||
kiro-editor v0.4.3:
|
||||
kiro
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cat .crates2.json | jq .
|
||||
{
|
||||
"installs": {
|
||||
"cavif 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)": {
|
||||
"version_req": null,
|
||||
"bins": [
|
||||
"cavif"
|
||||
],
|
||||
"features": [],
|
||||
"all_features": false,
|
||||
"no_default_features": false,
|
||||
"profile": "release",
|
||||
"target": "aarch64-apple-darwin",
|
||||
"rustc": "rustc 1.58.1 (db9d1b20b 2022-01-20)\nbinary: rustc\ncommit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b\ncommit-date: 2022-01-20\nhost: aarch64-apple-darwin\nrelease: 1.58.1\nLLVM version: 13.0.0\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Mettre à jour les paquets:
|
||||
|
||||
```bash
|
||||
$ cargo install $(cargo install --list | ggrep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ')
|
||||
Updating crates.io index
|
||||
Ignored package `cavif v1.4.0` is already installed, use --force to override
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
https://github.com/kbknapp/cargo-outdated
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# https://lib.rs/crates/cargo-cache
|
||||
|
||||
$ cargo install cargo-cache
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cargo cache --autoclean
|
||||
Clearing cache...
|
||||
|
||||
Cargo cache '/Users/bruno/.cargo':
|
||||
|
||||
Total: 737.91 MB => 594.18 MB
|
||||
15 installed binaries: 103.16 MB
|
||||
Registry: 634.75 MB => 491.01 MB
|
||||
Registry index: 457.35 MB
|
||||
291 crate archives: 33.67 MB
|
||||
291 => 0 crate source checkouts: 143.73 MB => 0 B
|
||||
Git db: 0 B
|
||||
0 bare git repos: 0 B
|
||||
0 git repo checkouts: 0 B
|
||||
|
||||
Size changed 737.91 MB => 594.18 MB (-143.73 MB, -19.47%)
|
||||
```
|
||||
|
||||
```bash
|
||||
$ rm -rf ~/.cargo/registry
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
# https://lib.rs/crates/cargo-prune
|
||||
|
||||
$ cargo install cargo-prune
|
||||
```
|
||||
|
||||
```bash
|
||||
$ cargo prune
|
||||
```
|
||||
|
||||
|
||||
|
||||
### rustup:
|
||||
|
||||
```bash
|
||||
$ rustup check
|
||||
stable-aarch64-apple-darwin - Update available : 1.61.0 (fe5b13d68 2022-05-18) -> 1.65.0 (897e37553 2022-11-02)
|
||||
rustup - Up to date : 1.25.1
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ rustup show
|
||||
Default host: aarch64-apple-darwin
|
||||
rustup home: /Users/bruno/.rustup
|
||||
|
||||
stable-aarch64-apple-darwin (default)
|
||||
rustc 1.61.0 (fe5b13d68 2022-05-18)
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### M-à-J de rustup (réalisée par brew):
|
||||
|
||||
```bash
|
||||
$ rustup self update
|
||||
error: self-update is disabled for this build of rustup
|
||||
error: you should probably use your system package manager to update rustup
|
||||
```
|
||||
|
||||
#### M-à-J de Rust:
|
||||
|
||||
```bash
|
||||
$ rustup update
|
||||
info: syncing channel updates for 'stable-aarch64-apple-darwin'
|
||||
info: latest update on 2022-11-03, rust version 1.65.0 (897e37553 2022-11-02)
|
||||
info: downloading component 'cargo'
|
||||
4.2 MiB / 4.2 MiB (100 %) 1.0 MiB/s in 4s ETA: 0s
|
||||
info: downloading component 'clippy'
|
||||
2.0 MiB / 2.0 MiB (100 %) 1.2 MiB/s in 1s ETA: 0s
|
||||
info: downloading component 'rust-std'
|
||||
27.6 MiB / 27.6 MiB (100 %) 1.1 MiB/s in 28s ETA: 0s
|
||||
info: downloading component 'rustc'
|
||||
52.2 MiB / 52.2 MiB (100 %) 801.6 KiB/s in 1m 7s ETA: 0s
|
||||
info: downloading component 'rustfmt'
|
||||
2.3 MiB / 2.3 MiB (100 %) 757.0 KiB/s in 3s ETA: 0s
|
||||
info: removing previous version of component 'cargo'
|
||||
info: removing previous version of component 'clippy'
|
||||
info: removing previous version of component 'rust-std'
|
||||
info: removing previous version of component 'rustc'
|
||||
info: removing previous version of component 'rustfmt'
|
||||
info: installing component 'cargo'
|
||||
info: installing component 'clippy'
|
||||
info: installing component 'rust-std'
|
||||
27.6 MiB / 27.6 MiB (100 %) 18.2 MiB/s in 1s ETA: 0s
|
||||
info: installing component 'rustc'
|
||||
52.2 MiB / 52.2 MiB (100 %) 20.9 MiB/s in 2s ETA: 0s
|
||||
info: installing component 'rustfmt'
|
||||
|
||||
stable-aarch64-apple-darwin updated - rustc 1.65.0 (897e37553 2022-11-02) (from rustc 1.61.0 (fe5b13d68 2022-05-18))
|
||||
|
||||
info: cleaning up downloads & tmp directories
|
||||
info: self-update is disabled for this build of rustup
|
||||
info: any updates to rustup will need to be fetched with your system package manager
|
||||
```
|
||||
|
||||
```bash
|
||||
$ rustup check
|
||||
stable-aarch64-apple-darwin - Up to date : 1.65.0 (897e37553 2022-11-02)
|
||||
rustup - Up to date : 1.25.1
|
||||
```
|
||||
|
||||
|
||||
51
docs/macos/terminal/mdfind.md
Normal file
51
docs/macos/terminal/mdfind.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# mdfind
|
||||
|
||||
#### find + Spotlight
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### Opérateurs logiques: AND, OR, NOT
|
||||
|
||||
|
||||
|
||||
Par nom de fichier: `name:<keyword>`
|
||||
|
||||
Par créateur: `author:<author>`
|
||||
|
||||
Par date: `date:today` (today, yesterday et tomorrow)
|
||||
|
||||
Par de création: `created:12/25/07`
|
||||
|
||||
Par date de modification: `modified:<11/30/06`
|
||||
|
||||
Par type de fichier:
|
||||
|
||||
| Aliases | kind:alias |
|
||||
| ----------------- | --------------------------------------------- |
|
||||
| Applications | kind:application, kind:applications, kind:app |
|
||||
| Audio | kind:audio |
|
||||
| Bookmarks | kind:bookmark, kind:bookmarks |
|
||||
| Browser history | kind:history |
|
||||
| Contacts | kind:contact, kind:contacts |
|
||||
| E-mail messages | kind:email, kind:emails, kind:mail message |
|
||||
| Folders | kind:folder, kind:folders, kind:fol |
|
||||
| Fonts | kind:font, kind:fonts |
|
||||
| iCal Events | kind:event, kind:events |
|
||||
| iCal To-Do Items | kind:todo, kind:todos, kind:to do |
|
||||
| Images | kind:image, kind:images |
|
||||
| JPEG files | kind:jpeg |
|
||||
| Keynote files | kind:keynote |
|
||||
| Movies | kind:movie, kind:movies |
|
||||
| MP3 files | kind:mp3 |
|
||||
| Music | kind:music |
|
||||
| Numbers documents | kind:numbers |
|
||||
| Pages documents | kind:pages |
|
||||
| PDF files | kind:pdf, kind:pdfs |
|
||||
| PowerPoint files | kind:powerpoint |
|
||||
| Preference panes | kind:preference, kind:preferences |
|
||||
| Presentations | kind:presentation, kind:presentations |
|
||||
| QuickTime files | kind:quicktime |
|
||||
| TIFF files | kind:tiff |
|
||||
| Word documents | kind:word |
|
||||
117
docs/macos/terminal/reachable.md
Normal file
117
docs/macos/terminal/reachable.md
Normal file
@@ -0,0 +1,117 @@
|
||||
# Reachable
|
||||
|
||||
### ping
|
||||
|
||||
```bash
|
||||
❯ ping -c1 -W1 -q maboiteverte.fr
|
||||
PING maboiteverte.fr (212.227.191.167): 56 data bytes
|
||||
|
||||
--- maboiteverte.fr ping statistics ---
|
||||
1 packets transmitted, 0 packets received, 100.0% packet loss
|
||||
|
||||
# immédiat
|
||||
|
||||
❯ echo $?
|
||||
0
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ ping -c1 -W1 -q clicclac.synology.me
|
||||
PING clicclac.synology.me (192.168.2.7): 56 data bytes
|
||||
|
||||
--- clicclac.synology.me ping statistics ---
|
||||
1 packets transmitted, 0 packets received, 100.0% packet loss
|
||||
|
||||
# immédiat
|
||||
|
||||
❯ echo $?
|
||||
2
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
❯ ping -c1 -W1 -q google.fr
|
||||
PING google.fr (216.58.213.67): 56 data bytes
|
||||
|
||||
--- google.fr ping statistics ---
|
||||
1 packets transmitted, 1 packets received, 0.0% packet loss
|
||||
round-trip min/avg/max/stddev = 19.936/19.936/19.936/0.000 ms
|
||||
|
||||
❯ echo $?
|
||||
0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### nmap
|
||||
|
||||
```bash
|
||||
❯ nmap maboiteverte.fr -PN -p 22 | grep open
|
||||
22/tcp open ssh
|
||||
|
||||
# immédiat
|
||||
|
||||
❯ echo $?
|
||||
0
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ nmap clicclac.synology.me -PN -p 42666 | grep open
|
||||
|
||||
# 2s
|
||||
|
||||
❯ echo $?
|
||||
1
|
||||
```
|
||||
|
||||
```bash
|
||||
if [ "$?" = 0 ]
|
||||
then
|
||||
echo "Host found"
|
||||
else
|
||||
echo "Host not found"
|
||||
fi
|
||||
```
|
||||
|
||||
|
||||
|
||||
# nc
|
||||
|
||||
```bash
|
||||
❯ nc -z -G 2 maboiteverte.fr 22
|
||||
Connection to maboiteverte.fr port 22 [tcp/ssh] succeeded!
|
||||
|
||||
# immédiat
|
||||
|
||||
❯ echo $?
|
||||
0
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ nc -z -G 2 clicclac.synology.me 42666
|
||||
|
||||
# 3s
|
||||
|
||||
❯ echo $?
|
||||
1
|
||||
```
|
||||
|
||||
|
||||
|
||||
# ssh
|
||||
|
||||
```bash
|
||||
❯ &>/dev/null ssh bruno@maboiteverte.fr true && echo "up" || echo "down"
|
||||
up
|
||||
|
||||
# 2s
|
||||
```
|
||||
|
||||
```bash
|
||||
❯ &>/dev/null ssh bruno@clicclac.synology.me true && echo "up" || echo "down"
|
||||
down
|
||||
|
||||
# long 75s
|
||||
```
|
||||
|
||||
@@ -74,6 +74,33 @@ $ xattr -d com.apple.quarantine /Users/bruno/.local/bin/convert-videos-for-plex.
|
||||
|
||||
|
||||
|
||||
#### Erreur: '/usr/bin/env : mauvais interpréteur: Operation not permitted'
|
||||
|
||||
```bash
|
||||
/usr/local/bin/kymsu2: /Users/bruno/.kymsu/plugins.d/00-kymsu.sh : /usr/bin/env : mauvais interpréteur: Operation not permitted
|
||||
```
|
||||
|
||||
```bash
|
||||
$ xattr -l 00-kymsu.sh
|
||||
com.apple.TextEncoding: UTF-8;134217984
|
||||
com.apple.lastuseddate#PS: J<><4A>b
|
||||
com.apple.provenance:
|
||||
com.apple.quarantine: 0086;62df747e;BBEdit;
|
||||
```
|
||||
|
||||
Pour supprimer la quarantaine:
|
||||
|
||||
```bash
|
||||
$ xattr -d com.apple.quarantine 00-kymsu.sh
|
||||
|
||||
$ xattr -l 00-kymsu.sh
|
||||
com.apple.TextEncoding: UTF-8;134217984
|
||||
com.apple.lastuseddate#PS: J<><4A>b
|
||||
com.apple.provenance:
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Raccourcis:
|
||||
|
||||
Aller en début de ligne: `CTRL+A`
|
||||
|
||||
82
docs/macos/terminal/trash.md
Normal file
82
docs/macos/terminal/trash.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# trash
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### trash
|
||||
|
||||
http://hasseg.org/trash/
|
||||
|
||||
```bash
|
||||
brew install trash
|
||||
```
|
||||
|
||||
```bash
|
||||
trash <file>
|
||||
```
|
||||
|
||||
|
||||
|
||||
### macos-trash
|
||||
|
||||
https://github.com/sindresorhus/macos-trash
|
||||
|
||||
```bash
|
||||
brew install macos-trash
|
||||
```
|
||||
|
||||
```bash
|
||||
trash <file>
|
||||
```
|
||||
|
||||
|
||||
|
||||
###
|
||||
|
||||
### AppleScript
|
||||
|
||||
```bash
|
||||
osascript -e "tell application \"Finder\" to delete POSIX file \"${PWD}/${InputFile}\""
|
||||
```
|
||||
|
||||
```bash
|
||||
trash() (
|
||||
: "${1:?}"
|
||||
case $1 in
|
||||
(/*) FNAME="$1" ;;
|
||||
(*) FNAME="$(pwd)/$1"
|
||||
esac
|
||||
export FNAME
|
||||
exec osascript <<-EOF >/dev/null
|
||||
set fName to system attribute "FNAME"
|
||||
tell application "Finder" to delete my (POSIX file fName)
|
||||
EOF
|
||||
)
|
||||
```
|
||||
|
||||
```bash
|
||||
function rem {
|
||||
for b in "$@"
|
||||
do
|
||||
osascript -e "tell app \"Finder\" to delete POSIX file \"${PWD}/$b\""
|
||||
done
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
trash() { mv -fv "$@" ~/.Trash/ ; }
|
||||
|
||||
#
|
||||
```
|
||||
|
||||
```
|
||||
/Volumes/Sharon/Windows ❯ trash Windows10_InsiderPreview_Client_ARM64_en-us_21354.vhdx
|
||||
copied 'Windows10_InsiderPreview_Client_ARM64_en-us_21354.vhdx' -> '/Users/bruno/.Trash/Windows10_InsiderPreview_Client_ARM64_en-us_21354.vhdx'
|
||||
removed 'Windows10_InsiderPreview_Client_ARM64_en-us_21354.vhdx'
|
||||
|
||||
/Volumes/Sharon/Windows 25s 09:06:33
|
||||
```
|
||||
|
||||
11
docs/macos/trucs.md
Normal file
11
docs/macos/trucs.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Trucs
|
||||
|
||||
|
||||
|
||||
#### Désactiver la caméra dans macOS:
|
||||
|
||||
https://github.com/rthomson/isight-disabler
|
||||
|
||||
Télécharger [camera-disabler.mobileconfig](https://github.com/rthomson/isight-disabler/blob/master/camera-disabler.mobileconfig)
|
||||
|
||||
Installer le [profile](https://support.apple.com/fr-fr/guide/profile-manager/pmdbd71ebc9/mac)
|
||||
@@ -705,8 +705,36 @@ $ brew services restart httpd
|
||||
|
||||
|
||||
|
||||
### cgi
|
||||
|
||||
```http
|
||||
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
|
||||
|
||||
<IfModule mpm_prefork_module>
|
||||
LoadModule cgi_module lib/httpd/modules/mod_cgi.so
|
||||
</IfModule>
|
||||
|
||||
# Options Indexes FollowSymLinks ExecCGI
|
||||
|
||||
ScriptAlias /cgi-bin/ "/opt/homebrew/var/www/cgi-bin/"
|
||||
|
||||
<Directory "/opt/homebrew/var/www/cgi-bin">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# AddHandler cgi-script .cgi .sh
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Liens:
|
||||
|
||||
[:fa-link: https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions](https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions)
|
||||
|
||||
[:fa-link: https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/](https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/)
|
||||
[:fa-link: https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/](https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/)
|
||||
|
||||
[:fa-link: https://httpd.apache.org/docs/2.4/howto/cgi.html](https://httpd.apache.org/docs/2.4/howto/cgi.html)
|
||||
|
||||
|
||||
@@ -6,16 +6,18 @@
|
||||
|
||||
[composer](composer.md)
|
||||
|
||||
[MySQL](mysql)
|
||||
[MySQL](mysql.md)
|
||||
|
||||
[mongodb](mongodb)
|
||||
[mongodb](mongodb.md)
|
||||
|
||||
[PHP](php.md)
|
||||
|
||||
[PHP 7.2](php72)
|
||||
|
||||
[PHP 7.3](php73.md)
|
||||
|
||||
[PHP 7.4](php74.md)
|
||||
|
||||
[PHP 8.0](php80.md)
|
||||
|
||||
[Protéger l'accès à une page par un mot-de-passe](htpasswd.md)
|
||||
|
||||
[Xhprof](Xhprof.md)
|
||||
|
||||
@@ -6,14 +6,14 @@ Mac intel:
|
||||
|
||||
```bash
|
||||
$ nano /usr/local/etc/php/7.4/php.ini
|
||||
$ nano /usr/local/etc/php/8.0/php.ini
|
||||
$ nano /usr/local/etc/php/8.2/php.ini
|
||||
```
|
||||
|
||||
Mac M1:
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/7.4/php.ini
|
||||
$ nano /opt/homebrew/etc/php/8.0/php.ini
|
||||
$ nano /opt/homebrew/etc/php/8.2/php.ini
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ $ brew link --overwrite --force php
|
||||
brew services restart shivammathur/php/php # php 8.0
|
||||
brew services restart shivammathur/php/php@7.4
|
||||
brew services restart shivammathur/php/php@8.1
|
||||
brew services restart shivammathur/php/php@8.2
|
||||
```
|
||||
|
||||
|
||||
@@ -90,7 +91,7 @@ $ php -i
|
||||
/opt/homebrew/var/log/php-fpm.log
|
||||
```
|
||||
|
||||
|
||||
/opt/homebrew/var/php_errors.log
|
||||
|
||||
### Extensions:
|
||||
|
||||
@@ -168,20 +169,47 @@ extension="/opt/homebrew/opt/imagick@8.0/imagick.so"
|
||||
|
||||
|
||||
```bash
|
||||
$ brew install memcached@8.0
|
||||
$ brew install shivammathur/extensions/memcached@8.1
|
||||
|
||||
# Fichier config
|
||||
/opt/homebrew/etc/php/7.4/conf.d/memcached.ini # M1
|
||||
/usr/local/etc/php/8.0/conf.d/memcached.ini # intel
|
||||
/opt/homebrew/etc/php/8.1/conf.d/30-memcached.ini # M1
|
||||
/usr/local/etc/php/8.1/conf.d/memcached.ini # intel
|
||||
|
||||
# Memcached dépend de 2 extensions
|
||||
/opt/homebrew/etc/php/8.1/conf.d/20-igbinary.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/20-msgpack.ini
|
||||
# qui doivent être chargées avant, d'où la priorité 20- pour igbinary et msgpack et 30- pour memcached.
|
||||
```
|
||||
|
||||
Si la priorité n'est pas respectée:
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/7.4/conf.d/memcached.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d ls
|
||||
|
||||
/opt/homebrew/etc/php/8.1/conf.d/igbinary.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/msgpack.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/memcached.ini
|
||||
```
|
||||
|
||||
on a une erreur:
|
||||
|
||||
```php
|
||||
PHP Startup: Unable to load dynamic library '/opt/homebrew/opt/memcached@8.1/memcached.so'
|
||||
symbol not found in flat namespace '_php_msgpack_serialize')
|
||||
|
||||
PHP Startup: Unable to load dynamic library '/opt/homebrew/opt/memcached@8.1/memcached.so'
|
||||
symbol not found in flat namespace '_php_igbinary_serialize')
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/8.1/conf.d/30-memcached.ini
|
||||
```
|
||||
|
||||
```php
|
||||
[memcached]
|
||||
extension="/opt/homebrew/opt/memcached@7.4/memcached.so"
|
||||
extension="/opt/homebrew/opt/memcached@78.1/memcached.so"
|
||||
```
|
||||
|
||||
|
||||
|
||||
92
docs/macos/webserver/redis.md
Normal file
92
docs/macos/webserver/redis.md
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
|
||||
# redis
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install redis
|
||||
```
|
||||
|
||||
### Redémarrer:
|
||||
|
||||
```bash
|
||||
$ brew services restart redis
|
||||
```
|
||||
|
||||
### Le fichier de config:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/etc/redis.conf
|
||||
```
|
||||
|
||||
### Tester redis:
|
||||
|
||||
```bash
|
||||
$ redis-server
|
||||
30766:C 25 Jul 2022 11:46:58.611 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
|
||||
30766:C 25 Jul 2022 11:46:58.611 # Redis version=7.0.3, bits=64, commit=00000000, modified=0, pid=30766, just started
|
||||
30766:C 25 Jul 2022 11:46:58.611 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
|
||||
30766:M 25 Jul 2022 11:46:58.612 * Increased maximum number of open files to 10032 (it was originally set to 256).
|
||||
30766:M 25 Jul 2022 11:46:58.612 * monotonic clock: POSIX clock_gettime
|
||||
_._
|
||||
_.-``__ ''-._
|
||||
_.-`` `. `_. ''-._ Redis 7.0.3 (00000000/0) 64 bit
|
||||
.-`` .-```. ```\/ _.,_ ''-._
|
||||
( ' , .-` | `, ) Running in standalone mode
|
||||
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
|
||||
| `-._ `._ / _.-' | PID: 30766
|
||||
`-._ `-._ `-./ _.-' _.-'
|
||||
|`-._`-._ `-.__.-' _.-'_.-'|
|
||||
| `-._`-._ _.-'_.-' | https://redis.io
|
||||
`-._ `-._`-.__.-'_.-' _.-'
|
||||
|`-._`-._ `-.__.-' _.-'_.-'|
|
||||
| `-._`-._ _.-'_.-' |
|
||||
`-._ `-._`-.__.-'_.-' _.-'
|
||||
`-._ `-.__.-' _.-'
|
||||
`-._ _.-'
|
||||
`-.__.-'
|
||||
|
||||
30766:M 25 Jul 2022 11:46:58.613 # WARNING: The TCP backlog setting of 511 cannot be enforced because kern.ipc.somaxconn is set to the lower value of 128.
|
||||
30766:M 25 Jul 2022 11:46:58.613 # Server initialized
|
||||
30766:M 25 Jul 2022 11:46:58.613 * Ready to accept connections
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Démarrer redis:
|
||||
|
||||
```bash
|
||||
❯ brew services start redis
|
||||
==> Successfully started `redis` (label: homebrew.mxcl.redis)
|
||||
```
|
||||
|
||||
### Si le service est actif:
|
||||
|
||||
```bash
|
||||
❯ brew services info redis
|
||||
redis (homebrew.mxcl.redis)
|
||||
Running: ✔
|
||||
Loaded: ✔
|
||||
Schedulable: ✘
|
||||
User: bruno
|
||||
PID: 31087
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Se connecter à redis:
|
||||
|
||||
```bash
|
||||
❯ redis-cli
|
||||
127.0.0.1:6379> lpush demos redis-macOS-demo
|
||||
(integer) 1
|
||||
127.0.0.1:6379> rpop demos
|
||||
"redis-macOS-demo"
|
||||
127.0.0.1:6379> ping
|
||||
PONG
|
||||
```
|
||||
|
||||
176
mkdocs.yml
176
mkdocs.yml
@@ -26,6 +26,7 @@ nav:
|
||||
- Compare: Linux/compare.md
|
||||
- Conditions: Linux/conditions.md
|
||||
- cron: Linux/cron.md
|
||||
- cut: Linux/cut.md
|
||||
- Date: Linux/date.md
|
||||
- du - df: Linux/du-df.md
|
||||
- Editeurs:
|
||||
@@ -44,12 +45,15 @@ nav:
|
||||
- grep --options (fr): Linux/grep-options-fr.md
|
||||
- grep --options (us): Linux/grep-options.md
|
||||
- kill: Linux/kill.md
|
||||
- links: Linux/links.md
|
||||
- locale: Linux/locale.md
|
||||
- Lire un fichier: Linux/read.md
|
||||
- MàJ sans internet: Linux/maj.md
|
||||
- Permissions: Linux/permissions.md
|
||||
- Pipelines: Linux/pipeline.md
|
||||
- Pushd / popd: Linux/pushd-popd.md
|
||||
- I/O Redirections: Linux/redirections.md
|
||||
- ripgrep: Linux/ripgrep.md
|
||||
- SCP: Linux/scp.md
|
||||
- SFTP: Linux/sftp.md
|
||||
- sed: Linux/sed.md
|
||||
@@ -57,6 +61,7 @@ nav:
|
||||
- SSH: Linux/ssh.md
|
||||
- Tail / Head: Linux/tail-head.md
|
||||
- Users: Linux/users.md
|
||||
- zoxide: Linux/zoxide.md
|
||||
- Divers: Linux/divers.md
|
||||
- Distributions:
|
||||
- Index: Distributions/index.md
|
||||
@@ -81,80 +86,86 @@ nav:
|
||||
- PHP: Distributions/solus/php.md
|
||||
- zsh: Distributions/solus/zsh.md
|
||||
- Update: Distributions/update.md
|
||||
- macos:
|
||||
- Index: macos/index.md
|
||||
- macOS:
|
||||
- Index: macOS/index.md
|
||||
- Divers:
|
||||
- AllToMP3: macos/Divers/AllToMP3.md
|
||||
- DeezloaderRemix: macos/Divers/DeezloaderRemix.md
|
||||
- Divers: macos/Divers/Divers.md
|
||||
- Paralles Desktop: macos/Divers/parallels.md
|
||||
- Vuepress: macos/Divers/vuepress.md
|
||||
- weasyprint: macos/Divers/weasyprint.md
|
||||
- Hackintosh: macos/Divers/Hackintosh.md
|
||||
- GPG: macos/GPG.md
|
||||
- AllToMP3: macOS/Divers/AllToMP3.md
|
||||
- DeezloaderRemix: macOS/Divers/DeezloaderRemix.md
|
||||
- Divers: macOS/Divers/Divers.md
|
||||
- Paralles Desktop: macOS/Divers/parallels.md
|
||||
- Vuepress: macOS/Divers/vuepress.md
|
||||
- weasyprint: macOS/Divers/weasyprint.md
|
||||
- Hackintosh: macOS/Divers/Hackintosh.md
|
||||
- GPG: macOS/GPG.md
|
||||
- Homebrew:
|
||||
- homebrew: macos/homebrew/brew.md
|
||||
- homebrew-cask: macos/homebrew/brew-cask.md
|
||||
- Latex: macos/Latex.md
|
||||
- Logs: macos/logs.md
|
||||
- Mail: macos/Mail.md
|
||||
- homebrew: macOS/homebrew/brew.md
|
||||
- homebrew-cask: macOS/homebrew/brew-cask.md
|
||||
- Latex: macOS/Latex.md
|
||||
- Logs: macOS/logs.md
|
||||
- Mail: macOS/Mail.md
|
||||
- Node.js:
|
||||
- Index: macos/node/index.md
|
||||
- Ghost: macos/node/ghost.md
|
||||
- node-js: macos/node/node-js.md
|
||||
- nodeenv: macos/node/nodeenv.md
|
||||
- nvm: macos/node/nvm.md
|
||||
- Index: macOS/node/index.md
|
||||
- Ghost: macOS/node/ghost.md
|
||||
- node-js: macOS/node/node-js.md
|
||||
- nodeenv: macOS/node/nodeenv.md
|
||||
- nvm: macOS/node/nvm.md
|
||||
- Perl:
|
||||
- Index: macos/perl/index.md
|
||||
- Homebrew: macos/perl/homebrew.md
|
||||
- Perlbrew: macos/perl/perlbrew.md
|
||||
- Perl: macos/perl/perl.md
|
||||
- Index: macOS/perl/index.md
|
||||
- Homebrew: macOS/perl/homebrew.md
|
||||
- Perlbrew: macOS/perl/perlbrew.md
|
||||
- Perl: macOS/perl/perl.md
|
||||
- Python:
|
||||
- Index: macos/python/index.md
|
||||
- Conda: macos/python/conda.md
|
||||
- Django: macos/python/Django.md
|
||||
- pip: macos/python/pip.md
|
||||
- pipx: macos/python/pipx.md
|
||||
- poetry: macos/python/poetry.md
|
||||
- Python 3: macos/python/python3.md
|
||||
- Environnement virtuel: macos/python/virtuel.md
|
||||
- Ruby: macos/ruby.md
|
||||
- Rust: macos/rust.md
|
||||
- Sécurité (Gatekeeper): macos/securite.md
|
||||
- Index: macOS/python/index.md
|
||||
- Conda: macOS/python/conda.md
|
||||
- Django: macOS/python/Django.md
|
||||
- pip: macOS/python/pip.md
|
||||
- pipx: macOS/python/pipx.md
|
||||
- poetry: macOS/python/poetry.md
|
||||
- Python 3: macOS/python/python3.md
|
||||
- Environnement virtuel: macOS/python/virtuel.md
|
||||
- Ruby: macOS/ruby.md
|
||||
- Rust: macOS/rust.md
|
||||
- Sécurité (Gatekeeper): macOS/securite.md
|
||||
- ssh:
|
||||
- SSH: macos/ssh/ssh.md
|
||||
- passwordless: macos/ssh/ssh-passwordless.md
|
||||
- SSH: macOS/ssh/ssh.md
|
||||
- passwordless: macOS/ssh/ssh-passwordless.md
|
||||
- Terminal:
|
||||
- alias: macos/terminal/alias.md
|
||||
- chflags: macos/terminal/chflags.md
|
||||
- Exécuter un script Bash: macos/terminal/executer_shell_script.md
|
||||
- getfileinfo - setfile: macos/terminal/getfileinfo_setfile.md
|
||||
- md5: macos/terminal/md5.md
|
||||
- open: macos/terminal/open.md
|
||||
- Shebang: macos/terminal/shebang.md
|
||||
- Terminal: macos/terminal/terminal.md
|
||||
- you have mail: macos/terminal/youhavemail.md
|
||||
- xattr: macos/terminal/xattr.md
|
||||
- Touch ID: macos/TouchID.md
|
||||
- alias: macOS/terminal/alias.md
|
||||
- chflags: macOS/terminal/chflags.md
|
||||
- Exécuter un script Bash: macOS/terminal/executer_shell_script.md
|
||||
- getfileinfo - setfile: macOS/terminal/getfileinfo_setfile.md
|
||||
- md5: macOS/terminal/md5.md
|
||||
- mdfind: macOS/terminal/mdfind.md
|
||||
- open: macOS/terminal/open.md
|
||||
- Reachable: macOS/terminal/reachable.md
|
||||
- Shebang: macOS/terminal/shebang.md
|
||||
- Terminal: macOS/terminal/terminal.md
|
||||
- Trash: macOS/terminal/trash.md
|
||||
- you have mail: macOS/terminal/youhavemail.md
|
||||
- xattr: macOS/terminal/xattr.md
|
||||
- Time Machine: macOS/TimeMachine.md
|
||||
- Touch ID: macOS/TouchID.md
|
||||
- Trucs: macOS/trucs.md
|
||||
- WebServer:
|
||||
- Index: macos/webserver/index.md
|
||||
- Apache: macos/webserver/apache.md
|
||||
- Apache (M1): macos/webserver/apache_M1.md
|
||||
- Composer: macos/webserver/composer.md
|
||||
- erreurs: macos/webserver/errors_apache.md
|
||||
- htpasswd: macos/webserver/htpasswd.md
|
||||
- mongodb: macos/webserver/mongodb.md
|
||||
- MySQL (installation): macos/webserver/install_mysql.md
|
||||
- MySQL (trucs): macos/webserver/mysql.md
|
||||
- PHP: macos/webserver/php.md
|
||||
- mod-php: macos/webserver/mod-php.md
|
||||
- php-fpm: macos/webserver/php-fpm.md
|
||||
- PHP 7.1: macos/webserver/php71.md
|
||||
- PHP 7.3: macos/webserver/php73.md
|
||||
- PHP 7.4: macos/webserver/php74.md
|
||||
- PHP 8.0: macos/webserver/php80.md
|
||||
- Xhprof: macos/webserver/Xhprof.md
|
||||
- Liens: macos/liens.md
|
||||
- Index: macOS/webserver/index.md
|
||||
- Apache: macOS/webserver/apache.md
|
||||
- Apache (M1): macOS/webserver/apache_M1.md
|
||||
- Composer: macOS/webserver/composer.md
|
||||
- erreurs: macOS/webserver/errors_apache.md
|
||||
- htpasswd: macOS/webserver/htpasswd.md
|
||||
- mongodb: macOS/webserver/mongodb.md
|
||||
- MySQL (installation): macOS/webserver/install_mysql.md
|
||||
- MySQL (trucs): macOS/webserver/mysql.md
|
||||
- PHP: macOS/webserver/php.md
|
||||
- mod-php: macOS/webserver/mod-php.md
|
||||
- php-fpm: macOS/webserver/php-fpm.md
|
||||
- PHP 7.1: macOS/webserver/php71.md
|
||||
- PHP 7.3: macOS/webserver/php73.md
|
||||
- PHP 7.4: macOS/webserver/php74.md
|
||||
- PHP 8.0: macOS/webserver/php80.md
|
||||
- redis: macOS/webserver/redis.md
|
||||
- Xhprof: macOS/webserver/Xhprof.md
|
||||
- Liens: macOS/liens.md
|
||||
- MySQL:
|
||||
- Index: MySQL/index.md
|
||||
- Backup: MySQL/Backup.md
|
||||
@@ -181,7 +192,7 @@ nav:
|
||||
- Nextcloud: Plesk/nextcloud.md
|
||||
- Nodejs: Plesk/nodejs.md
|
||||
- Programmation:
|
||||
-Python:
|
||||
- Python:
|
||||
- Index: Programmation/Python/index.md
|
||||
- Classes: Programmation/Python/class.md
|
||||
- Date: Programmation/Python/date.md
|
||||
@@ -199,6 +210,7 @@ nav:
|
||||
- Strings: Programmation/Python/string.md
|
||||
- Tuples: Programmation/Python/tuple.md
|
||||
- zip: Programmation/Python/zip.md
|
||||
- Sqlite: Programmation/Sqlite.md
|
||||
- Raspberry:
|
||||
- Index: Raspberry/index.md
|
||||
- apt-get: Raspberry/apt-get.md
|
||||
@@ -250,9 +262,11 @@ nav:
|
||||
- Gitea: Synology/dsm7/gitea.md
|
||||
- Nextcloud: Synology/dsm7/nextcloud.md
|
||||
- Node: Synology/dsm7/node.md
|
||||
- PHP: Synology/dsm7/php.md
|
||||
- Piwigo: Synology/dsm7/piwigo.md
|
||||
- Python 3: Synology/dsm7/python.md
|
||||
- Redis: Synology/dsm7/redis.md
|
||||
- Webserver (opkg): Synology/dsm7/webserver-opkg.md
|
||||
- WordPress: Synology/dsm7/wordpress.md
|
||||
- eadir: Synology/eadir.md
|
||||
- ImageMagick: Synology/ImageMagick.md
|
||||
@@ -291,14 +305,22 @@ nav:
|
||||
- Commandes: Divers/bash/commandes.md
|
||||
- direnv: Divers/bash/direnv.md
|
||||
- Exemples: Divers/bash/bash_exemples.md
|
||||
- getopts: Divers/bash/getopts.md
|
||||
- HereDoc: Divers/bash/HereDoc.md
|
||||
- image: Divers/bash/image.md
|
||||
- json: Divers/bash/json.md
|
||||
- printf: Divers/bash/printf.md
|
||||
- Programmation: Divers/bash/programmation.md
|
||||
- Regular Expression Matching: Divers/bash/rematch.md
|
||||
- Strings: Divers/bash/strings.md
|
||||
- Tableaux: Divers/bash/tableaux.md
|
||||
- Variables: Divers/bash/variables.md
|
||||
- batch:
|
||||
- Commades DOS (1): Divers/batch/Commandes_DOS.md
|
||||
- Commades DOS (2): Divers/batch/Commandes_DOS_2.md
|
||||
- Changer de shell: Divers/Changer_shell.md
|
||||
- Chromium: Divers/Chromium.md
|
||||
- Composer (php): Divers/Composer.md
|
||||
- diraction: Divers/diraction.md
|
||||
- Docker:
|
||||
- docker: Divers/docker/docker.md
|
||||
@@ -313,11 +335,22 @@ nav:
|
||||
- Synchroniser 2 dépôts: Divers/git/sync-repo.md
|
||||
- go: Divers/go.md
|
||||
- Homebridge: Divers/homebridge.md
|
||||
- images:
|
||||
- avif: Divers/images/avif.md
|
||||
- exif: Divers/images/exif.md
|
||||
- heic: Divers/images/heic.md
|
||||
- mozjpeg: Divers/images/mozjpeg.md
|
||||
- webp: Divers/images/webp.md
|
||||
- iTerm2: Divers/iTerm2.md
|
||||
- JDownloader: Divers/JDownloader.md
|
||||
- Joplin: Divers/joplin.md
|
||||
- Markdown: Divers/markdown.md
|
||||
- Nextcloud: Divers/nextcloud.md
|
||||
- Permajet:
|
||||
- Papiers Art Lisses: Divers/Permajet/Art_lisse.md
|
||||
- Papiers Art Texturés: Divers/Permajet/Art_textures.md
|
||||
- Papiers Art Baryta: Divers/Permajet/Baryta.md
|
||||
- Papiers Photo Numérique: Divers/Permajet/Photo_numerique.md
|
||||
- Plex: Divers/plex.md
|
||||
- Réseau:
|
||||
- Reseau: Divers/reseau/reseau.md
|
||||
@@ -359,6 +392,7 @@ nav:
|
||||
- OVH: Divers/wp-cli/ovh.md
|
||||
- zsh:
|
||||
- Antibody: Divers/zsh/antibody.md
|
||||
- Completion: Divers/zsh/completion.md
|
||||
- Plugins: Divers/zsh/plugins.md
|
||||
- Tools: Divers/zsh/tools.md
|
||||
- zinit: Divers/zsh/zinit.md
|
||||
@@ -417,9 +451,10 @@ markdown_extensions:
|
||||
- codehilite
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.mark
|
||||
#- material.extensions.emoji.twemoji
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
#emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
#emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
- admonition
|
||||
- pymdownx.details
|
||||
- pymdownx.keys
|
||||
@@ -428,7 +463,6 @@ markdown_extensions:
|
||||
- pymdownx.tilde
|
||||
- pymdownx.superfences
|
||||
- pymdownx.snippets
|
||||
- fontawesome_markdown
|
||||
- footnotes
|
||||
- attr_list
|
||||
- md_in_html
|
||||
@@ -444,7 +478,7 @@ extra:
|
||||
- icon: fontawesome/brands/flickr
|
||||
link: https://www.flickr.com/photos/funnymac/
|
||||
|
||||
copyright: Copyright © 2016 - 2022 Bruno Pesenti
|
||||
copyright: Copyright © 2016 - 2023 Bruno Pesenti
|
||||
|
||||
site_dir: central_docs
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ nav:
|
||||
- Conditions: Linux/conditions.md
|
||||
- cron: Linux/cron.md
|
||||
- Date: Linux/date.md
|
||||
- du - df: Linux/du-df.md
|
||||
- Editeurs:
|
||||
- index: Linux/Editeurs/index.md
|
||||
- nano: Linux/Editeurs/nano.md
|
||||
@@ -43,12 +44,14 @@ nav:
|
||||
- grep --options (fr): Linux/grep-options-fr.md
|
||||
- grep --options (us): Linux/grep-options.md
|
||||
- kill: Linux/kill.md
|
||||
- links: Linux/links.md
|
||||
- Lire un fichier: Linux/read.md
|
||||
- MàJ sans internet: Linux/maj.md
|
||||
- Permissions: Linux/permissions.md
|
||||
- Pipelines: Linux/pipeline.md
|
||||
- Pushd / popd: Linux/pushd-popd.md
|
||||
- I/O Redirections: Linux/redirections.md
|
||||
- ripgrep: Linux/ripgrep.md
|
||||
- SCP: Linux/scp.md
|
||||
- SFTP: Linux/sftp.md
|
||||
- sed: Linux/sed.md
|
||||
@@ -56,6 +59,7 @@ nav:
|
||||
- SSH: Linux/ssh.md
|
||||
- Tail / Head: Linux/tail-head.md
|
||||
- Users: Linux/users.md
|
||||
- zoxide: Linux/zoxide.md
|
||||
- Divers: Linux/divers.md
|
||||
- Distributions:
|
||||
- Index: Distributions/index.md
|
||||
@@ -80,80 +84,82 @@ nav:
|
||||
- PHP: Distributions/solus/php.md
|
||||
- zsh: Distributions/solus/zsh.md
|
||||
- Update: Distributions/update.md
|
||||
- macos:
|
||||
- Index: macos/index.md
|
||||
- macOS:
|
||||
- Index: macOS/index.md
|
||||
- Divers:
|
||||
- AllToMP3: macos/Divers/AllToMP3.md
|
||||
- DeezloaderRemix: macos/Divers/DeezloaderRemix.md
|
||||
- Divers: macos/Divers/Divers.md
|
||||
- Paralles Desktop: macos/Divers/parallels.md
|
||||
- Vuepress: macos/Divers/vuepress.md
|
||||
- weasyprint: macos/Divers/weasyprint.md
|
||||
- Hackintosh: macos/Divers/Hackintosh.md
|
||||
- GPG: macos/GPG.md
|
||||
- AllToMP3: macOS/Divers/AllToMP3.md
|
||||
- DeezloaderRemix: macOS/Divers/DeezloaderRemix.md
|
||||
- Divers: macOS/Divers/Divers.md
|
||||
- Paralles Desktop: macOS/Divers/parallels.md
|
||||
- Vuepress: macOS/Divers/vuepress.md
|
||||
- weasyprint: macOS/Divers/weasyprint.md
|
||||
- Hackintosh: macOS/Divers/Hackintosh.md
|
||||
- GPG: macOS/GPG.md
|
||||
- Homebrew:
|
||||
- homebrew: macos/homebrew/brew.md
|
||||
- homebrew-cask: macos/homebrew/brew-cask.md
|
||||
- Latex: macos/Latex.md
|
||||
- Logs: macos/logs.md
|
||||
- Mail: macos/Mail.md
|
||||
- homebrew: macOS/homebrew/brew.md
|
||||
- homebrew-cask: macOS/homebrew/brew-cask.md
|
||||
- Latex: macOS/Latex.md
|
||||
- Logs: macOS/logs.md
|
||||
- Mail: macOS/Mail.md
|
||||
- Node.js:
|
||||
- Index: macos/node/index.md
|
||||
- Ghost: macos/node/ghost.md
|
||||
- node-js: macos/node/node-js.md
|
||||
- nodeenv: macos/node/nodeenv.md
|
||||
- nvm: macos/node/nvm.md
|
||||
- Index: macOS/node/index.md
|
||||
- Ghost: macOS/node/ghost.md
|
||||
- node-js: macOS/node/node-js.md
|
||||
- nodeenv: macOS/node/nodeenv.md
|
||||
- nvm: macOS/node/nvm.md
|
||||
- Perl:
|
||||
- Index: macos/perl/index.md
|
||||
- Homebrew: macos/perl/homebrew.md
|
||||
- Perlbrew: macos/perl/perlbrew.md
|
||||
- Perl: macos/perl/perl.md
|
||||
- Index: macOS/perl/index.md
|
||||
- Homebrew: macOS/perl/homebrew.md
|
||||
- Perlbrew: macOS/perl/perlbrew.md
|
||||
- Perl: macOS/perl/perl.md
|
||||
- Python:
|
||||
- Index: macos/python/index.md
|
||||
- Conda: macos/python/conda.md
|
||||
- Django: macos/python/Django.md
|
||||
- pip: macos/python/pip.md
|
||||
- pipx: macos/python/pipx.md
|
||||
- poetry: macos/python/poetry.md
|
||||
- Python 3: macos/python/python3.md
|
||||
- Environnement virtuel: macos/python/virtuel.md
|
||||
- Ruby: macos/ruby.md
|
||||
- Rust: macos/rust.md
|
||||
- Sécurité (Gatekeeper): macos/securite.md
|
||||
- Index: macOS/python/index.md
|
||||
- Conda: macOS/python/conda.md
|
||||
- Django: macOS/python/Django.md
|
||||
- pip: macOS/python/pip.md
|
||||
- pipx: macOS/python/pipx.md
|
||||
- poetry: macOS/python/poetry.md
|
||||
- Python 3: macOS/python/python3.md
|
||||
- Environnement virtuel: macOS/python/virtuel.md
|
||||
- Ruby: macOS/ruby.md
|
||||
- Rust: macOS/rust.md
|
||||
- Sécurité (Gatekeeper): macOS/securite.md
|
||||
- ssh:
|
||||
- SSH: macos/ssh/ssh.md
|
||||
- passwordless: macos/ssh/ssh-passwordless.md
|
||||
- SSH: macOS/ssh/ssh.md
|
||||
- passwordless: macOS/ssh/ssh-passwordless.md
|
||||
- Terminal:
|
||||
- alias: macos/terminal/alias.md
|
||||
- chflags: macos/terminal/chflags.md
|
||||
- Exécuter un script Bash: macos/terminal/executer_shell_script.md
|
||||
- getfileinfo - setfile: macos/terminal/getfileinfo_setfile.md
|
||||
- md5: macos/terminal/md5.md
|
||||
- open: macos/terminal/open.md
|
||||
- Shebang: macos/terminal/shebang.md
|
||||
- Terminal: macos/terminal/terminal.md
|
||||
- you have mail: macos/terminal/youhavemail.md
|
||||
- xattr: macos/terminal/xattr.md
|
||||
- Touch ID: macos/TouchID.md
|
||||
- alias: macOS/terminal/alias.md
|
||||
- chflags: macOS/terminal/chflags.md
|
||||
- Exécuter un script Bash: macOS/terminal/executer_shell_script.md
|
||||
- getfileinfo - setfile: macOS/terminal/getfileinfo_setfile.md
|
||||
- md5: macOS/terminal/md5.md
|
||||
- mdfind: macOS/terminal/mdfind.md
|
||||
- open: macOS/terminal/open.md
|
||||
- Shebang: macOS/terminal/shebang.md
|
||||
- Terminal: macOS/terminal/terminal.md
|
||||
- you have mail: macOS/terminal/youhavemail.md
|
||||
- xattr: macOS/terminal/xattr.md
|
||||
- Touch ID: macOS/TouchID.md
|
||||
- WebServer:
|
||||
- Index: macos/webserver/index.md
|
||||
- Apache: macos/webserver/apache.md
|
||||
- Apache (M1): macos/webserver/apache_M1.md
|
||||
- Composer: macos/webserver/composer.md
|
||||
- erreurs: macos/webserver/errors_apache.md
|
||||
- htpasswd: macos/webserver/htpasswd.md
|
||||
- mongodb: macos/webserver/mongodb.md
|
||||
- MySQL (installation): macos/webserver/install_mysql.md
|
||||
- MySQL (trucs): macos/webserver/mysql.md
|
||||
- PHP: macos/webserver/php.md
|
||||
- mod-php: macos/webserver/mod-php.md
|
||||
- php-fpm: macos/webserver/php-fpm.md
|
||||
- PHP 7.1: macos/webserver/php71.md
|
||||
- PHP 7.3: macos/webserver/php73.md
|
||||
- PHP 7.4: macos/webserver/php74.md
|
||||
- PHP 8.0: macos/webserver/php80.md
|
||||
- Xhprof: macos/webserver/Xhprof.md
|
||||
- Liens: macos/liens.md
|
||||
- Index: macOS/webserver/index.md
|
||||
- Apache: macOS/webserver/apache.md
|
||||
- Apache (M1): macOS/webserver/apache_M1.md
|
||||
- Composer: macOS/webserver/composer.md
|
||||
- erreurs: macOS/webserver/errors_apache.md
|
||||
- htpasswd: macOS/webserver/htpasswd.md
|
||||
- mongodb: macOS/webserver/mongodb.md
|
||||
- MySQL (installation): macOS/webserver/install_mysql.md
|
||||
- MySQL (trucs): macOS/webserver/mysql.md
|
||||
- PHP: macOS/webserver/php.md
|
||||
- mod-php: macOS/webserver/mod-php.md
|
||||
- php-fpm: macOS/webserver/php-fpm.md
|
||||
- PHP 7.1: macOS/webserver/php71.md
|
||||
- PHP 7.3: macOS/webserver/php73.md
|
||||
- PHP 7.4: macOS/webserver/php74.md
|
||||
- PHP 8.0: macOS/webserver/php80.md
|
||||
- redis: macOS/webserver/redis.md
|
||||
- Xhprof: macOS/webserver/Xhprof.md
|
||||
- Liens: macOS/liens.md
|
||||
- MySQL:
|
||||
- Index: MySQL/index.md
|
||||
- Backup: MySQL/Backup.md
|
||||
@@ -180,7 +186,7 @@ nav:
|
||||
- Nextcloud: Plesk/nextcloud.md
|
||||
- Nodejs: Plesk/nodejs.md
|
||||
- Programmation:
|
||||
-Python:
|
||||
- Python:
|
||||
- Index: Programmation/Python/index.md
|
||||
- Classes: Programmation/Python/class.md
|
||||
- Date: Programmation/Python/date.md
|
||||
@@ -198,6 +204,7 @@ nav:
|
||||
- Strings: Programmation/Python/string.md
|
||||
- Tuples: Programmation/Python/tuple.md
|
||||
- zip: Programmation/Python/zip.md
|
||||
- Sqlite: Programmation/Sqlite.md
|
||||
- Raspberry:
|
||||
- Index: Raspberry/index.md
|
||||
- apt-get: Raspberry/apt-get.md
|
||||
@@ -249,6 +256,7 @@ nav:
|
||||
- Gitea: Synology/dsm7/gitea.md
|
||||
- Nextcloud: Synology/dsm7/nextcloud.md
|
||||
- Node: Synology/dsm7/node.md
|
||||
- PHP: Synology/dsm7/php.md
|
||||
- Piwigo: Synology/dsm7/piwigo.md
|
||||
- Python 3: Synology/dsm7/python.md
|
||||
- Redis: Synology/dsm7/redis.md
|
||||
@@ -290,6 +298,7 @@ nav:
|
||||
- Commandes: Divers/bash/commandes.md
|
||||
- direnv: Divers/bash/direnv.md
|
||||
- Exemples: Divers/bash/bash_exemples.md
|
||||
- json: Divers/bash/json.md
|
||||
- Programmation: Divers/bash/programmation.md
|
||||
- Strings: Divers/bash/strings.md
|
||||
- Tableaux: Divers/bash/tableaux.md
|
||||
@@ -298,6 +307,7 @@ nav:
|
||||
- Commades DOS (2): Divers/batch/Commandes_DOS_2.md
|
||||
- Changer de shell: Divers/Changer_shell.md
|
||||
- Chromium: Divers/Chromium.md
|
||||
- Composer (php): Divers/Composer.md
|
||||
- diraction: Divers/diraction.md
|
||||
- Docker:
|
||||
- docker: Divers/docker/docker.md
|
||||
@@ -312,11 +322,22 @@ nav:
|
||||
- Synchroniser 2 dépôts: Divers/git/sync-repo.md
|
||||
- go: Divers/go.md
|
||||
- Homebridge: Divers/homebridge.md
|
||||
- images:
|
||||
- avif: Divers/images/avif.md
|
||||
- exif: Divers/images/exif.md
|
||||
- heic: Divers/images/heic.md
|
||||
- mozjpeg: Divers/images/mozjpeg.md
|
||||
- webp: Divers/images/webp.md
|
||||
- iTerm2: Divers/iTerm2.md
|
||||
- JDownloader: Divers/JDownloader.md
|
||||
- Joplin: Divers/joplin.md
|
||||
- Markdown: Divers/markdown.md
|
||||
- Nextcloud: Divers/nextcloud.md
|
||||
- Permajet:
|
||||
- Papiers Art Lisses: Divers/Permajet/Art_lisse.md
|
||||
- Papiers Art Texturés: Divers/Permajet/Art_textures.md
|
||||
- Papiers Art Baryta: Divers/Permajet/Baryta.md
|
||||
- Papiers Photo Numérique: Divers/Permajet/Photo_numerique.md
|
||||
- Plex: Divers/plex.md
|
||||
- Réseau:
|
||||
- Reseau: Divers/reseau/reseau.md
|
||||
@@ -363,10 +384,15 @@ nav:
|
||||
- zinit: Divers/zsh/zinit.md
|
||||
- zsh: Divers/zsh/zsh.md
|
||||
- zsh2: Divers/zsh/zsh2.md
|
||||
- MkDocs: mkdocs.md
|
||||
- MkDocs:
|
||||
- Installation: MkDocs/index.md
|
||||
- Material: MkDocs/mkdocs-material.md
|
||||
- Material (2): MkDocs/mkdocs-material-2.md
|
||||
- Material (3): MkDocs/mkdocs-material-3.md
|
||||
|
||||
theme:
|
||||
name: 'material'
|
||||
custom_dir: docs/overrides
|
||||
language: 'fr'
|
||||
palette:
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
@@ -402,19 +428,31 @@ plugins:
|
||||
extra_css:
|
||||
- stylesheets/fontawesome-all.css
|
||||
- stylesheets/second_extra.css
|
||||
|
||||
extra_javascript:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.2.1/tablesort.min.js
|
||||
- javascripts/extra.js
|
||||
|
||||
markdown_extensions:
|
||||
- abbr
|
||||
- codehilite
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.mark
|
||||
- pymdownx.emoji:
|
||||
#emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
#emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
- admonition
|
||||
- pymdownx.details
|
||||
- pymdownx.keys
|
||||
- pymdownx.critic
|
||||
- pymdownx.caret
|
||||
- pymdownx.tilde
|
||||
- pymdownx.superfences
|
||||
- pymdownx.snippets
|
||||
- fontawesome_markdown
|
||||
- footnotes
|
||||
- attr_list
|
||||
- md_in_html
|
||||
- def_list
|
||||
- toc:
|
||||
permalink: true
|
||||
|
||||
Reference in New Issue
Block a user