commit e82296ba06e146776e667317fc777a668c5a7312 Author: Bruno 21 Date: Sun Sep 16 14:48:15 2018 +0200 1er commit De la docs au format Mkdocs diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 0000000..9b2e03b Binary files /dev/null and b/docs/.DS_Store differ diff --git a/docs/Divers/.DS_Store b/docs/Divers/.DS_Store new file mode 100644 index 0000000..c31c2b5 Binary files /dev/null and b/docs/Divers/.DS_Store differ diff --git a/docs/Divers/Chromium.md b/docs/Divers/Chromium.md new file mode 100644 index 0000000..35bca28 --- /dev/null +++ b/docs/Divers/Chromium.md @@ -0,0 +1,26 @@ +# Chromium + + + +**Chromium** est un navigateur Web, open source et libre, dont une partie a servi de base à l'élaboration du navigateur propriétaire (à code fermé) Google Chrome. + + + +[:fa-link: http://chromium.woolyss.com/?stb=1#mac](http://chromium.woolyss.com/?stb=1#mac) + + + +La version **No sync • No WebRTC • No Widevine** pour Windows 64bits **protège sévèrement votre vie privée** : + +- Ne comporte pas Sync : + - La clé Google API est indéfinie dans cette version, donc : + - Les services Google tels que Sync, Hotword, Translate, Now, Hangout ne fonctionnent pas. + - Vous ne serez pas en mesure de vous connecter avec votre compte Google et synchroniser vos données. + - Enfin seul ! + ​ +- Ne comporte pas WebRTC : + - Chromium ne sera pas en mesure d'utiliser l'API Real-Time Web Communication. + - Cela empêche la divulgation de votre adresse IP (via WebRTC) + ​ +- Ne comporte pas Widevine : + - Chromium ne sera pas en mesure de lire des contenus protégés par des DRM (Digital Rights Management - Gestion des droits numériques) (sur le site Netflix, par exemple). Il s'agit d'étroites collaborations entre les composants logiciels de gestion des droits numériques (protections anti-copie, protection anti-lecture, etc. ...) de tout ce qui protégé par des droits de type Copyright et droits d'auteurs, et les composants électroniques du terminal (ordinateur, tablette, smartphone, etc. ...) marqués individuellement, à leur fabrication, par des identifiants uniques infalsifiables (contrairement à un ancien marquage, mais falsifiable : la [MAC adress (Adresse MAC - Media Access Control)](http://assiste.com/MAC_Address.html)). \ No newline at end of file diff --git a/docs/Divers/Vider_cache_DNS.md b/docs/Divers/Vider_cache_DNS.md new file mode 100644 index 0000000..c9233c6 --- /dev/null +++ b/docs/Divers/Vider_cache_DNS.md @@ -0,0 +1,78 @@ +# Vider le cache DNS + + + +#### Sous Windows XP: + +S'assurer que le client DNS est démarré: + +Démarrer -> Exécuter > services.msc + +1. Etat: **démarré** +2. Type de démarrage: **automatique** + +Ouvrir une fenêtre DOS et taper: + +```bash +ipconfig /flushdns +``` + + + +#### Sous Windows 7 (et plus): + +Ouvrir une fenêtre DOS et taper: + +```bash +ipconfig /flushdns +``` + + + +#### Sous OS X 10.12 (Sierra): + +```bash +#sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache +``` + +#### SousOS X 10.11 (El Capitan): + +```bash + #sudo killall -HUP mDNSResponder +``` + +#### SousOS X 10.10 (Yosemite): + +```bash +#sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder +``` + +#### Sous OSX 10.10.1, 10.10.2, 10.10.3: + +```bash +#sudo discoveryutil udnsflushcaches +``` + +#### Sous OS X 10.9 (Mavericks): + +```bash +#dscacheutil -flushcache; sudo killall -HUP mDNSResponder +``` + +#### Sous OS X 10.7 (Lion) and 10.8 (Mountain Lion): + +```bash +#sudo killall -HUP mDNSResponder +``` + +#### Sous OS X 10.5 (Leopard) and 10.6 (Snow Leopard): + +```bash +#dscacheutil -flushcache +``` + +#### Sous OS X 10.4 (Tiger): + +```bash +#lookupd -flushcache +``` diff --git a/docs/Divers/batch/Commandes_DOS.md b/docs/Divers/batch/Commandes_DOS.md new file mode 100644 index 0000000..73cbc81 --- /dev/null +++ b/docs/Divers/batch/Commandes_DOS.md @@ -0,0 +1,175 @@ +# Commandes DOS + + + +ASSOC Affiche ou modifie les applications associées aux extensions de fichiers. + +ATTRIB Affiche ou modifie les attributs d'un fichier. + +BREAK Active ou désactive le contrôle étendu de CTRL+C. + +BCDEDIT Définit les propriétés dans la base de données de démarrage pour le contrôle du chargement d'amorçage. + +CACLS Affiche ou modifie les listes de contrôles d'accès aux fichiers. + +CALL Appelle un fichier de commandes à partir d'un autre fichier de commandes. + +CD Modifie le répertoire ou affiche le répertoire actif. + +CHCP Modifie ou affiche le numéro de la page de code active. + +CHDIR Modifie le répertoire ou affiche le nom du répertoire actif. + +CHKDSK Vérifie un disque et affiche un rapport d'état. + +CHKNTFS Affiche ou modifie la vérification du disque au démarrage. + +CLS Efface l'écran. + +CMD Exécute une nouvelle instance de l'interpréteur de commandes de Windows. + +COLOR Modifie les couleurs du premier plan et de l'arrière-plan de la console. + +COMP Compare les contenus de deux fichiers ou groupes de fichiers. + +COMPACT Modifie ou affiche la compression des fichiers sur une partition NTFS. + +CONVERT Convertit des volumes FAT en volumes NTFS. Vous ne pouvez pas convertir le lecteur en cours d'utilisation. + +COPY Copie un ou plusieurs fichiers. + +DATE Affiche ou définit la date. + +DEL Supprime un ou plusieurs fichiers. + +DIR Affiche la liste des fichiers et des sous-répertoires d'un répertoire. + +DISKCOMP Compare les contenus de deux disquettes. + +DISKCOPY Copie le contenu d'une disquette sur une autre. + +DISKPART Affiche ou configure les propriétés d'une partition de disque. + +DOSKEY Modifie les lignes de commande, rappelle des commandes Windows, et crée des macros. + +DRIVERQUERY Affiche l'état et les propriétés du pilote de périphérique en cours d'utilisation. + +ECHO Affiche des messages ou active/désactive l'affichage des commandes. + +ENDLOCAL Stoppe la localisation des modifications d'environnement dans un fichier de commandes. + +ERASE Supprime un ou plusieurs fichiers. + +EXIT Quitte l'interpréteur de commandes (CMD.EXE). + +FC Compare deux fichiers ou groupes de fichiers et affiche les différences. + +FIND Recherche une chaîne de caractères dans un ou plusieurs fichiers. + +FINDSTR Cherche des chaînes dans les fichiers. + +FOR Exécute une commande sur chaque fichier d'un ensemble de fichiers. + +FORMAT Formate un disque devant être utilisé avec Windows. + +FSUTIL Affiche ou configure les propriétés du système de fichiers. + +FTYPE Affiche ou modifie les types de fichiers utilisés dans les associations d'extensions. + +GOTO Indique l'exécution d'un fichier de commandes pour une ligne identifiée par une étiquette. + +GPRESULT Affiche les informations de stratégie de groupe pour un ordinateur ou un utilisateur. + +GRAFTABL Permet à Windows d'afficher un jeu de caractères en mode graphique. + +HELP Affiche des informations sur les commandes de Windows. + +ICACLS Afficher, modifier, sauvegarder ou restaurer les listes de contrôle d'accès pour les fichiers et les répertoires. + +IF Effectue un traitement conditionnel dans un fichier de commandes. + +LABEL Crée, modifie ou supprime le nom de volume d'un disque. + +MD Crée un répertoire. + +MKDIR Crée un répertoire. + +MKLINK Créer des liens symboliques et des liens réels + +MODE Configure un périphérique du système. + +MORE Affiche la sortie écran par écran. + +MOVE Déplace un ou plusieurs fichiers d'un répertoire à un autre. + +OPENFILES Affiche les fichiers partagés ouverts à distance par les utilisateurs. + +PATH Affiche ou définit le chemin de recherche des fichiers exécutables. + +PAUSE Interrompt l'exécution d'un fichier de commandes et affiche un message. + +POPD Restaure la valeur précédente du répertoire actif enregistrée par PUSHD. + +PRINT Imprime un fichier texte. + +PROMPT Modifie l'invite de commande de Windows. + +PUSHD Enregistre le répertoire actif puis le modifie. + +RD Supprime un répertoire. + +RECOVER Récupère l'information lisible d'un disque défectueux. + +REM Insère un commentaire dans un fichier de commandes ou CONFIG.SYS. + +REN Renomme un ou plusieurs fichiers. + +RENAME Renomme un ou plusieurs fichiers. + +REPLACE Remplace des fichiers. + +RMDIR Supprime un répertoire. + +ROBOCOPY Utilitaire avancé pour copier les fichiers et les arborescences de répertoires + +SET Affiche, définit ou supprime des variables d'environnement Windows. + +SETLOCAL Commence la localisation des modifications d'environnement dans un fichier de commandes. + +SC Affiche ou configure les services (processus en arrière-plan). + +SCHTASKS Planifie les commandes et les programmes à exécuter sur l'ordinateur. + +SHIFT Modifie la position des paramètres remplaçables dans un fichier de commandes. + +SHUTDOWN Permet un arrêt local ou distant correct de l'ordinateur. + +SORT Trie les entrées. + +START Ouvre une fenêtre séparée pour l'exécution d'un programme ou d'une commande spécifique. + +SUBST Associe un chemin d'accès à une lettre de lecteur. + +SYSTEMINFO Affiche les propriétés et la configuration spécifiques de l'ordinateur. + +TASKLIST Affiche toutes les tâches en cours d'exécution, y compris les services. + +TASKKILL Termine ou interrompt un processus ou une application en cours d'exécution. + +TIME Affiche ou définit l'heure du système. + +TITLE Définit le titre de la fenêtre pour une session CMD.EXE. + +TREE Affiche le graphisme de la structure de répertoire d'un lecteur ou d'un chemin d'accès. + +TYPE Affiche le contenu d'un fichier texte. + +VER Affiche la version de Windows. + +VERIFY Demande à Windows de vérifier si vos fichiers sont correctement écrits sur le disque. + +VOL Affiche le nom et le numéro de série d'un volume de disque. + +XCOPY Copie les fichiers et les arborescences de répertoires. + +WMIC Affiche les informations WMI dans l'interface de commande interactive. \ No newline at end of file diff --git a/docs/Divers/batch/Commandes_DOS_2.md b/docs/Divers/batch/Commandes_DOS_2.md new file mode 100644 index 0000000..0a8e773 --- /dev/null +++ b/docs/Divers/batch/Commandes_DOS_2.md @@ -0,0 +1,157 @@ +# Commandes DOS (suite) + + + +%WINDIR%\SYSTEM32\RESTORE\RSTRUI.EXE : ouvre l'outil de restauration de système (Pour XP uniquement). +ACCESS.CPL : ouvre les options d'accessibilité (Pour XP uniquement) +APPWIZ.CPL : ouvre l'outil Ajouter/Supprimer un programme +AZMAN.MSC : ouvre le gestionnaire d'autorisations (Pour Vista uniquement) +CALC : ouvre la calculatrice +CERTMGR.MSC : ouvre les certificats pour l'utilisateur actuel +CHARMAP : ouvre la table des caractères +CLICONFG : ouvre la configuration des clients SQL +CLIPBRD : ouvre le presse papier (Pour XP uniquement +CMD : ouvre l'invite de commandes +COLLAB.CPL : ouvre le voisinage immédiat (Pour Vista uniquement) +COMEXP.MSC ou bien DCOMCNFG : ouvre l'outil services et composants (Pour Vista uniquement) +COMPMGMT.MSC : ouvre l'outil de gestion de l'ordinateur +COMPUTERDEFAULTS : ouvrir l'outil des programmes par défaut (Pour Vista uniquement) +CONTROL /NAME MICROSOFT.BACKUPANDRESTORECENTER : ouvre le centre de sauvegarde et de restauration (Pour Vista uniquement). Tutoriel ICI +CONTROL : ouvre le panneau de configuration +CONTROL ADMINTOOLS : ouvre les outils d'administrations +CONTROL COLOR : ouvre les paramètres de l'apparence +CONTROL FOLDERS : ouvre les options de dossiers +CONTROL FONTS : ouvre le gestionnaire de polices +CONTROL INTERNATIONAL ou bien INTL.CPL : ouvre les options régionales et linguistiques +CONTROL KEYBOARD : ouvre les propriétés du clavier +CONTROL MOUSE ou bien MAIN.CPL : ouvre les propriétés de la souris +CONTROL PRINTERS : ouvre les imprimantes et les fax disponibles +CONTROL USERPASSWORDS : ouvre l'éditeur des comptes utilisateurs +CONTROL USERPASSWORDS2 ou bien NETPLWIZ : contrôle les utilisateurs et leurs accès +CREDWIZ : ouvre l'outil de sauvegarde et restauration des mots de passe des utilisateurs (Pour Vista uniquement) +DESK.CPL : ouvre les paramètres d'affichage +DEVMGMT.MSC : ouvre les gestionnaire de périphériques. Tutoriel ICI +DIALER : ouvre le numérateur téléphonique de Windows +DRWTSN32 : ouvre Dr. Watson (Pour XP uniquement) +DVDPLAY : ouvre votre lecteur DVD +DXDIAG : ouvre l'outil de diagnostic DirectX +EUDCEDIT : ouvre l'éditeur de caractères privés +EVENTVWR ou bien EVENTVWR.MSC : ouvre l'observateur d'évènements +EXPLORER : ouvre l'explorateur Windows +FSMGMT.MSC : ouvre les dossiers partagés +FSQUIRT : Assistant transfert Bluetooth +GPEDIT.MSC : ouvre l'éditeur des stratégies de groupe (Pour les éditions professionnelles et plus de Windows) +HDWWIZ.CPL : ouvre l'assistant ajout de matériels +IEXPLORE : ouvre Internet Explorer +IEXPRESS : ouvre l'assistant de création des archives auto-extractibles. +INFOCARDCPL.CPL : ouvre l'assistant compatibilité des programmes +IRPROPS.CPL : ouvre le gestionnaire d'infrarouge +ISCSICPL : ouvre l'outil de configuration de l'initiateur ISCI Microsoft (Pour Vista uniquement) +JOURNAL : ouvre un nouveau journal (Pour Vista uniquement) +JOY.CPL : ouvre l'outil de contrôleur de jeu +LPKSETUP : ouvre l'assistant d'installation et désinstallation des langues d'affichage (Pour Vista uniquement) +LUSRMGR.MSC : ouvre l'éditeur des utilisateurs et groupes locaux +MAGNIFY : ouvre la loupe +MBLCTR : ouvre le centre de mobilité de Windows (Pour Vista uniquement) +MDSCHED : ouvre l'outil de diagnostics de la mémoire Windows (Pour Vista uniquement) +MIGWIZ : ouvre l'outil de transfert de fichiers et de paramètres Windows (Pour Vista uniquement) +MIGWIZ.EXE : ouvre l'outil de transfert de fichiers et de paramètres Windows (pour XP uniquement) +MMC : ouvre une nouvelle console vide +MMSYS.CPL : ouvre les paramètres de sons +MOBSYNC : ouvre le centre de synchronisation +MOVIEMK : ouvre Windows Movie Maker +MRT : lance l'utilitaire de suppression de logiciel malveillant. +MSCONFIG : ouvre l'outil de configuration du système +MSDT : ouvre l'outil de diagnostics et support Microsoft +MSINFO32 : ouvre les informations système +MSPAINT : ouvre Paint +MSRA : ouvre l'assistance à distance Windows +MSTSC : ouvre l'outil de connexion du bureau a distance +NAPCLCFG.MSC : ouvre l'outil de configuration du client NAP (Pour Vista uniquement) +NOTEPAD : ouvre le bloc-notes +NTMSMGR.MSC : ouvre le gestionnaire des supports de stockage amovibles +NTMSOPRQ.MSC : ouvre les demandes de l'opérateur de stockage amovible +ODBCAD32 : ouvre l'administrateur de sources de données ODBC +OPTIONALFEATURES : ouvre l'outil Ajouter/Supprimer des composants Windows (Pour Vista uniquement) +OSK : ouvre le clavier visuel. +PERFMON ou bien PERFMON.MSC : ouvre le moniteur de fiabilité et de performances Windows. +POWERCFG.CPL : ouvre le gestionnaire des modes d'alimentation (Pour Vista uniquement) +PRINTBRMUI : ouvre l'assistant de migration d'imprimante (Vista uniquement) +REGEDIT ou bien REGEDT32 (Pour Vista uniquement) : ouvre l'éditeur de registre +REKEYWIZ : ouvre le gestionnaire des certificats de chiffrement de fichiers (Pour Vista uniquement) +RSOP.MSC : ouvre le jeu de stratégie résultant +RSTRUI : ouvre l'outil de restauration du système (Pour Vista uniquement) +SECPOL.MSC : ouvre les paramètres de sécurités locales +SERVICES.MSC : ouvre le gestionnaire de services +SIDEBAR : ouvre le volet Windows (Pour Vista uniquement) +SIGVERIF : ouvre l'outil de vérification des signatures de fichiers +SLUI : ouvre l'assistant d'activation de Windows (Pour Vista uniquement) +SNDVOL : ouvre le mélangeur de volume +SNIPPINGTOOL : ouvre l'outil capture d'écran (Pour Vista uniquement). +SOUNDRECORDER : ouvre le magnétophone +STIKYNOT : ouvre le pense-bête (Pour Vista uniquement) +SYSDM.CPL : ouvre les propriétés système +SYSEDIT : ouvre l'éditeur de configuration système (Attention, à manipuler avec prudence) +SYSKEY : ouvre l'utilitaire de protection de la base de données des comptes Windows (Attention, à manipuler avec extrême prudence !) +SYSPREP: ouvre le dossier contenant l'outil de préparation du système (Pour Vista uniquement) +TABLETPC.CPL : ouvre les paramètres pour Tablet pc (Pour Vista uniquement) +TABTIP : ouvre le panneau de saisie Tablet PC (Pour Vista uniquement) +TASKMGR : ouvre le gestionnaire des tâches Windows +TASKSCHD.MSC ou bien CONTROL SCHEDTASKS : ouvre le planificateur de tâches (Pour Vista uniquement) +TELEPHON.CPL : ouvre l'outil de connexion téléphonique +TIMEDATE.CPL : ouvre les paramètres de l'heure et de la date +TPM.MSC : ouvre l'outil gestion de module de plateforme sécurisée sur l'ordinateur local (Pour Vista uniquement) +UTILMAN : ouvre les options d'ergonomie (Pour Vista uniquement) +VERIFIER : ouvre le gestionnaire de vérification des pilotes +WAB : ouvre les contacts (Pour Vista uniquement) +WERCON : ouvre l'outil de rapports et de solutions aux problèmes (Pour Vista uniquement) +WINCAL : ouvre le calendrier Windows (Pour Vista uniquement) +WINCHAT : ouvre le logiciel Microsoft de chat en réseau (Pour Windows XP uniquement) +WINDOWSANYTIMEUPGRADE : permet la mise à niveau de Windows Vista +WINVER : ouvre la fenêtre pour connaître votre version Windows +WINWORD: ouvre Word (si il est installé) +WMIMGMT.MSC : ouvre Windows Management Infrastructure +WMPLAYER : ouvre le lecteur Windows Media +WRITE ou bien Wordpad : ouvre Wordpad +WSCUI.CPL : ouvre le centre de sécurité Windows +WUAUCPL.CPL : ouvre le service de mise à jour Windows (Pour XP uniquement) + +Gestion des disques +CHKDSK : effectue une analyse de la partition précisée dans les paramètres de la commande (Pour plus d'informations, tapez CHKDSK /? dans l'invite de commande CMD) +CLEANMGR : ouvre l'outil de nettoyage de disque +DEFRAG: Défragmente le disque dur +DFRG.MSC : ouvre l'outil de défragmentation de disque +DISKMGMT.MSC : ouvre le gestionnaire de disques +DISKPART : ouvre l'outil de partitionnement + +Gestion des réseaux et Internet +CONTROL NETCONNECTIONS ou bien NCPA.CPL : ouvre les connexions réseau +FIREWALL.CPL : ouvre le pare-feu Windows +INETCPL.CPL : ouvre les propriétés internet +IPCONFIG : affiche les configurations des adresses IP sur l'ordinateur (Pour plus d'informations, tapez IPCONFIG /? dans l'invite de commande CMD) +NETSETUP.CPL : ouvre l'assistant configuration réseau (Pour XP uniquement) +WF.MSC : ouvre les fonctions avancées du pare-feu Windows (Pour Vista uniquement). + +Autres commandes +%HOMEDRIVE% : ouvre l'explorateur sur la partition ou le système d'exploitation est installé +%HOMEPATH% : ouvre le dossier d'utilisateur connecté actuellement C:\Documents and settings\[nom d'utilisateur] +%PROGRAMFILES% : ouvre le dossier d'installation d'autres programmes (Program Files) +%TEMP% ou bien %TMP% : ouvre le dossier temporaire +%USERPROFILE% : ouvre le dossier du profil de l'utilisateur connecté actuellement +%WINDIR% ou bien %SYSTEMROOT% : ouvre le dossier d'installation de Windows +%WINDIR%\system32\rundll32.exe shell32.dll,Control_RunDLL hotplug.dll : affiche la fenêtre "Supprimer le périphérique en toute sécurité" +AC3FILTER.CPL : ouvre les propriétés du filtre AC3 (Si installé) +FIREFOX : lance Mozilla FireFox (Si installé) +JAVAWS : Visualise le cache du logiciel JAVA (Si installé) +LOGOFF : ferme la session actuelle +NETPROJ : autorise ou pas la connexion à un projecteur réseau (Pour Vista uniquement) +Vérificateur des fichiers système (Nécessite un CD de Windows si le cache n'est pas disponible): (Tutoriel ICI) +SFC /SCANNOW : scanne immédiatement tous les fichiers système et répare les fichiers endommagés +SFC /VERIFYONLY : scanne seulement les fichiers système +SFC /SCANFILE="nom et chemin de fichier" : scanne le fichier précisé, et le répare s'il est endommagé +SFC /VERIFYFILE="nom et chemin de fichier" : scanne seulement le fichier précisé +SFC /SCANONCE : scanne les fichiers système au prochain redémarrage +SFC /REVERT : remet la configuration initiale (Pour plus d'informations, tapez SFC /? dans l'invite de commande CMD. +SHUTDOWN : éteint Windows +SHUTDOWN -A : interrompe l'arrêt de Windows +VSP1CLN : supprime le cache d'installation du service pack 1 de Vista \ No newline at end of file diff --git a/docs/Divers/git/git-session.md b/docs/Divers/git/git-session.md new file mode 100644 index 0000000..71ccdab --- /dev/null +++ b/docs/Divers/git/git-session.md @@ -0,0 +1,249 @@ +# Session de travail avec GIT + + + +I. On développe dans la branche **master**. + +=> HEAD pointe sur la branche **master** + +Penser à valider la copie de travail avant de changer de branche. + +```bash +$ git commit -a -m 'validation' +``` + + + +II. On bascule dans la branche prob53 que l'on crée en même temps. + +```bash +$ git checkout -b prob53 +Switched to a new branch "prob53" +``` + +=> HEAD pointe sur la branche **prob53** + + + +III. On réalise une modification ... + +```bash +$ vim index.html +$ git commit -a -m 'ajout d'un pied de page [problème 53]' +``` + +… avant de retourner dans la branche **master**: + +```bash +$ git checkout master +Switched to branch "master" +``` + +=> HEAD pointe sur la branche **master** + + + +IV. On a un correctif à réaliser. On crée donc une nouvelle branche **correctif**: + +```bash +$ git checkout -b 'correctif' +Switched to a new branch "correctif" +``` + +On réalise le correctif: + +```bash +$ vim index.html +$ git commit -a -m "correction d'une adresse mail incorrecte" +[correctif]: created 3a0874c: "correction d'une adresse mail incorrecte" + 1 files changed, 0 insertions(+), 1 deletions(-) +``` + +=> HEAD pointe sur la branche **correctif** + + + +V. On réalise des tests sur le projet pour s'assurer que la correction est efficace. + +Si tout est ok, il est temps de la fusionner dans la branche **master** pour la déployer en production: + +```bash +$ git checkout master +$ git merge correctif +Updating f42c576..3a0874c +Fast forward + LISEZMOI | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) +``` + +=> HEAD pointe sur la branche **master** + +*Git a réalisé un Fast forward* + + + +VI. **master** et **correctif** pointent sur le même commit, on peut supprimer la branche **correctif**: + +```bash +$ git branch -d correctif +Deleted branch correctif (3a0874c). +``` + + + +VII. On rebascule sur la branche **prob53** pour continuer à travailler sur le problème: + +```bash +$ git checkout prob53 +Switched to branch "prob53" +$ vim index.html +$ git commit -a -m 'Nouveau pied de page terminé [problème 53]' +[prob53]: created ad82d7a: "Nouveau pied de page terminé [problème 53]" + 1 files changed, 1 insertions(+), 0 deletions(-) +``` + +=> HEAD pointe sur la branche prob53 + +*Les travaux réalisés dans correctif ne sont pas contenu dans les fichiers de la branche **prob53**.* +Si vous avez besoin de les y rapatrier, vous pouvez fusionner la branche master dans la branche **prob53** en lançant la commande `git merge master`. + + + +VIII. ... suite du développement ... + + + +IX. Les travaux sur la branche **prob53** sont terminés et prêt à être fusionnés avec **master**: + +```bash +$ git checkout master +$ git merge prob53 +Merge made by recursive. + README | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) +``` + +=> HEAD pointe sur la branche **master** + +*Git a réalisé une simple fusion à trois sources et créer un commit de fusion.* + + + +X. Le travail a été fusionné, on n'a plus besoin de la branche **prob53**. On peut l'effacer et fermer manuellement le ticket dans l'outil de suivi de faits techniques: + +```bash +$ git branch -d prob53 +``` + + + +### APPENDIX: + +#### Conflits: + +Si on modifie différemment la même partie du même fichier dans les deux branches que l'on souhaite fusionner, Git ne sera pas capable de réaliser proprement la fusion. + +```bash +$ git merge prob53 +Auto-merging index.html +CONFLICT (content): Merge conflict in index.html +Automatic merge failed; fix conflicts and then commit the result. +``` + +Git n'a pas automatiquement créé le *commit* du fusion. + +Il a arrêté le processus le temps que vous résolviez le conflit. Lancez `git status` pour voir à tout moment après l'apparition du conflit de fusion quels fichiers n'ont pas été fusionnés : + +```bash +[master*]$ git status +index.html: needs merge +# On branch master +# Changes not staged for commit: +# (use "git add ..." to update what will be committed) +# (use "git checkout -- ..." to discard changes in working directory) +# +# unmerged: index.html +# +``` + +Tout ce qui comporte des conflits de fusion et n'a pas été résolu est listé comme `unmerged`. + + + +Git ajoute des marques de conflit standard dans les fichiers qui comportent des conflits: + +```html +<<<<<<< HEAD:index.html + +======= + +>>>>>>> prob53:index.html +``` + +Au-dessus de la ligne ======= : version dans HEAD (master) + +Au-dessous de la ligne ======= : version dans prob53 + +```html + +``` + +… résout le conflit. + + + +Après avoir résolu chacune de ces sections dans chaque fichier comportant un conflit, lancez `git add` sur chaque fichier pour le marquer comme résolu. + +Si vous souhaitez utiliser un outil graphique pour résoudre ces problèmes, vous pouvez lancer `git mergetool` qui démarre l'outil graphique de fusion approprié et vous permet de naviguer dans les conflits : + +```bash +$ git mergetool + +This message is displayed because 'merge.tool' is not configured. +See 'git mergetool --tool-help' or 'git help config' for more details. +'git mergetool' will now attempt to use one of the following tools: +opendiff kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse diffmerge ecmerge p4merge araxis bc3 codecompare vimdiff emerge +Merging: +index.html + +Normal merge conflict for 'index.html': + {local}: modified file + {remote}: modified file +Hit return to start merge resolution tool (opendiff): +``` + + + +Après avoir quitté l'outil de fusion, Git vous demande si la fusion a été réussie. Si vous répondez par la positive à l'outil, il indexe le fichier pour le marquer comme résolu. + +Vous pouvez lancer à nouveau la commande `git status` pour vérifier que tous les conflits ont été résolus : + +```bash +$ git status +# On branch master +# Changes to be committed: +# (use "git reset HEAD ..." to unstage) +# +# modified: index.html +# +``` + +Si cela vous convient et que vous avez vérifié que tout ce qui comportait un conflit a été indexé, vous pouvez taper la commande `git commit` pour finaliser le *commit* de fusion. + +```bash +Merge branch 'prob53' + +Conflicts: + index.html +# +# It looks like you may be committing a MERGE. +# If this is not correct, please remove the file +# .git/MERGE_HEAD +# and try again. +# +``` + diff --git a/docs/Divers/git/git.md b/docs/Divers/git/git.md new file mode 100644 index 0000000..0c673f8 --- /dev/null +++ b/docs/Divers/git/git.md @@ -0,0 +1,377 @@ +# git + +### Créer un repo git + +Sur le serveur (DS916), aller dans le dossier Repo: + +```bash +dsm916> cd /volume1/Repositories/ + +dsm916> git init –-bare wp2012.git +``` + + + +Sur le client (Mac), se mettre dans le dossier source: + +```bash +bruno@macbook-pro:~/ git init + +bruno@macbook-pro:~/ git remote -v + +bruno@macbook-pro:~/ git remote add origin ssh:dsm916/volume1/Repositories/wp2012.git +bruno@macbook-pro:~/ git remote add origin bruno@dsm916:/volume1/Repositories/wp2012.git + +bruno@macbook-pro:~/ git add * + +bruno@macbook-pro:~/ git commit -m "Created my repo" + +bruno@macbook-pro:~/ git push –-all origin +``` + + + +ssh:dsm916/volume1/Repositories/shell_scripts.git + + + +### Démarrage: + +Les fichiers peuvent avoir 3 états: + +1. Validé signifie que les données sont stockées en sécurité dans votre base de données locale. +2. Modifié signifie que vous avez modifié le fichier mais qu'il n'a pas encore été validé en base. +3. Indexé signifie que vous avez marqué un fichier modifié dans sa version actuelle pour qu'il fasse partie du prochain instantané du projet. + +Ce qui induit les 3 sections d'un projey git: + +1. Le répertoire Git est l'endroit où Git stocke les méta-données et la base de données des objets de votre projet. C'est la partie la plus importante de Git, et c'est ce qui est copié lorsque vous clonez un dépôt depuis un autre ordinateur. +2. Le répertoire de travail (working copy) est une extraction unique d'une version du projet. Ces fichiers sont extraits depuis la base de données compressée dans le répertoire Git et placés sur le disque pour pouvoir être utilisés ou modifiés. +3. La zone d'index est un simple fichier, généralement situé dans le répertoire Git, qui stocke les informations concernant ce qui fera partie du prochain instantané. + + + +#### Fichier de config: + +Pour l'utilisateur: `~/.gitconfig` + +#### Configurer git: + +```bash +$ git config --global user.name "Bruno 21" + +# --global Pour l'utilisateur (~/.gitconfig) +# paramètres: user.email, core.editor, merge.tool + +$ git config --list +credential.helper=osxkeychain +user.name=Bruno 21 +user.email=bruno@clicclac.info +filter.lfs.clean=git-lfs clean -- %f +filter.lfs.smudge=git-lfs smudge -- %f +filter.lfs.process=git-lfs filter-process +filter.lfs.required=true +``` + +#### Aide git: + +```bash +$ git help +$ git --help +$ man git- + +$ git help config +``` + + + +### Démarrer un dépôt Git: + +#### [Initialisation d'un dépôt Git dans un répertoire existant](https://git-scm.com/book/fr/v1/Les-bases-de-Git-D%C3%A9marrer-un-d%C3%A9p%C3%B4t-Git#Initialisation-d'un-d%C3%A9p%C3%B4t-Git-dans-un-r%C3%A9pertoire-existant) + +Se placer dans le répertoire: + +```bash +$ git init +``` + +Ajouter les fichiers à suivre: + +```bash +$ git add *.php +``` + +Valider: + +```bash +$ git commit –m 'version initiale du projet' +``` + + + +#### [Cloner un dépôt existant:](https://git-scm.com/book/fr/v1/Les-bases-de-Git-D%C3%A9marrer-un-d%C3%A9p%C3%B4t-Git#Cloner-un-d%C3%A9p%C3%B4t-existant) + +```bash +$ git clone git://github.com/depot/projet.git +``` + +Crée un répertoire grit contenant les données du dépôt ainsi qu'un répertoire .git + +```bash +$ git clone git://github.com/depot/projet.git mondossier +``` + +Crée un clone du depot dans le dossier mondossier + + + +### Enregistrer des modifications dans le dépôt: + +#### [Vérifier l'état des fichiers](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#V%C3%A9rifier-l'%C3%A9tat-des-fichiers) + +```bash +$ git status +On branch master +Your branch is ahead of 'origin/master' by 1 commit. + (use "git push" to publish your local commits) + +nothing to commit, working tree clean +``` + +1 commit en attente de push. + + + +#### [Placer de nouveaux fichiers sous suivi de version](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#Placer-de-nouveaux-fichiers-sous-suivi-de-version) + +```bash +$ git add LISEZMOI +``` + + + +#### [Ignorer des fichiers](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#Ignorer-des-fichiers) + +Les fichiers ajoutés à .gitignore ne seront pas sous suivi de version. + +```bash +$ cat .gitignore +.DS_STore +``` + + + +#### [Inspecter les modifications indexées et non indexées](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#Inspecter-les-modifications-index%C3%A9es-et-non-index%C3%A9es) + +Pour visualiser ce qui a été modifié mais pas encore indexé, tapez: + +```bash +$ git diff +``` + + + +#### [Valider vos modifications](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#Valider-vos-modifications) + +```bash +$ git commit +``` + +Ouvre l'éditeur de texte pour renseigner le message de validation. + +```bash +$ git commit -m "Correction d'un bug" +``` + +Le message est dans la commande. + +```bash +$ git commit -a -m "Correction d'un bug" +``` + +Ordonne à Git de placer automatiquement tout fichier déjà en suivi de version dans la zone d'index avant de réaliser la validation, évitant ainsi d'avoir à taper les commandes `git add` + + + +#### [Effacer des fichiers](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#Effacer-des-fichiers) + +```bash +$ git rm LISEZMOI +``` + + + +#### [Déplacer des fichiers](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Enregistrer-des-modifications-dans-le-d%C3%A9p%C3%B4t#D%C3%A9placer-des-fichiers) + +```bash +$ git mv nom_origine nom_cible +``` + + + +### Visualiser l'historique des validations: + +```bash +$ git log + +# -p montre les différences entre chaque validation +# -2 les deux entrées les plus récentes + +$ git log --pretty=format:"%h - %an, %ar : %s" + +``` + + + +### Annuler des actions: + +#### [Modifier le dernier *commit*](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Annuler-des-actions#Modifier-le-dernier-commit) + +```bash +$ git commit -m 'validation initiale' +$ git add fichier_oublie +$ git commit --amend +``` + + + +#### [Désindexer un fichier déjà indexé](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Annuler-des-actions#D%C3%A9sindexer-un-fichier-d%C3%A9j%C3%A0-index%C3%A9) + +```bash +$ git reset HEAD benchmarks.rb +$ git status +``` + + + +#### [Réinitialiser un fichier modifié](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Annuler-des-actions#R%C3%A9initialiser-un-fichier-modifi%C3%A9) + +Ramener le fichier à son état du dernier instantané (ou lors du clonage, ou dans l'état dans lequel vous l'avez obtenu dans votre copie de travail) + +```bash +$ git checkout -- benchmarks.rb +$ git status +``` + + + +### Dépot distants: + +#### [Afficher les dépôts distants](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Travailler-avec-des-d%C3%A9p%C3%B4ts-distants#Afficher-les-d%C3%A9p%C3%B4ts-distants) + +```bash +$ git remote -v +``` + +#### [Récupérer et tirer depuis des dépôts distants](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Travailler-avec-des-d%C3%A9p%C3%B4ts-distants#R%C3%A9cup%C3%A9rer-et-tirer-depuis-des-d%C3%A9p%C3%B4ts-distants) + +```bash +$ git fetch [nom-distant] +``` + +#### [Pousser son travail sur un dépôt distant](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Travailler-avec-des-d%C3%A9p%C3%B4ts-distants#Pousser-son-travail-sur-un-d%C3%A9p%C3%B4t-distant) + +```bash +$ git push origin master +``` + +#### [Inspecter un dépôt distant](https://git-scm.com/book/fr/v1/Les-bases-de-Git-Travailler-avec-des-d%C3%A9p%C3%B4ts-distants#Inspecter-un-d%C3%A9p%C3%B4t-distant) + +```bash +$ git remote show origin +``` + + + +### Etiquettes: + +#### Lister les étiquettes + +```bash +$ git tag + +$ git tag -l 'v1.4.2.*' +``` + +#### Créer des étiquettes annotées + +```bash +$ git tag -a v1.4 -m 'my version 1.4' + +# -a étiquette +# -m message d'étiquetage +``` + +../.. + + + +### Branches: + +https://git-scm.com/book/fr/v1/Les-branches-avec-Git-Ce-qu-est-une-branche + +#### Gérer les branches + +```bash +$ git branch # Permet de lister les branches +$ git branch -v # Visualiser les dernières validations sur chaque branche +$ git branch # Permet de créer une nouvelle branche +$ git branch -m # Renomme la branche courante en +$ git branch -d # Permet de supprimer une branche +$ git branch -D # Supprime la branche même si elle n'a pas été fusionnée +$ git branch --merged # Quelles branches ont déjà été fusionnées dans votre branche actuelle ? +$ git branch --no-merged # Branches qui contiennent des travaux qui n'ont pas encore été fusionnés +``` + +**master** est la branche par défaut. + +**HEAD** est un pointeur qui indique la branche courante. + +`$ git branch ` crée une nouvelle branche mais ne fait pas basculer la copie de travail vers celle-ci. + + + +#### Passer d'une branche à l'autre + +```bash +$ git checkout +$ git checkout -b # sauter sur une branche qui n'existe pas en la créant au préalable +``` + +Le pointeur **HEAD** pointe désormais sur + +La copie de travail a basculée sur la nouvelle branche: + +- la nouvelle branche pointera sur les nouveaux commit +- la branche **master** pointera sur le dernier commit au moment du checkout. + + + +#### Fusionner les branches + +Merge permet de ramener une branche sur une autre et ainsi de la fusionner. La fusion de 2 branche se fait toujours à partir de la branche principale. + +- La branche "source" sera affectée en récupérant l'historique de la branche ou un commit de fusion +- La branche fusionnée ne sera pas affectée + +```bash +$ git merge +``` + +https://git-scm.com/book/fr/v1/Les-branches-avec-Git-Brancher-et-fusionner%C2%A0%3A-les-bases + + + +#### Les branches distantes + + + +#### Rebaser + + + +#### => [Session de travail avec git](git-session.md) <= + + + +http://www.ntu.edu.sg/home/ehchua/programming/howto/Git_HowTo.html \ No newline at end of file diff --git a/docs/Divers/git/index.md b/docs/Divers/git/index.md new file mode 100644 index 0000000..f279354 --- /dev/null +++ b/docs/Divers/git/index.md @@ -0,0 +1,8 @@ +# Divers + + + +[git](git.md) + +[Session de travail avec git](git-session.md) + diff --git a/docs/Divers/go.md b/docs/Divers/go.md new file mode 100644 index 0000000..3643586 --- /dev/null +++ b/docs/Divers/go.md @@ -0,0 +1,131 @@ +# go + +[The Go Programming Language](https://golang.org/) + + + +### Installation + +```bash +$ brew install go +``` + +et ajouter le chemin de l'installation au $PATH + +```bash +export PATH=$PATH:/usr/local/opt/go/libexec/bin +``` + + + +### Créer un workspace: + +Par défaut: $HOME/go + +Sinon: + +```bash +$ mkdir $HOME/Documents/go +``` + +puis créer 2 sous-dossiers: + +```bash +# programmes +$ mkdir $HOME/Documents/go/bin + +# sources +$ mkdir $HOME/Documents/go/src + +``` + +Ajouter les 2 variables d'environnement à .bash_profile + +```bash +export GOPATH=$HOME/Documents/go +export GOBIN=$HOME/Documents/go/bin +``` + +Ajouter les dossiers des exécutables au $PATH + +```bash +export PATH=$PATH:$(go env GOPATH)/bin +``` + + + +```bash +$ go env +GOARCH="amd64" +GOBIN="/Users/xxx/Documents/go/bin" +GOCACHE="/Users/xxx/Library/Caches/go-build" +GOEXE="" +GOHOSTARCH="amd64" +GOHOSTOS="darwin" +GOOS="darwin" +GOPATH="/Users/xxx/Documents/go" +GORACE="" +GOROOT="/usr/local/Cellar/go/1.10.3/libexec" +GOTMPDIR="" +GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64" +GCCGO="gccgo" +CC="clang" +CXX="clang++" +CGO_ENABLED="1" +CGO_CFLAGS="-g -O2" +CGO_CPPFLAGS="" +CGO_CXXFLAGS="-g -O2" +CGO_FFLAGS="-g -O2" +CGO_LDFLAGS="-g -O2" +PKG_CONFIG="pkg-config" +GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s5/zy63nf3953sb_4k0ppcy16sw0000gn/T/go-build083426751=/tmp/go-build -gno-record-gcc-switches -fno-common" +``` + + + +### Créer une application: + +Dans le dossier **src**, créer un nouveau dossier pour l'application **hello**: + +```bash +$ mkdir $GOPATH/src/hello + +$ cd $GOPATH/src/hello +``` + +Créer un fichier **hello.go** pour l'application + +```bash +$ cat hello.go +package main + +import "fmt" + +func main() { + fmt.Printf("hello, world\n") + } + +``` + +Le compiler: + +```bash +$ go build + +# crée un executable 'hello' +``` + +L'installer: + +```bash +$ go install + +# déplacer l'exécutable dans le dossier bin +``` + +ou la supprimer + +```bash +$ go clean -i +``` + diff --git a/docs/Divers/index.md b/docs/Divers/index.md new file mode 100644 index 0000000..b55e56f --- /dev/null +++ b/docs/Divers/index.md @@ -0,0 +1,16 @@ +# Divers + + + +[Chromium](Chromium.md) + +[git](git/index.md) + +[plex](plex.md) + +[Vider le cache DNS](Vider_cache_DNS.md) + +[wp-cli](wp-cli/index.md) + + + diff --git a/docs/Divers/plex.md b/docs/Divers/plex.md new file mode 100644 index 0000000..aa77264 --- /dev/null +++ b/docs/Divers/plex.md @@ -0,0 +1,168 @@ +# Plex + +### Réinstaller une ancienne version de PMS: + + - arrêter le serveur + - désinstaller Plex (la bibliothèque /Plex/Library n'est pas effacée) + - installer Plex + +### Bibliothèque Plex: + + +`/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db` + +`-rwx------+ 1 plex users 36980736 Jan 1 15:17 com.plexapp.plugins.library.db` +`` + +### Plex Plugins Folder Locations: + +**Windows** +`%LOCALAPPDATA%\Plex Media Server\Plug-Ins\` + +**Mac OS X** +`~\Library\Application Support\Plex Media Server\Plug-Ins\` + +**Linux** +`$PLEX_HOME\Library\Application Support\Plex Media Server\Plug-Ins` + +**QNAP (Network Attached Storage)** +`/root/library/Plex Media Server/Plug-ins` + +**ReadyNAS ROS6** +`apps/plexmediaserver/Medialibrary/Plex Media Server/Plug-ins` + +**Seagate** +`sudo rainbow -enter com.plex.plexmediaserver` +`/data/plex_conf/Library/Application\Support/Plex\ Media\ Server/Plug-Ins` + +**Synology** +`/Volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins` + +cd /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins + +**Western Digital** +`/mnt/HD/HD_a2/plex_conf/Plex Media Server/Plug-Ins` + +**Western Digital Wireless Pro** +`.wdcache/.Plexmediaserver/Plex Media Server/Plug-ins` + + + +### Installer un plug-in IPTV: + +1. Télécharger [IPTV.bundle](https://github.com/Cigaras/IPTV.bundle) ([wiki](https://github.com/Cigaras/IPTV.bundle/wiki)) + +2. Copier l'archive dans le dossier Plug-ins + + ``` + $ scp -r -P 42666 markdown.txt bruno@clicclac.synology.me:/volume1/web + $ ssh dsm916e + $ sudo -i + # mv /volume1/web/markdown.txt /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins + ``` + +3. Extraire, puis vérifier permissions et users + + ``` + # cd /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins + # unzip IPTV.bundle.zip + # mv IPTV.bundle.master IPTV.bundle + # chmod 700 -R IPTV.bundle + # chown plex:users -R IPTV.bundle + ``` + +4. Relancer Plex Server + +5. Importer une [playlist](https://github.com/Cigaras/IPTV.bundle/wiki/Playlist) + + +Création de la playlist [m3u](https://it-tuto.com/kodiopenelec-preparer-playlist-m3u-kodi-iptv/) +Forum [plex](https://forums.plex.tv/discussion/83083/rel-iptv-bundle-plug-in-that-plays-iptv-streams-from-a-m3u-playlist/p1) +Plug-in [MultiPlex](https://github.com/JayTheHatWearer/MultiPLEX.bundle) + + + +### Installer WebTools: + +[WebTools](https://github.com/ukdtom/WebTools.bundle) est un plug-in Plex qui regroupe plusieurs outils pour Plex, dont l'UAS (Unsupported AppStore). + +Le paquet pour NAS Synology se trouve [ici](https://github.com/ukdtom/WTInstaller/releases/latest). + +WebTools se lance depuis [DSM](http://192.168.1.7:33400/#!/uas) (et pas depuis Plex) + + + +### Installer WebGrabPlus: + +1. Installer [:fa-link: mono](http://www.mono-project.com): + + ```bash + $ brew install mono + ``` + +2. Télécharger [WebGrabPlus pour linux](http://webgrabplus.com/download) et le dernier [SiteIni.Pack](http://webgrabplus.com/epg-channels) + +3. Installer WebGrabPlus: + +```bash + $ cd ~ + $ tar -zxvf WebGrabPlus_V2.1_install.tar.gz +``` + +4. Finir l'installation: + + ```bash + $ cd .wg++/ + $ ./install.sh + ``` + +5. [Configurer WebGrabPlus](http://webgrabplus.com/documentation/configuration/webgrabconfigxml): + + ```bash + $ edit WebGrab++.config.xml + ``` + +6. Mettre à jour le dossier *siteini.pack*: + + ```bash + $ ./bin/SiteIni.Pack.Update.sh + ``` + +7. Exécuter le programme: + + ```bash + $ ./run.sh + ``` + +8. Envoyer le fichier *guide.xml* sur le serveur: + + ```bash + bruno@SilverBook:~/.wg++$ scp guide.xml funnymac@ftp.cluster011.ovh.net:www/guide.xml + funnymac@ftp.cluster011.ovh.net's password: + guide.xml 100% 2792KB 92.8KB/s 00:30 + ``` + + ​ + +### Logs: + +Réglages -> Serveur -> Aide -> Télécharger les logs + +Pour les logs des plug-ins, aller directement sur le serveur: + +`/volume1/Plex/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs` + + + + + +### Liens: + +[:fa-link: Plex Synology FAQ](https://forums.plex.tv/discussion/191000/faqs-read-this-first#latest) + +[:fa-link: Plex For Apple TV](https://forums.plex.tv/categories/plex-for-apple-tv) + +[:fa-link: Plex Downloads](https://plex.tv/downloads?channel=plexpass) + +[:fa-link: Remettre à Zéro un plug-in](https://github.com/ukdtom/WebTools.bundle/wiki/Reset) + diff --git a/docs/Divers/wp-cli/Installation.md b/docs/Divers/wp-cli/Installation.md new file mode 100644 index 0000000..7d62176 --- /dev/null +++ b/docs/Divers/wp-cli/Installation.md @@ -0,0 +1,137 @@ +# Installation + + + +### 1. Installer wp-cli sur osx + +```bash +$ brew install wp-cli +``` + + + +#### Installer le script [**wp-cli bash completion**](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) + +- Télécharger le script et le copier dans le dossier Home +- Ajouter source ~/wp-completion.bash au .bash_profile + +```bash +echo "source ~/wp-completion.bash" >> .bash_profile +``` + + +Taper wp pour voir la liste des commandes disponibles. + + + +### 2. Installer wp-cli sur ovh mutualisé + +Télécharger le fichier **wp-cli.phar** +https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +L'envoyer sur ovh dans `/opt/bin` +puis + +```bash +chmod +x wp-cli.phar +ln -s wp-cli.phar wp +``` + +Aller dans le dossier wordpress pour tester wp-cli + +```bash +cd ~/www/wordpress +~/www/wordpress $ wp plugin list ++---------------------------------------------+----------+-----------+---------+ +| name | status | update | version | ++---------------------------------------------+----------+-----------+---------+ +| add-from-server | inactive | none | 3.3.3 | +| admin-post-navigation | active | none | 2.1 | +| akismet | active | none | 4.0.8 | +| wp-retina-2x-pro | active | available | 5.2.9 | +| wp-super-cache | inactive | none | 1.6.3 | +| wordpress-seo | active | none | 7.9.1 | ++---------------------------------------------+----------+-----------+---------+ +``` + + + +### 3. Installer wp-cli sur un NAS Synology + +```bash +# !/usr/bin/env bash + +# Télécharger +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar + +# Test +php wp-cli.phar --info + +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +# Test +wp --info +``` + + + +Par défaut, wp se lance avec php 5.6 (d'origine Synology). + +```bash +$ wp --info +OS: Linux DS916 3.10.105 #23739 SMP Tue Jul 10 00:16:03 CST 2018 x86_64 +Shell: /opt/bin/bash +PHP binary: /usr/bin/php +PHP version: 5.6.11 +php.ini used: /etc/php/php.ini +WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli +WP-CLI vendor dir: phar://wp-cli.phar/vendor +WP_CLI phar path: /usr/local/bin +WP-CLI packages dir: +WP-CLI global config: +WP-CLI project config: +WP-CLI version: 2.0.0 +``` + + + +Pour le lancer avec PHP70 (paquet Synology), + +- Créer un script **wp.sh** dans `/usr/local/bin` +- Ajouter le contenu suivant: + +```bash +#!/bin/bash + +# Running wp-cli on Synology NAS + +# Add '-d extension=phar.so' to use wp-cli.phar with php70. No needed with php or php56 +php70 -d extension=phar.so wp-cli.phar $* +``` + +- Rendre le script exécutable et le renommer: + +```bash +$ chmod +X wp.sh + +$ mv wp.sh wp +``` + +- Utilisation: + +```bash +$ wp --info +OS: Linux 3.10.105 #23739 SMP Tue Jul 10 00:16:03 CST 2018 x86_64 +Shell: /opt/bin/bash +PHP binary: /volume1/@appstore/PHP7.0/usr/local/bin/php70 +PHP version: 7.0.30 +php.ini used: /usr/local/etc/php70/php.ini +WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli +WP-CLI vendor dir: phar://wp-cli.phar/vendor +WP_CLI phar path: /usr/local/bin +WP-CLI packages dir: +WP-CLI global config: +WP-CLI project config: +WP-CLI version: 2.0.0 +``` + diff --git a/docs/Divers/wp-cli/autres.md b/docs/Divers/wp-cli/autres.md new file mode 100644 index 0000000..fccca6f --- /dev/null +++ b/docs/Divers/wp-cli/autres.md @@ -0,0 +1,99 @@ +# Autres commandes + + + +wp super-cache + +Cette commande nécessite l'installation du package wp-cli/wp-super-cache-cli + +```bash +$ wp package install wp-cli/wp-super-cache-cli +``` + +Aide: + +```bash +$ wp super-cache --help +``` + +```bash +NAME + + wp super-cache + +DESCRIPTION + + Manages the WP Super Cache plugin + +SYNOPSIS + + wp super-cache + +SUBCOMMANDS + + disable Disable the WP Super Cache. + enable Enable the WP Super Cache. + flush Clear something from the cache. + preload Primes the cache by creating static pages before users visit them + status Get the status of the cache. +``` + + + +Lancer le cron immédiatement: + +```bash +$ wp cron event run --due-now +``` + +Liste des crons: + +```bash +$ wp cron event list ++------------------------------------+---------------------+-----------------------+---------------+ +| hook | next_run_gmt | next_run_relative | recurrence | ++------------------------------------+---------------------+-----------------------+---------------+ +| wp_cache_gc | 2018-08-13 19:00:37 | 2 minutes 43 seconds | Non-repeating | +| wp_privacy_delete_old_export_files | 2018-08-13 19:50:32 | 52 minutes 38 seconds | 1 heure | +| wp_update_plugins | 2018-08-13 20:19:43 | 1 heure 21 minutes | 12 heures | +| wp_update_themes | 2018-08-13 20:19:43 | 1 heure 21 minutes | 12 heures | +| wp_version_check | 2018-08-13 20:19:43 | 1 heure 21 minutes | 12 heures | +| delete_expired_transients | 2018-08-14 06:15:04 | 11 heures 17 minutes | 1 jour | +| wp_scheduled_delete | 2018-08-14 08:20:11 | 13 heures 22 minutes | 1 jour | +| wp_scheduled_auto_draft_delete | 2018-08-14 08:27:44 | 13 heures 29 minutes | 1 jour | +| wpseo-reindex-links | 2018-08-14 12:18:00 | 17 heures 20 minutes | 1 jour | +| wp_cache_full_preload_hook | 2018-08-17 11:53:06 | 3 jours 16 heures | Non-repeating | ++------------------------------------+---------------------+-----------------------+---------------+ +``` + + + +Changer l'URL de WordPress: + +```bash +$ wp option update home 'http://example.com' +$ wp option update siteurl 'http://example.com' +``` + + + +Supprimer les transients expirés: + +```bash +$ wp transient delete --expired +``` + +Vider le cache: + +```bash +$ wp cache flush +``` + +Ajouter les 2 dernières à la crontab: + +```bash +crontab -e +@daily sudo -u www-data wp transient delete --expired +@daily sudo -u www-data wp cache flush +``` + diff --git a/docs/Divers/wp-cli/index.md b/docs/Divers/wp-cli/index.md new file mode 100644 index 0000000..2011aba --- /dev/null +++ b/docs/Divers/wp-cli/index.md @@ -0,0 +1,133 @@ +# wp-cli + +WP-CLI est un outil en ligne de commande pour interagir et gérer des sites WordPress. + +[Installer wp-cli](Installation.md) + + + +Version: + +```bash +$ wp --version +WP-CLI 2.0.0 +``` + +Aide: + +```bash +$wp help +``` + +```bash +NAME + + wp + +DESCRIPTION + + Manage WordPress through the command-line. + +SYNOPSIS + + wp + +SUBCOMMANDS + + cache Adds, removes, fetches, and flushes the WP Object Cache object. + cap Adds, removes, and lists capabilities of a user role. + cli Review current WP-CLI info, check for updates, or see defined aliases. + comment Creates, updates, deletes, and moderates comments. + config Generates and reads the wp-config.php file. + core Downloads, installs, updates, and manages a WordPress installation. + cron Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules. + db Performs basic database operations using credentials stored in wp- config.php. + embed Inspects oEmbed providers, clears embed cache, and more. + eval Executes arbitrary PHP code. + eval-file Loads and executes a PHP file. + export Exports WordPress content to a WXR file. + help Get help on WP-CLI, or on a specific command. + i18n Provides internationalization tools for WordPress projects. + import Imports content from a given WXR file. + language Installs, activates, and manages language packs. + media Imports files as attachments, regenerates thumbnails, or lists registered image sizes. + menu Lists, creates, assigns, and deletes the active theme's navigation menus. + network Perform network-wide operations. + option Retrieves and sets site options, including plugin and WordPress settings. + package Lists, installs, and removes WP-CLI packages. + plugin Manages plugins, including installs, activations, and updates. + post Manages posts, content, and meta. + post-type Retrieves details on the site's registered post types. + rewrite Lists or flushes the site's rewrite rules, updates the permalink structure. + role Manages user roles, including creating new roles and resetting to defaults. + scaffold Generates code for post types, taxonomies, plugins, child themes, etc. + search-replace Searches/replaces strings in the database. + server Launches PHP's built-in web server for a specific WordPress installation. + shell Opens an interactive PHP console for running and testing PHP code. + sidebar Lists registered sidebars. + site Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation. + super-admin Lists, adds, or removes super admin users on a multisite installation. + super-cache Manages the WP Super Cache plugin + taxonomy Retrieves information about registered taxonomies. + term Manages taxonomy terms and term meta, with create, delete, and list commands. + theme Manages themes, including installs, activations, and updates. + transient Adds, gets, and deletes entries in the WordPress Transient Cache. + user Manages users, along with their roles, capabilities, and meta. + widget Manages widgets, including adding and moving them within sidebars. + yoast Control the Yoast SEO plugin through the command line. + +``` + + + +- [wp cli](wp_cli.md) +- [wp comment](wp_comment.md) +- [wp config](wp_config.md) +- [wp core](wp_core.md) +- [wp db](wp_db.md) +- [wp language](wp_language.md) +- [wp media](wp_media.md) +- [wp package](wp_package.md) +- [wp plugin](wp_plugin.md) +- [wp post](wp_post.md) +- [wp revisions](wp_revisions.md) +- [wp scaffold](wp_scaffold.md) +- [wp search-replace](wp_search-replace.md) +- [wp site](wp_site.md) +- [wp theme](wp_theme.md) +- [wp user](wp_user.md) +- [autres](autres.md) + + + +Paramètres globaux (même comportement pour toutes les commandes): + +| **Argument** | **Description** | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of “docker”, “docker-compose”, “vagrant”). | +| `--http=` | Perform operation against a remote WordPress install over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | + + + +Scénarios: + +[Installer ou mettre à jour WordPress](scenarios.md) + + + +Liens: + +https://www.hongkiat.com/blog/wordpress-command-line/ +https://www.siteground.com/tutorials/wordpress/wp-cli/ +https://code.tutsplus.com/tutorials/what-is-wp-cli-a-beginners-guide--cms-28649 \ No newline at end of file diff --git a/docs/Divers/wp-cli/scenarios.md b/docs/Divers/wp-cli/scenarios.md new file mode 100644 index 0000000..a7b1ef3 --- /dev/null +++ b/docs/Divers/wp-cli/scenarios.md @@ -0,0 +1,86 @@ +# Scenarios + + + +### Installer WordPress: + +```bash +# Télécharger WordPress: +$ wp core download --locale=fr_FR +Downloading WordPress 4.9.8 (fr_FR)... +md5 hash verified: dc365d9f51eaf1cf99562d159754a5e9 +Success: WordPress downloaded. + +# Créer le fichier de config (wp-config.php): +#$ wp config create --dbname=testdb --dbuser=wp --dbpass=yourpassword +$ wp core config --dbname=databasename --dbuser=databaseuser --dbpass=databasepassword --dbhost=localhost --dbprefix=prfx_ + +# Avec Des options supplémentaires: +$ wp core config --dbname=wordpress5 --dbuser=www --dbpass=zzz --dbhost=localhost --dbprefix=wp5_ --extra-php < SELECT @@character_set_database, @@collation_database; ++--------------------------+----------------------+ +| @@character_set_database | @@collation_database | ++--------------------------+----------------------+ +| utf8 | utf8_general_ci | ++--------------------------+----------------------+ +1 row in set (0.000 sec) + +# Installer WordPress: +$ wp core install --url=silverbook.local --title="WordPress Silverbook" --admin_user=bruno --admin_password=xxxxxxxx --admin_email="bruno@xxx.yyy" +Success: WordPress installed successfully. + +# Changement de la structure des liens pour ne conserver que le nom de l'article +$ wp rewrite structure '/%postname%' + +# Liste les thèmes trouvable dans l'installation +$ wp theme list + +# Installer un thème: +$ wp theme install twentyseventeen + +# Activer le thème: +$ wp theme activate twentyseventeen + +# Installer et activer les plugins: +$ wp plugin install admin-post-navigation jetpack meow-lightbox simple-tags sola-newsletters wp-retina-2x-pro wp-super-cache --activate + +``` + + + +### Mettre-à-jour WordPress: + +```bash +Vérifier si des MAJ sont disponibles ? +$ wp core check-update + +Mettre à jour WordPress: +$ wp core update + +Mettre à jour la bdd: +$ wp core update-db + +Vérifier si des MAJ de plugins sont disponibles ? +$ wp plugin update --all --dry-run + +Mettre à jour tous les plugins: +$ wp plugin update --all + +Vérifier si des MAJ de themes sont disponibles ? +$ wp theme update --all --dry-run + +Mettre à jour tous les themes: +$ wp theme update --all +``` + diff --git a/docs/Divers/wp-cli/wp_cli.md b/docs/Divers/wp-cli/wp_cli.md new file mode 100644 index 0000000..2eda611 --- /dev/null +++ b/docs/Divers/wp-cli/wp_cli.md @@ -0,0 +1,74 @@ +# wp cli + +Aide: + +```bash +$ wp help cli +``` + +```bash +NAME + + wp cli + +DESCRIPTION + + Review current WP-CLI info, check for updates, or see defined aliases. + +SYNOPSIS + + wp cli + +SUBCOMMANDS + + alias List available WP-CLI aliases. + check-update Check to see if there is a newer version of WP-CLI available. + cmd-dump Dump the list of installed commands, as JSON. + completions Generate tab completion strings. + has-command Detects if a command exists + info Print various details about the WP-CLI environment. + param-dump Dump the list of global parameters, as JSON or in var_export format. + update Update WP-CLI to the latest release. + version Print WP-CLI version. +``` + +Version: + +```bash +$ wp cli version +WP-CLI 2.0.0 +``` + +Vérifier les mises-à-jour: + +```bash +$ wp cli check-update +Success: WP-CLI is at the latest version. +``` + +Mettre-à-jour WP-CLI + +```bash +$ wp cli update +Success: WP-CLI is at the latest version. +``` + +Info: + +```bash +$ wp cli info +OS: Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64 +Shell: /bin/bash +PHP binary: /usr/local/Cellar/php/7.2.8/bin/php +PHP version: 7.2.8 +php.ini used: /usr/local/etc/php/7.2/php.ini +WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli +WP-CLI vendor dir: phar://wp-cli.phar/vendor +WP_CLI phar path: /Users/bruno/Sites/wordpress +WP-CLI packages dir: +WP-CLI global config: +WP-CLI project config: +WP-CLI version: 2.0.0 +``` + + diff --git a/docs/Divers/wp-cli/wp_comment.md b/docs/Divers/wp-cli/wp_comment.md new file mode 100644 index 0000000..a0b5106 --- /dev/null +++ b/docs/Divers/wp-cli/wp_comment.md @@ -0,0 +1,141 @@ +# wp comment + +Aide: + +```bash +$ wp help comment +``` + +```bash +NAME + + wp comment + +DESCRIPTION + + Creates, updates, deletes, and moderates comments. + +SYNOPSIS + + wp comment + +SUBCOMMANDS + + approve Approves a comment. + count Counts comments, on whole blog or on a given post. + create Creates a new comment. + delete Deletes a comment. + exists Verifies whether a comment exists. + generate Generates some number of new dummy comments. + get Gets the data of a single comment. + list Gets a list of comments. + meta Adds, updates, deletes, and lists comment custom fields. + recount Recalculates the comment_count value for one or more posts. + spam Marks a comment as spam. + status Gets the status of a comment. + trash Trashes a comment. + unapprove Unapproves a comment. + unspam Unmarks a comment as spam. + untrash Untrashes a comment. + update Updates one or more comments. +``` + +Affiche le nombre de commentaires: + +```bash +$ wp comment count +approved: 2 +spam: 0 +trash: 0 +post-trashed: 0 +all: 2 +moderated: 0 +total_comments: 2 +``` + +Liste des commentaires (approuvés ou non): + +```bash +$ wp comment list ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +| comment_ID | comment_post_ID | comment_date | comment_approved | comment_author | comment_author_email | ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +| 5 | 209 | 2018-08-14 08:00:18 | 1 | bruno | bruno@clicclac.info | +| 4 | 209 | 2018-08-14 07:59:55 | 0 | bruno | bruno@clicclac.info | +| 1 | 1 | 2017-01-29 09:19:42 | 1 | Un commentateur WordPress | wapuu@wordpress.example | ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +``` + +Liste de tous les commentaires (y compris spam, supprimés, post supprimés): + +```bash +$ wp comment list --status=all,spam,trash,post-trashed ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +| comment_ID | comment_post_ID | comment_date | comment_approved | comment_author | comment_author_email | ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +| 8 | 210 | 2018-08-14 08:11:08 | post-trashed | bruno | bruno@clicclac.info | +| 7 | 209 | 2018-08-14 08:01:02 | 1 | bruno | bruno@clicclac.info | +| 6 | 209 | 2018-08-14 08:00:46 | trash | bruno | bruno@clicclac.info | +| 5 | 209 | 2018-08-14 08:00:18 | 1 | bruno | bruno@clicclac.info | +| 4 | 209 | 2018-08-14 07:59:55 | 0 | bruno | bruno@clicclac.info | +| 3 | 209 | 2018-08-14 07:59:27 | 1 | bruno | bruno@clicclac.info | +| 2 | 57 | 2017-01-29 20:20:06 | spam | bruno | bruno@clicclac.info | +| 1 | 1 | 2017-01-29 09:19:42 | 1 | Un commentateur WordPress | wapuu@wordpress.example | ++------------+-----------------+---------------------+------------------+---------------------------+-------------------------+ +``` + +Déclarer un commentaire en SPAM: + +```bash +$ wp comment spam 2 +Success: Marked as spam comment 2. +``` + +Liste des SPAMs: + +```bash +$ wp comment list --status=spam ++------------+-----------------+---------------------+------------------+----------------+----------------------+ +| comment_ID | comment_post_ID | comment_date | comment_approved | comment_author | comment_author_email | ++------------+-----------------+---------------------+------------------+----------------+----------------------+ +| 2 | 57 | 2017-01-29 20:20:06 | spam | bruno | bruno@clicclac.info | ++------------+-----------------+---------------------+------------------+----------------+----------------------+ +``` + +Ne plus déclarer un commentaire en SPAM: + +```bash +$ wp comment unspam 2 +Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. +Success: Unspammed comment 2. +``` + +Effacer le SPAM: + +```bash +$ wp comment delete $(wp comment list --status=spam --format=ids) +Success: Trashed comment 2. +``` + +Effacer les commentaires supprimés et post supprimés: + +```bash +$ wp comment delete $(wp comment list --status=trash,post-trashed --format=ids) +Success: Trashed comment 8. +Success: Deleted comment 6. +``` + +Liste des trackback: + +```bash +$ wp comment list --type=trackback --format=ids +``` + +Liste des Pingback: + +```bash +$ wp comment list --type=pingback --format=ids +``` + + + diff --git a/docs/Divers/wp-cli/wp_config.md b/docs/Divers/wp-cli/wp_config.md new file mode 100644 index 0000000..ae617fb --- /dev/null +++ b/docs/Divers/wp-cli/wp_config.md @@ -0,0 +1,63 @@ +# wp config + +Aide: + +```bash +$ wp help config +``` + +```bash +NAME + + wp config + +DESCRIPTION + + Generates and reads the wp-config.php file. + +SYNOPSIS + + wp config + +SUBCOMMANDS + + create Generates a wp-config.php file. + delete Deletes a specific constant or variable from the wp-config.php file. + edit Launches system editor to edit the wp-config.php file. + get Gets the value of a specific constant or variable defined in wp-config.php file. + has Checks whether a specific constant or variable exists in the wp-config.php file. + list Lists variables, constants, and file includes defined in wp-config.php file. + path Gets the path to wp-config.php file. + set Sets the value of a specific constant or variable defined in wp-config.php file. + shuffle-salts Refreshes the salts defined in the wp-config.php file. +``` + +Liste des variables et constantes du fichier config.php: + +```bash +$ wp config list ++-------------------+------------------------------------------------------------------+----------+ +| name | value | type | ++-------------------+------------------------------------------------------------------+----------+ +| table_prefix | wp_ | variable | +| WP_CACHE | 1 | constant | +| WPCACHEHOME | /Users/bruno/Sites/wordpress/wp-content/plugins/wp-super-cache/ | constant | +| DB_NAME | wordpress4 | constant | +| DB_USER | xxx | constant | +| DB_PASSWORD | yyy | constant | +| DB_HOST | localhost | constant | +| DB_CHARSET | utf8mb4 | constant | +| DB_COLLATE | | constant | +| AUTH_KEY | ---------------------------------------------------------------- | constant | +| SECURE_AUTH_KEY | ---------------------------------------------------------------- | constant | +| LOGGED_IN_KEY | ---------------------------------------------------------------- | constant | +| NONCE_KEY | ---------------------------------------------------------------- | constant | +| AUTH_SALT | ---------------------------------------------------------------- | constant | +| SECURE_AUTH_SALT | ---------------------------------------------------------------- | constant | +| LOGGED_IN_SALT | ---------------------------------------------------------------- | constant | +| NONCE_SALT | ---------------------------------------------------------------- | constant | +| WP_POST_REVISIONS | 3 | constant | +| WP_DEBUG | | constant | ++-------------------+------------------------------------------------------------------+----------+ +``` + diff --git a/docs/Divers/wp-cli/wp_core.md b/docs/Divers/wp-cli/wp_core.md new file mode 100644 index 0000000..8b301d8 --- /dev/null +++ b/docs/Divers/wp-cli/wp_core.md @@ -0,0 +1,73 @@ +# wp core + +Aide: + +```bash +$ wp help core +``` + +```bash +NAME + + wp core + +DESCRIPTION + + Downloads, installs, updates, and manages a WordPress installation. + +SYNOPSIS + + wp core + +SUBCOMMANDS + + check-update Checks for WordPress updates via Version Check API. + download Downloads core WordPress files. + install Runs the standard WordPress installation process. + is-installed Checks if WordPress is installed. + multisite-convert Transforms an existing single-site installation into a multisite installation. + multisite-install Installs WordPress multisite from scratch. + update Updates WordPress to a newer version. + update-db Runs the WordPress database update procedure. + verify-checksums Verifies WordPress files against WordPress.org's checksums. + version Displays the WordPress version. +``` + +Version courante de WordPress: + +```bash +$ wp core version --path=/Users/bruno/Sites/wordpress +4.9.8 +``` + +Vérifier les mises-à-jour: + +```bash +$ wp core check-update +Success: WordPress is at the latest version. +``` + +Mise-à-jour de WordPress: + +```bash +$ wp core update +``` + +Mise-à-jour de la bdd: + +```bash +$ wp core update-db +``` + +Installer une ancienne version + +```bash +$ wp core update --version=4.7.1 +``` + +Télécharger la version 4.2.2 en langue grecque: + +```bash +$ wp core download --version=4.2.2 --locale=el_GR +``` + diff --git a/docs/Divers/wp-cli/wp_db.md b/docs/Divers/wp-cli/wp_db.md new file mode 100644 index 0000000..7a8aa09 --- /dev/null +++ b/docs/Divers/wp-cli/wp_db.md @@ -0,0 +1,109 @@ +# wp db + +Aide: + +```bash +$ wp help db +``` + +```bash +NAME + + wp db + +DESCRIPTION + + Performs basic database operations using credentials stored in wp-config.php. + +SYNOPSIS + + wp db + +SUBCOMMANDS + + check Checks the current status of the database. + clean Removes all tables with `$table_prefix` from the database. + cli Opens a MySQL console using credentials from wp-config.php + columns Displays information about a given table. + create Creates a new database. + drop Deletes the existing database. + export Exports the database to a file or to STDOUT. + import Imports a database from a file or from STDIN. + optimize Optimizes the database. + prefix Displays the database table prefix. + query Executes a SQL query against the database. + repair Repairs the database. + reset Removes all tables from the database. + search Finds a string in the database. + size Displays the database name and size. + tables Lists the database tables. +``` + +Optimiser la bdd: + +```bash +$ wp db optimize +wordpress4.wp_comments +note : Table does not support optimize, doing recreate + analyze instead +status : OK +wordpress4.wp_cptch_images +note : Table does not support optimize, doing recreate + analyze instead +status : OK +.../... +Success: Database optimized. +``` + +Vérifier la bdd: + +```bash +$ wp db check +wordpress4.wp_cntctfrm_field OK +wordpress4.wp_commentmeta OK +wordpress4.wp_comments OK +wordpress4.wp_cptch_images OK +.../... +Success: Database checked. +``` + +Réparer la bdd: +This command only works on database tables that use the MyISAM storage engine. It does not work on InnoDB tables. + +```bash +$ wp db repair +wordpress4.wp_options +note : The storage engine for the table doesn't support repair +wordpress4.wp_postmeta +note : The storage engine for the table doesn't support repair +.../... +Success: Database repaired. +``` + +Créer une sauvegarde de la base de bonnée de WordPress: + +```bash +$ wp db export +Success: Exported to 'wordpress4-2018-08-11-d930b79.sql'. +``` + +Tester une requête: + +```bash +$ wp db query "SELECT * FROM wp_options" +``` + +Ouvrir une console MySQL: + +```bash +$ wp db cli +Welcome to the MariaDB monitor. Commands end with ; or \g. +Your MariaDB connection id is 407 +Server version: 10.3.8-MariaDB Homebrew + +Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +MariaDB [wordpress4]> +``` + + diff --git a/docs/Divers/wp-cli/wp_language.md b/docs/Divers/wp-cli/wp_language.md new file mode 100644 index 0000000..e6d4866 --- /dev/null +++ b/docs/Divers/wp-cli/wp_language.md @@ -0,0 +1,124 @@ +# wp language + +Aide: + +```bash +$ wp help language +``` + +```bash +NAME + + wp language + +DESCRIPTION + + Installs, activates, and manages language packs. + +SYNOPSIS + + wp language + +SUBCOMMANDS + + core Installs, activates, and manages core language packs. + plugin Installs, activates, and manages plugin language packs. + theme Installs, activates, and manages theme language packs. +``` + + +Language de WordPress actif: + +```bash +$ wp language core list --status=active ++----------+-----------------+-------------+--------+--------+---------------------+ +| language | english_name | native_name | status | update | updated | ++----------+-----------------+-------------+--------+--------+---------------------+ +| fr_FR | French (France) | Français | active | none | 2018-08-12 05:36:43 | ++----------+-----------------+-------------+--------+--------+---------------------+ + +``` + + +Languages de WordPress installés: + +```bash +$ wp language core list --status=installed ++----------+-------------------------+-------------------------+-----------+--------+---------+ +| language | english_name | native_name | status | update | updated | ++----------+-------------------------+-------------------------+-----------+--------+---------+ +| en_US | English (United States) | English (United States) | installed | none | | ++----------+-------------------------+-------------------------+-----------+--------+---------+ +``` + +Language des plugins actifs: + +```bash +$ wp language plugin list --status=active --all ++--------------------------------+----------+-----------------+-------------+--------+--------+---------------------+ +| plugin | language | english_name | native_name | status | update | updated | ++--------------------------------+----------+-----------------+-------------+--------+--------+---------------------+ +| admin-post-navigation | fr_FR | French (France) | Français | active | none | 2015-10-14 15:18:47 | +| akismet | fr_FR | French (France) | Français | active | none | 2018-06-20 06:39:46 | +| gutenberg | fr_FR | French (France) | Français | active | none | 2018-08-09 14:57:31 | +| jetpack | fr_FR | French (France) | Français | active | none | 2018-08-08 19:21:07 | +| regenerate-thumbnails | fr_FR | French (France) | Français | active | none | 2018-06-13 11:44:47 | +| simple-tags | fr_FR | French (France) | Français | active | none | 2017-06-11 12:58:24 | +| subscribe-to-comments-reloaded | fr_FR | French (France) | Français | active | none | 2016-08-14 12:04:59 | +| wp-db-backup | fr_FR | French (France) | Français | active | none | 2016-09-09 07:58:42 | +| wp-jquery-lightbox | fr_FR | French (France) | Français | active | none | 2017-03-29 14:53:35 | +| wordpress-seo | fr_FR | French (France) | Français | active | none | 2018-07-24 15:40:07 | ++--------------------------------+----------+-----------------+-------------+--------+--------+---------------------+ +``` + +Liste des mise-à-jour du language de WordPress disponibles: + +```bash +$ wp language core list --update=available --all ++----------+--------------+-------------+--------+--------+---------+ +| language | english_name | native_name | status | update | updated | ++----------+--------------+-------------+--------+--------+---------+ ++----------+--------------+-------------+--------+--------+---------+ +``` + +Liste des mise-à-jour du language des plugins disponibles: + +```bash +$ wp language plugin list --update=available --all ++--------+----------+--------------+-------------+--------+--------+---------+ +| plugin | language | english_name | native_name | status | update | updated | ++--------+----------+--------------+-------------+--------+--------+---------+ ++--------+----------+--------------+-------------+--------+--------+---------+ +``` + +Liste des mise-à-jour du language des themes disponibles: + +```bash +$ wp language theme list --update=available --all ++-------+----------+--------------+-------------+--------+--------+---------+ +| theme | language | english_name | native_name | status | update | updated | ++-------+----------+--------------+-------------+--------+--------+---------+ ++-------+----------+--------------+-------------+--------+--------+---------+ +``` + +Met à jour tous les fichiers de language de WordPress: + +```bash +$ wp language core update +Success: Translations are up to date. +``` + +Met à jour tous les fichiers de language de tous les plug-ins: + +```bash +$ wp language plugin update --all +Success: Translations are up to date. +``` + +Met à jour tous les fichiers de language de tous les thèmes: + +```bash +$ wp language theme update --all +Success: Translations are up to date. +``` + diff --git a/docs/Divers/wp-cli/wp_media.md b/docs/Divers/wp-cli/wp_media.md new file mode 100644 index 0000000..d0a8b99 --- /dev/null +++ b/docs/Divers/wp-cli/wp_media.md @@ -0,0 +1,136 @@ +# wp media + +Aide: + +```bash +$ wp help media +``` + +```bash +NAME + + wp media + +DESCRIPTION + + Imports files as attachments, regenerates thumbnails, or lists registered image sizes. + +SYNOPSIS + + wp media + +SUBCOMMANDS + + image-size Lists image sizes registered with WordPress. + import Creates attachments from local files or URLs. + regenerate Regenerates thumbnails for one or more attachments. +``` + +Afficher les tailles d'image: + +```bash +$ wp media image-size ++--------------+-------+--------+------+-------+ +| name | width | height | crop | ratio | ++--------------+-------+--------+------+-------+ +| full | | | N/A | N/A | +| medium_large | 768 | 0 | soft | N/A | +| large | 610 | 610 | soft | N/A | +| medium | 400 | 400 | soft | N/A | +| thumbnail | 200 | 200 | hard | 1:1 | ++--------------+-------+--------+------+-------+ +``` + +Regénérer toutes les vignettes (sans confirmation): + +```bash +$ wp media regenerate --yes +Found 20 images to regenerate. +1/20 Regenerated thumbnails for "2016-06-24_LaPleureuse-LaSauffaz_0729" (ID 70). +2/20 Regenerated thumbnails for "2016-06-24_CascadeDeLaPleureuse_0700" (ID 69). +3/20 Regenerated thumbnails for "2016-06-24_TorrentDeSales_0844" (ID 68). +4/20 Regenerated thumbnails for "2016-06-23_CirqueDuFerACheval_0498" (ID 67). +5/20 Regenerated thumbnails for "2008-09-09_BihoreauGris_2081" (ID 35). +6/20 Regenerated thumbnails for "2008-09-08_BihoreauGris_1889" (ID 34). +7/20 Regenerated thumbnails for "2008-09-08_BihoreauGris_1858" (ID 33). +8/20 Regenerated thumbnails for "2008-09-08_BihoreauGris_1797" (ID 32). +9/20 Regenerated thumbnails for "2008-09-07_BihoreauGris_1113" (ID 31). +10/20 Regenerated thumbnails for "2008-09-07_BihoreauGris_1052" (ID 30). +11/20 Regenerated thumbnails for "2008-09-07_BihoreauGris_1030" (ID 29). +12/20 Regenerated thumbnails for "2008-09-07_BihoreauGris_1028" (ID 28). +13/20 Regenerated thumbnails for "2016-09-26_Brame_7811" (ID 25). +14/20 Regenerated thumbnails for "2016-09-26_Brame_7775" (ID 24). +15/20 Regenerated thumbnails for "2016-09-26_Brame_7801" (ID 23). +16/20 Regenerated thumbnails for "logo" (ID 15). +17/20 Regenerated thumbnails for "2014-09-13_BolClassic_7483" (ID 13). +18/20 Regenerated thumbnails for "2014-09-13_BolClassic_7126" (ID 12). +19/20 Regenerated thumbnails for "2014-09-13_BolClassic_7040" (ID 11). +20/20 Regenerated thumbnails for "2014-09-13_BolClassic_6826" (ID 10). +Success: Regenerated 20 of 20 images. +``` + +Regénérer toutes les vignettes de taille large: + +```bash +$ wp media regenerate --image_size=large +Do you really want to regenerate the "large" image size for all images? [y/n] y +Found 20 images to regenerate. +1/20 Regenerated "large" thumbnail for "2016-06-24_LaPleureuse-LaSauffaz_0729" (ID 70). +2/20 Regenerated "large" thumbnail for "2016-06-24_CascadeDeLaPleureuse_0700" (ID 69). +3/20 Regenerated "large" thumbnail for "2016-06-24_TorrentDeSales_0844" (ID 68). +4/20 Regenerated "large" thumbnail for "2016-06-23_CirqueDuFerACheval_0498" (ID 67). +5/20 Regenerated "large" thumbnail for "2008-09-09_BihoreauGris_2081" (ID 35). +6/20 Regenerated "large" thumbnail for "2008-09-08_BihoreauGris_1889" (ID 34). +7/20 Regenerated "large" thumbnail for "2008-09-08_BihoreauGris_1858" (ID 33). +8/20 Regenerated "large" thumbnail for "2008-09-08_BihoreauGris_1797" (ID 32). +9/20 Regenerated "large" thumbnail for "2008-09-07_BihoreauGris_1113" (ID 31). +10/20 Regenerated "large" thumbnail for "2008-09-07_BihoreauGris_1052" (ID 30). +11/20 Regenerated "large" thumbnail for "2008-09-07_BihoreauGris_1030" (ID 29). +12/20 Regenerated "large" thumbnail for "2008-09-07_BihoreauGris_1028" (ID 28). +13/20 Regenerated "large" thumbnail for "2016-09-26_Brame_7811" (ID 25). +14/20 Regenerated "large" thumbnail for "2016-09-26_Brame_7775" (ID 24). +15/20 Regenerated "large" thumbnail for "2016-09-26_Brame_7801" (ID 23). +16/20 No "large" thumbnail regeneration needed for "logo" (ID 15). +17/20 Regenerated "large" thumbnail for "2014-09-13_BolClassic_7483" (ID 13). +18/20 Regenerated "large" thumbnail for "2014-09-13_BolClassic_7126" (ID 12). +19/20 Regenerated "large" thumbnail for "2014-09-13_BolClassic_7040" (ID 11). +20/20 Regenerated "large" thumbnail for "2014-09-13_BolClassic_6826" (ID 10). +Success: Regenerated 20 of 20 images. +``` + +Regénérer toutes les vignettes pour les attachement d'ID suivants: + +```bash +$ wp media regenerate 10 11 12 +Found 3 images to regenerate. +1/3 Regenerated thumbnails for "2014-09-13_BolClassic_7040" (ID 11). +2/3 Regenerated thumbnails for "2014-09-13_BolClassic_7126" (ID 12). +3/3 Regenerated thumbnails for "2014-09-13_BolClassic_6826" (ID 10). +Success: Regenerated 3 of 3 images. +``` + +Regénérer toutes les vignettes pour les attachement d'ID 10 à 20: + +```bash +$ seq 10 20 | xargs wp media regenerate +Found 5 images to regenerate. +1/5 Regenerated thumbnails for "logo" (ID 15). +2/5 Regenerated thumbnails for "2014-09-13_BolClassic_7483" (ID 13). +3/5 Regenerated thumbnails for "2014-09-13_BolClassic_7040" (ID 11). +4/5 Regenerated thumbnails for "2014-09-13_BolClassic_7126" (ID 12). +5/5 Regenerated thumbnails for "2014-09-13_BolClassic_6826" (ID 10). +Success: Regenerated 5 of 5 images. +``` + +Importer une image locale pour être "image à la une " pour un post: + +```bash +$ wp media import ~/Downloads/image.png --post_id=123 --title="A downloaded picture" --featured_image +Success: Imported file '/home/person/Downloads/image.png' as attachment ID 1753 and attached to post 123 as featured image. +``` + +Importer un paquet d'images: + +```bash +$ wp media import images_folder/* +``` \ No newline at end of file diff --git a/docs/Divers/wp-cli/wp_package.md b/docs/Divers/wp-cli/wp_package.md new file mode 100644 index 0000000..2362546 --- /dev/null +++ b/docs/Divers/wp-cli/wp_package.md @@ -0,0 +1,86 @@ +# wp package + + + +Aide: + +```bash +$ wp help package +``` + +```bash +NAME + + wp package + +DESCRIPTION + + Lists, installs, and removes WP-CLI packages. + +SYNOPSIS + + wp package + +SUBCOMMANDS + + browse Browses WP-CLI packages available for installation. + install Installs a WP-CLI package. + list Lists installed WP-CLI packages. + path Gets the path to an installed WP-CLI package, or the package directory. + uninstall Uninstalls a WP-CLI package. + update Updates all installed WP-CLI packages to their latest version. +``` + +Liste des packages installés: + +```bash +$ wp package list ++---------------------------+-------------+------------+--------+----------------+ +| name | authors | version | update | update_version | ++---------------------------+-------------+------------+--------+----------------+ +| trepmal/wp-revisions-cli | | dev-master | none | | +| wp-cli/wp-super-cache-cli | WP-CLI Team | dev-master | none | | ++---------------------------+-------------+------------+--------+----------------+ +``` + +Installer un package: +```bash +$ wp package install wp-cli/wp-super-cache-cli +Installing package wp-cli/wp-super-cache-cli (dev-master) +Updating /Users/bruno/.wp-cli/packages/composer.json to require the package... + +## Using Composer to install the package... + +Loading composer repositories with package information +Updating dependencies +Resolving dependencies through SAT +Looking at all rules. + +Dependency resolution completed in 0.221 seconds +Analyzed 1299 packages to resolve dependencies +Analyzed 24098 rules to resolve dependencies +Package operations: 1 install, 0 updates, 0 removals +Installs: wp-cli/wp-super-cache-cli:dev-master 4993755 + +- Installing wp-cli/wp-super-cache-cli (dev-master 4993755) + Writing lock file + Generating autoload files + +------ + +Success: Package installed. +``` + +Tester si un package est installé: + +```bash +# !/bin/bash + +packages_list=$(wp package list | sed -n '1!p' | awk '{print $1'}) + +# Si le package /wp-cli/admin-command est installé +if [ -n "$(echo "$packages_list" | awk '$1 ~ /wp-cli\/admin-command/')" ]; then + echo "/wp-cli/admin-command est installé" +fi +``` + diff --git a/docs/Divers/wp-cli/wp_plugin.md b/docs/Divers/wp-cli/wp_plugin.md new file mode 100644 index 0000000..2df783e --- /dev/null +++ b/docs/Divers/wp-cli/wp_plugin.md @@ -0,0 +1,360 @@ +# wp plugin + +Aide: + +```bash +$ wp help plugin +``` + +```bash +NAME + + wp plugin + +DESCRIPTION + + Manages plugins, including installs, activations, and updates. + +SYNOPSIS + + wp plugin + +SUBCOMMANDS + + activate Activates one or more plugins. + deactivate Deactivates one or more plugins. + delete Deletes plugin files without deactivating or uninstalling. + get Gets details about an installed plugin. + install Installs one or more plugins. + is-active Checks if a given plugin is active. + is-installed Checks if a given plugin is installed. + list Gets a list of plugins. + path Gets the path to a plugin or to the plugin directory. + search Searches the WordPress.org plugin directory. + status Reveals the status of one or all plugins. + toggle Toggles a plugin's activation state. + uninstall Uninstalls one or more plugins. + update Updates one or more plugins. + verify-checksums Verifies plugin files against WordPress.org's checksums. +``` + +Liste des plug-ins: + +```bash +$ wp plugin list --path=/Users/bruno/Sites/wordpress ++--------------------------------+----------+-----------+------------+ +| name | status | update | version | ++--------------------------------+----------+-----------+------------+ +| admin-post-navigation | active | none | 2.1 | +| akismet | inactive | none | 4.0.8 | +| audio-story-images | inactive | none | 0.0.3 | +| boxers-and-swipers | inactive | none | 3.11 | +| captcha | active | none | 4.4.5 | +| contact-form-plugin | active | none | 4.1.0 | +| easy-swipebox | inactive | none | 1.1.0 | +| exif-caption | inactive | none | 2.11 | +| thesography | inactive | none | 1.3 | +| google-sitemap-generator | inactive | none | 4.0.9 | +| gutenberg | active | available | 3.4.0 | +| hello | inactive | none | 1.6 | +| jetpack | inactive | available | 6.3.3 | +| jquery-updater | inactive | none | 3.3.1 | +| knowledge-base-cpt | inactive | none | 1.1.0 | +| link-manager | active | none | 0.1-beta | +| meow-lightbox | active | available | 1.1.2 | +| sola-newsletters | active | none | 4.0.19 | +| regenerate-thumbnails | active | none | 3.0.2 | +| responsive-lightbox | inactive | none | 2.0.5 | +| simple-tags | active | none | 2.4.7 | +| subscribe-to-comments-reloaded | inactive | none | 180225 | +| theme-check | inactive | none | 20160523.1 | +| wp-db-backup | inactive | none | 2.3.3 | +| wp-jquery-lightbox | inactive | none | 1.4.8 | +| wp-print | inactive | none | 2.58 | +| wp-image-protect | inactive | none | 2.7.1 | +| wp-log-viewer | inactive | none | 1.2.1 | +| wp-mapeditor | inactive | none | 0.2.2 | +| rest-api-oauth1 | inactive | none | 0.3.0 | +| wp-retina-2x-pro | active | available | 5.4.0 | +| wp-super-cache | active | available | 1.6.2 | +| wptouch-pro | inactive | none | 4.0.17 | +| wp-xhprof-master | inactive | none | 0.1 | +| yada-wiki | inactive | none | 3.0 | +| wordpress-seo | active | available | 7.9 | +| zenlatest | inactive | none | 1.3 | +| zenphotopress | inactive | none | 1.8 | +| advanced-cache.php | dropin | none | | ++--------------------------------+----------+-----------+------------+ +``` + +Choisir les champs: + +```bash +$ wp plugin list --fields=name,version ++--------------------------------+------------+ +| name | version | ++--------------------------------+------------+ +| admin-post-navigation | 2.1 | +| akismet | 4.0.8 | +| audio-story-images | 0.0.3 | +``` + +Liste des plug-ins activés: + +```bash +$ wp plugin list --status=active ++-----------------------+--------+-----------+----------+ +| name | status | update | version | ++-----------------------+--------+-----------+----------+ +| admin-post-navigation | active | none | 2.1 | +| captcha | active | none | 4.4.5 | +| contact-form-plugin | active | none | 4.1.0 | +| gutenberg | active | available | 3.4.0 | +| link-manager | active | none | 0.1-beta | +| meow-lightbox | active | available | 1.1.2 | +| sola-newsletters | active | none | 4.0.19 | +| regenerate-thumbnails | active | none | 3.0.2 | +| simple-tags | active | none | 2.4.7 | +| wp-retina-2x-pro | active | available | 5.4.0 | +| wp-super-cache | active | available | 1.6.2 | +| wordpress-seo | active | available | 7.9 | ++-----------------------+--------+-----------+----------+ +``` + +Liste des plug-ins mis-à-jour: + +```bash +$ wp plugin list --update=available ++------------------+--------+-----------+---------+ +| name | status | update | version | ++------------------+--------+-----------+---------+ +| gutenberg | active | available | 3.4.0 | +| meow-lightbox | active | available | 1.1.2 | +| wp-retina-2x-pro | active | available | 5.4.0 | +| wp-super-cache | active | available | 1.6.2 | +| wordpress-seo | active | available | 7.9 | ++------------------+--------+-----------+---------+ +``` + +```bash +$ wp plugin list --fields=name,version --update=available ++------------------+---------+ +| name | version | ++------------------+---------+ +| gutenberg | 3.4.0 | +| meow-lightbox | 1.1.2 | +| wp-retina-2x-pro | 5.4.0 | +| wp-super-cache | 1.6.2 | +| wordpress-seo | 7.9 | ++------------------+---------+ +``` + +Résultat de la commande au format JSON: + +```bash +$ wp plugin list --update=available --format=json +[{"name":"gutenberg","status":"active","update":"available","version":"3.4.0"},{"name":"meow-lightbox","status":"active","update":"available","version":"1.1.2"},{"name":"wp-retina-2x-pro","status":"active","update":"available","version":"5.4.0"},{"name":"wp-super-cache","status":"active","update":"available","version":"1.6.2"},{"name":"wordpress-seo","status":"active","update":"available","version":"7.9"}] +``` + +Résultat de la commande au format CSV: + +```bash +$ wp plugin list --update=available --format=csv +name,status,update,version +gutenberg,active,available,3.4.0 +meow-lightbox,active,available,1.1.2 +wp-retina-2x-pro,active,available,5.4.0 +wp-super-cache,active,available,1.6.2 +wordpress-seo,active,available,7.9 +``` + +Autres formats: + - table + – csv + – count + – json + – yaml + +Champs affichés par défaut: + - name + - status + - update + - version + +Champs optionnels: + - update_version + - update_package (url) + - update_id + - title + - description + +Vérifier si des MAJ de plugins sont disponibles ? + +```bash +$ wp plugin update --all --dry-run +Available plugin updates: ++------------------+--------+---------+----------------+ +| name | status | version | update_version | ++------------------+--------+---------+----------------+ +| gutenberg | active | 3.4.0 | 3.5.0 | +| meow-lightbox | active | 1.1.2 | 1.2.1 | +| wp-retina-2x-pro | active | 5.4.0 | 5.4.1 | +| wp-super-cache | active | 1.6.2 | 1.6.3 | +| wordpress-seo | active | 7.9 | 7.9.1 | ++------------------+--------+---------+----------------+ +``` + +```bash +$ wp plugin list --fields=name,version,update_version,description --update=available ++------------------+---------+----------------+-------------------------------------------------------------------------------------+ +| name | version | update_version | description | ++------------------+---------+----------------+-------------------------------------------------------------------------------------+ +| gutenberg | 3.4.0 | 3.5.0 | Printing since 1440. This is the development plugin for the new block editor in cor | +| | | | e. | +| meow-lightbox | 1.1.2 | 1.2.1 | Lightbox designed by and for photographers. | +| wp-retina-2x-pro | 5.4.0 | 5.4.1 | Make your website look beautiful and crisp on modern displays by creating + display | +| | | | ing retina images. | +| wp-super-cache | 1.6.2 | 1.6.3 | Very fast caching plugin for WordPress. | +| wordpress-seo | 7.9 | 7.9.1 | The first true all-in-one SEO solution for WordPress, including on-page content ana | +| | | | lysis, XML sitemaps and much more. | ++------------------+---------+----------------+-------------------------------------------------------------------------------------+ +``` + +Etat des plug-ins sur le site: + +```bash +$ wp plugin status +21 installed plugins: + A admin-post-navigation 2.1 + I akismet 4.0.8 + I google-sitemap-generator 4.0.9 + UA gutenberg 3.4.0 + I hello 1.6 + I jetpack 6.4.2 + I jquery-updater 3.3.1 + A link-manager 0.1-beta + UA meow-lightbox 1.1.2 + A sola-newsletters 4.0.19 + A regenerate-thumbnails 3.0.2 + I responsive-lightbox 2.0.5 + A simple-tags 2.4.7 + I rest-api-oauth1 0.3.0 + UA wp-retina-2x-pro 5.4.0 + UA wp-super-cache 1.6.2 + I wptouch-pro 4.0.17 + UA wordpress-seo 7.9 + I zenlatest 1.3 + I zenphotopress 1.8 + D advanced-cache.php + +Legend: A = Active, I = Inactive, D = Drop-In, U = Update Available +``` + +Installer un plug-in: + +```bash +$ wp plugin install +``` + +Activer un plug-in: + +``` +$ wp plugin activate +``` + +Installer et activer un plug-in: + +```bash +$ wp plugin install --activate +``` + +Installer plusieurs plug-in: + +```bash +$ wp plugin install +``` + +Installer un plug-in depuis un serveur: + +```bash +$ wp plugin install https://d1qas1txbec8n.cloudfront.net/wp-content/uploads/2015/06/23073607/myplugin.zip +``` + +Installer une ancienne version: + +```bash +$ wp plugin install wordpress-seo --version=4.8 +``` + +Mettre-à-jour un plug-in: + +```bash +$ wp plugin update jetpack +Téléchargement de la mise à jour depuis https://downloads.wordpress.org/plugin/jetpack.6.4.2.zip… +Décompression de la mise à jour... +Installation de la dernière version... +Retrait de l’ancienne version de l’extension... +L’extension a bien été mise à jour. +Success: Updated 1 of 1 plugins. ++---------+-------------+-------------+---------+ +| name | old_version | new_version | status | ++---------+-------------+-------------+---------+ +| jetpack | 6.3.3 | 6.4.2 | Updated | ++---------+-------------+-------------+---------+ +``` + +Mettre-à-jour tous les plugins: + +```bash +$ wp plugin update --all +$ wp plugin update --all --exclude=akismet + +# mode quiet +$ wp plugin update --all --quiet > /dev/null 2>&1 +``` + +Désactiver un plugin: + +```bash +$ wp plugin deactivate +``` + +Désactiver tous les plugins: + +```bash +$ wp plugin deactivate --all +``` + +Désactiver puis dé-installer un plugin: + +```bash +$ wp plugin deactivate --uninstall +``` + +Dé-installer un plugin: +Par défaut, seuls les plugins désactivés peuvent être dé-installer. + +```bash +$ wp plugin uninstall +``` + +Désactive puis désinstalle un plugin: + +```bash +$ wp plugin uninstall --deactivate +``` + +Supprimer un plugin: + +```bash +$ wp plugin delete +``` + +Supprimer les plugins inactifs: + +```bash +$ wp plugin delete $(wp plugin list --status=inactive --field=name) +``` + + + diff --git a/docs/Divers/wp-cli/wp_post.md b/docs/Divers/wp-cli/wp_post.md new file mode 100644 index 0000000..f56dc69 --- /dev/null +++ b/docs/Divers/wp-cli/wp_post.md @@ -0,0 +1,240 @@ +# wp post + +Aide: + +```bash +$ wp help post +``` + +```bash +NAME + + wp post + +DESCRIPTION + + Manages posts, content, and meta. + +SYNOPSIS + + wp post + +SUBCOMMANDS + + create Creates a new post. + delete Deletes an existing post. + edit Launches system editor to edit post content. + generate Generates some posts. + get Gets details about a post. + list Gets a list of posts. + meta Adds, updates, deletes, and lists post custom fields. + term Adds, updates, removes, and lists post terms. + update Updates one or more existing posts. +``` + +Liste des posts: + +```bash +$ wp post list ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| 184 | Welcome to the Gutenberg Editor | | 2018-08-03 13:55:41 | draft | +| 159 | zenphoto | zenphoto-3 | 2018-02-02 09:14:55 | publish | +| 154 | zenphoto | zenphoto-2 | 2018-02-02 09:12:51 | publish | +| 111 | Image en ligne | image-en-ligne | 2017-02-16 12:31:56 | publish | +| 106 | Flickr | flickr | 2017-02-15 18:58:02 | publish | +| 81 | WP - ZP | wp-zp | 2017-02-03 16:25:12 | publish | +| 78 | zen geo | zen-geo | 2017-02-02 06:28:45 | publish | +| 66 | Geo data | geo-data | 2017-01-31 14:02:20 | publish | +| 54 | Zenphoto | zenphoto | 2017-01-29 19:55:47 | publish | +| 27 | Bihoreau | bihoreau | 2017-01-29 17:23:20 | publish | +| 22 | Brame | brame | 2017-01-29 17:17:07 | publish | +| 9 | Bol d'Or Classic 2014 | bol-dor-classic-2014 | 2017-01-29 09:56:51 | publish | +| 1 | Bonjour tout le monde ! | bonjour-tout-le-monde | 2017-01-29 09:19:42 | publish | ++-----+---------------------------------+-----------------------+---------------------+-------------+ +``` + +Liste des posts (status brouillon): + +```bash +$ wp post list --post_status=draft ++-----+---------------------------------+-----------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+-----------+---------------------+-------------+ +| 184 | Welcome to the Gutenberg Editor | | 2018-08-03 13:55:41 | draft | ++-----+---------------------------------+-----------+---------------------+-------------+ +``` + +Liste des pages: + +```bash +$ wp post list --post_type=page ++-----+---------------------------------+---------------------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+---------------------+---------------------+-------------+ +| 186 | My test post | my-test-post | 2018-08-11 19:53:45 | publish | +| 136 | Map | map | 2017-02-21 09:55:17 | publish | +| 57 | Livre d'Or | livre-dor | 2017-01-29 20:18:16 | publish | +| 48 | License des photos | license-des-photos | 2017-01-29 18:35:44 | publish | +| 46 | Liens | liens | 2017-01-29 18:33:58 | publish | +| 39 | Ce mois-ci | ce-mois-ci | 2017-01-29 18:27:49 | publish | +| 37 | Contact | contact | 2017-01-29 18:22:58 | publish | +| 6 | Newsletter Sign Up Confirmation | nl-confirm-signup | 2017-01-29 09:36:46 | publish | +| 7 | Newsletter Unsubscription | nl-unsubscribe-page | 2017-01-29 09:36:46 | publish | +| 4 | Accueil | accueil | 2017-01-29 09:27:58 | publish | +| 2 | Page d’exemple | page-d-exemple | 2017-01-29 09:19:42 | publish | ++-----+---------------------------------+---------------------+---------------------+-------------+ +``` + +Liste des posts **ET** pages: + +```bash +$ wp post list --post_type=page,post --fields=ID,post_title,post_name,post_date,post_status,post_type +``` + +```bash +$ wp post list --post_type=page,post --fields=ID,post_title,post_name,post_status,post_type ++-----+---------------------------------+----------------------+-------------+-----------+ +| ID | post_title | post_name | post_status | post_type | ++-----+---------------------------------+----------------------+-------------+-----------+ +| 211 | Article 23 | post-23 | publish | post | +| 208 | Article 20 | post-20 | publish | post | +| 209 | Article 21 | post-21 | publish | post | +| 186 | My test post | my-test-post | publish | page | +| 184 | Welcome to the Gutenberg Editor | | draft | post | +| 159 | zenphoto | zenphoto-3 | publish | post | +| 154 | zenphoto | zenphoto-2 | publish | post | +| 136 | Map | map | publish | page | +| 111 | Image en ligne | image-en-ligne | publish | post | +| 106 | Flickr | flickr | publish | post | +| 81 | WP - ZP | wp-zp | publish | post | +| 78 | zen geo | zen-geo | publish | post | +| 66 | Geo data | geo-data | publish | post | +| 57 | Livre d'Or | livre-dor | publish | page | +| 54 | Zenphoto | zenphoto | publish | post | +| 48 | License des photos | license-des-photos | publish | page | +| 46 | Liens | liens | publish | page | +| 39 | Ce mois-ci | ce-mois-ci | publish | page | +| 37 | Contact | contact | publish | page | +| 27 | Bihoreau | bihoreau | publish | post | +| 22 | Brame | brame | publish | post | +| 9 | Bol d'Or Classic 2014 | bol-dor-classic-2014 | publish | post | +| 6 | Newsletter Sign Up Confirmation | nl-confirm-signup | publish | page | +| 7 | Newsletter Unsubscription | nl-unsubscribe-page | publish | page | +| 4 | Accueil | accueil | publish | page | +| 1 | Bonjour tout le monde ! | bonjour-tout-le-monde| publish | post | +| 2 | Page d’exemple | page-d-exemple | publish | page | ++-----+---------------------------------+----------------------+-------------+-----------+ +``` + +Créer un post: + +```bash +$ wp post create --post_type=page --post_status=publish --post_title='My test post' --post_content='This is a test post' +Success: Created post 186. +``` + +```bash +$ wp post create --post_title='Just a Post' --post_content='I wandered lonely as a cloud.' --post_status='publish' +``` + +Créer un post dont l'auteur est Bob (ID2): + +```bash +$ wp post create --post_author=2 --post_status=publish --post_title='The Bob post' --post_content='This is a test post' +Success: Created post 213. +``` + +Supprimer un post: + +```bash +$ wp post delete 187 +Success: Trashed post 187. +``` + +Générer des posts: + +```bash +$ wp post generate --count=3 +Generating posts 100% [================================================================================================] 0:01 / 0:02 +``` + +```bash +$ wp post list ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| 189 | Article 13 | post-13 | 2018-08-11 20:28:12 | future | +| 190 | Article 14 | post-14 | 2018-08-11 20:28:12 | future | +| 191 | Article 15 | post-15 | 2018-08-11 20:28:12 | future | +| 184 | Welcome to the Gutenberg Editor | | 2018-08-03 13:55:41 | draft | +``` + +Générer des posts avec du dummy-text: + +```bash +$ curl http://loripsum.net/api/4 | wp post generate --post_content --count=3 + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed +100 1991 0 1991 0 0 326 0 --:--:-- 0:00:06 --:--:-- 326 +Generating posts 100% [===========================================] 0:00 / 0:00 +``` + +```bash +$ wp post list ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+-----------------------+---------------------+-------------+ +| 208 | Article 20 | post-20 | 2018-08-13 17:42:52 | future | +| 209 | Article 21 | post-21 | 2018-08-13 17:42:52 | future | +| 210 | Article 22 | post-22 | 2018-08-13 17:42:52 | future | +``` + +Générer des pages: + +```bash +$ wp post generate --post_type=page --count=3 +Generating posts 100% [================================================================================================] 0:00 / 0:00 +``` + +```bash +$ wp post list --post_type=page ++-----+---------------------------------+---------------------+---------------------+-------------+ +| ID | post_title | post_name | post_date | post_status | ++-----+---------------------------------+---------------------+---------------------+-------------+ +| 201 | Page 12 | post-12 | 2018-08-11 20:37:31 | future | +| 202 | Page 13 | post-13 | 2018-08-11 20:37:31 | future | +| 203 | Page 14 | post-14 | 2018-08-11 20:37:31 | future | +| 186 | My test post | my-test-post | 2018-08-11 19:53:45 | publish | +| 136 | Map | map | 2017-02-21 09:55:17 | publish | +| 57 | Livre d'Or | livre-dor | 2017-01-29 20:18:16 | publish | +| 48 | License des photos | license-des-photos | 2017-01-29 18:35:44 | publish | +| 46 | Liens | liens | 2017-01-29 18:33:58 | publish | +| 39 | Ce mois-ci | ce-mois-ci | 2017-01-29 18:27:49 | publish | +| 37 | Contact | contact | 2017-01-29 18:22:58 | publish | +| 6 | Newsletter Sign Up Confirmation | nl-confirm-signup | 2017-01-29 09:36:46 | publish | +| 7 | Newsletter Unsubscription | nl-unsubscribe-page | 2017-01-29 09:36:46 | publish | +| 4 | Accueil | accueil | 2017-01-29 09:27:58 | publish | +| 2 | Page d’exemple | page-d-exemple | 2017-01-29 09:19:42 | publish | ++-----+---------------------------------+---------------------+---------------------+-------------+ +``` + +Générer un post avec un prompt: + +```bash +$ wp post generate --prompt +1/10 [--count=]: 1 +2/10 [--post_type=]: +3/10 [--post_status=]: +4/10 [--post_title=]: +5/10 [--post_author=]: +6/10 [--post_date=]: +7/10 [--post_date_gmt=]: +8/10 [--post_content] (Y/n): +9/10 [--max_depth=]: +10/10 [--format=]: +Generating posts 100% [================================================================================================] 0:00 / 0:00 +``` + + diff --git a/docs/Divers/wp-cli/wp_revisions.md b/docs/Divers/wp-cli/wp_revisions.md new file mode 100644 index 0000000..04735a1 --- /dev/null +++ b/docs/Divers/wp-cli/wp_revisions.md @@ -0,0 +1,53 @@ +# wp revisions + +Cette commande nécessite l'installation du package [trepmal/wp-revisions-cli](https://github.com/trepmal/wp-revisions-cli) + +```bash +$ wp package install trepmal/wp-revisions-cli +``` + + + +Aide: + +```bash +$ wp help revisions +``` + +```bash +NAME + + wp revisions + +DESCRIPTION + + Manage revisions + +SYNOPSIS + + wp revisions + +SUBCOMMANDS + + clean Delete old revisions + dump Delete all revisions + generate Generate revisions + list List all revisions + status Get revision status +``` + +Garder seulement les plus récentes révisions: + +```bash +$ wp revisions clean 3 +Cleaning revisions for 39 post(s) 100% [===============================================================================] 0:00 / 0:00 +Success: Finished removing 2 old revisions. +``` + +Valeur de WP_POST_REVISIONS: + +```bash +$ wp revisions status +Success: Keeping the last 3 revisions +``` + diff --git a/docs/Divers/wp-cli/wp_scaffold.md b/docs/Divers/wp-cli/wp_scaffold.md new file mode 100644 index 0000000..35c4b85 --- /dev/null +++ b/docs/Divers/wp-cli/wp_scaffold.md @@ -0,0 +1,67 @@ +# wp scaffold + +Aide: + +```bash +$ wp help scaffold +``` + +```bash +NAME + + wp scaffold + +DESCRIPTION + + Generates code for post types, taxonomies, plugins, child themes, etc. + +SYNOPSIS + + wp scaffold + +SUBCOMMANDS + + _s Generates starter code for a theme based on _s. + block Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme. + child-theme Generates child theme based on an existing theme. + plugin Generates starter code for a plugin. + plugin-tests Generates files needed for running PHPUnit tests in a plugin. + post-type Generates PHP code for registering a custom post type. + taxonomy Generates PHP code for registering a custom taxonomy. + theme-tests Generates files needed for running PHPUnit tests in a theme. +``` + +Create your [underscores](https://underscores.me) based theme: + +```bash +$ wp scaffold _s myNewTheme +Success: Created theme 'MyNewTheme' +``` + +Créer un child-theme: + +```bash +$ wp scaffold child-theme tw17-clone --parent_theme=twentyseventeen --theme_name="TW17 Clone" +Success: Created '/Users/bruno/Sites/wordpress/wp-content/themes/tw17-clone'. +``` + +```bash +$ wp scaffold child-theme tw17-clone --parent_theme=twentyseventeen --theme_name="TW17 Clone" --author=FULL-NAME --author_uri=URI --theme_uri=URI --activate --force +Success: Created '/Users/bruno/Sites/wordpress/wp-content/themes/tw17-clone'. +``` + +Créer un nouveau plugin avec unit tests + +```bash +$ wp scaffold plugin sample-plugin +Success: Created plugin files. +Success: Created test files. +``` + +Créer un nouveau plugin sans unit tests + +```bash +$ wp scaffold plugin sample-plugin --skip-tests +Success: Created plugin files. +``` + diff --git a/docs/Divers/wp-cli/wp_search-replace.md b/docs/Divers/wp-cli/wp_search-replace.md new file mode 100644 index 0000000..384e2e1 --- /dev/null +++ b/docs/Divers/wp-cli/wp_search-replace.md @@ -0,0 +1,93 @@ +# wp search-replace + +Aide: + +```bash +$ wp help search-replace +``` + +```bash +NAME + + wp search-replace + +DESCRIPTION + + Searches/replaces strings in the database. + +SYNOPSIS + + wp search-replace [...][--dry-run] [--network][--all-tables-with-prefix] [--all-tables][--export[=]] + [--export_insert_size=][--skip-tables=] [--skip-columns=][--include-columns=] [--precise] + [--recurse-objects][--verbose] [--regex][--regex-flags=] [--regex-delimiter=] + [--regex-limit=][--format=] [--report][--report-changed-only] [--log[=]][--before_context=] + [--after_context=] +``` + +Chercher/remplacer dans la bdd: + +```bash +$ wp search-replace 'moto' 'auto' --dry-run --skip-columns=guid ++--------------------+-----------------------+--------------+------+ +| Table | Column | Replacements | Type | ++--------------------+-----------------------+--------------+------+ +| wp_commentmeta | meta_key | 0 | SQL | +| wp_commentmeta | meta_value | 0 | SQL | +| wp_comments | comment_author | 0 | SQL | +| wp_comments | comment_author_email | 0 | SQL | +| wp_comments | comment_author_url | 0 | SQL | +| wp_comments | comment_author_IP | 0 | SQL | +| wp_comments | comment_content | 0 | SQL | +| wp_comments | comment_approved | 0 | SQL | +| wp_comments | comment_agent | 0 | SQL | +| wp_comments | comment_type | 0 | SQL | +| wp_links | link_url | 0 | SQL | +| wp_links | link_name | 0 | SQL | +| wp_links | link_image | 0 | SQL | +| wp_links | link_target | 0 | SQL | +| wp_links | link_description | 0 | SQL | +| wp_links | link_visible | 0 | SQL | +| wp_links | link_rel | 0 | SQL | +| wp_links | link_notes | 0 | SQL | +| wp_links | link_rss | 0 | SQL | +| wp_options | option_name | 0 | SQL | +| wp_options | option_value | 0 | PHP | +| wp_options | autoload | 0 | SQL | +| wp_postmeta | meta_key | 0 | SQL | +| wp_postmeta | meta_value | 0 | PHP | +| wp_posts | post_content | 0 | SQL | +| wp_posts | post_title | 0 | SQL | +| wp_posts | post_excerpt | 0 | SQL | +| wp_posts | post_status | 0 | SQL | +| wp_posts | comment_status | 0 | SQL | +| wp_posts | ping_status | 0 | SQL | +| wp_posts | post_password | 0 | SQL | +| wp_posts | post_name | 0 | SQL | +| wp_posts | to_ping | 0 | SQL | +| wp_posts | pinged | 0 | SQL | +| wp_posts | post_content_filtered | 0 | SQL | +| wp_posts | post_type | 0 | SQL | +| wp_posts | post_mime_type | 0 | SQL | +| wp_term_taxonomy | taxonomy | 0 | SQL | +| wp_term_taxonomy | description | 0 | SQL | +| wp_termmeta | meta_key | 0 | SQL | +| wp_termmeta | meta_value | 0 | SQL | +| wp_terms | name | 1 | SQL | +| wp_terms | slug | 2 | SQL | +| wp_usermeta | meta_key | 0 | SQL | +| wp_usermeta | meta_value | 0 | PHP | +| wp_users | user_login | 0 | SQL | +| wp_users | user_nicename | 0 | SQL | +| wp_users | user_email | 0 | SQL | +| wp_users | user_url | 0 | SQL | +| wp_users | user_activation_key | 0 | SQL | +| wp_users | display_name | 0 | SQL | +| wp_yoast_seo_links | url | 0 | SQL | +| wp_yoast_seo_links | type | 0 | SQL | ++--------------------+-----------------------+--------------+------+ +Success: 3 replacements to be made. +``` + +Pour chercher dans toutes les tables (également celles des plug-ins): `--all-tables` +Pour simuler: `--dry-run` +Pour créer un dump des modfications: `--export=/tmp/staging.sql` \ No newline at end of file diff --git a/docs/Divers/wp-cli/wp_site.md b/docs/Divers/wp-cli/wp_site.md new file mode 100644 index 0000000..3087b34 --- /dev/null +++ b/docs/Divers/wp-cli/wp_site.md @@ -0,0 +1,52 @@ +# wp site + +Aide: + +```bash +$ wp help site +``` + +```bash +NAME + + wp site + +DESCRIPTION + + Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation. + +SYNOPSIS + + wp site + +SUBCOMMANDS + + activate Activates one or more sites. + archive Archives one or more sites. + create Creates a site in a multisite installation. + deactivate Deactivates one or more sites. + delete Deletes a site in a multisite installation. + empty Empties a site of its content (posts, comments, terms, and meta). + list Lists all sites in a multisite installation. + mature Sets one or more sites as mature. + meta Adds, updates, deletes, and lists site custom fields. + option Adds, updates, deletes, and lists site options in a multisite installation. + private Sets one or more sites as private. + public Sets one or more sites as public. + spam Marks one or more sites as spam. + switch-language Activates a given language. + unarchive Unarchives one or more sites. + unmature Sets one or more sites as immature. + unspam Removes one or more sites from spam. +``` + + +Vider un site (posts, comments, terms, et meta): +```bash +$ wp site empty + +# également le dossier /uploads +$ wp site empty --uploads +``` + + diff --git a/docs/Divers/wp-cli/wp_theme.md b/docs/Divers/wp-cli/wp_theme.md new file mode 100644 index 0000000..5a5607f --- /dev/null +++ b/docs/Divers/wp-cli/wp_theme.md @@ -0,0 +1,10 @@ +# wp theme + + + +Aide: + +```bash +$ wp help theme +``` + diff --git a/docs/Divers/wp-cli/wp_user.md b/docs/Divers/wp-cli/wp_user.md new file mode 100644 index 0000000..d9ce486 --- /dev/null +++ b/docs/Divers/wp-cli/wp_user.md @@ -0,0 +1,78 @@ +# wp user + +Aide: + +```bash +$ wp help user +``` + +```bash +NAME + + wp user + +DESCRIPTION + + Manages users, along with their roles, capabilities, and meta. + +SYNOPSIS + + wp user + +SUBCOMMANDS + + add-cap Adds a capability to a user. + add-role Adds a role for a user. + check-password Checks if a user's password is valid or not. + create Creates a new user. + delete Deletes one or more users from the current site. + generate Generates some users. + get Gets details about a user. + import-csv Imports users from a CSV file. + list Lists users. + list-caps Lists all capabilities for a user. + meta Adds, updates, deletes, and lists user custom fields. + remove-cap Removes a user's capability. + remove-role Removes a user's role. + reset-password Resets the password for one or more users. + session Destroys and lists a user's sessions. + set-role Sets the user role. + spam Marks one or more users as spam. + term Adds, updates, removes, and lists user terms. + unspam Removes one or more users from spam. + update Updates an existing user. +``` + +Liste des utilisateurs: + +```bash +$ wp user list ++----+-----------+-------------+--------------------+---------------------+--------------+ +| ID | user_login| display_name| user_email | user_registered | roles ++----+-----------+-------------+--------------------+---------------------+--------------+ +| 2 | bob | bob | bob@example.com | 2018-08-14 15:23:33 | author | +| 1 | bruno | bruno | bruno@clicclac.info| 2017-01-29 08:19:42 | administrator| ++----+-----------+-------------+--------------------+---------------------+--------------+ +``` + +Reset mot-de-passe utilisateur: + +```bash +$ wp user update adminuser@example.com --user_pass=new-password-example +``` + +Créer un nouvel utilisateur: + +```bash +$ wp user create bob bob@example.com --role=author +Success: Created user 2. +Password: 7*P%v1he5ogauZw8eyhxXU)d +``` + +Supprimer l'utilisateur ID2 (et réaffecter ses posts à un autre utilisateur ID1) + +```bash +$ wp user delete 2 --reassign=1 +Success: Removed user 2 from http://silverbook.local/wordpress. +``` + diff --git a/docs/Linux/.DS_Store b/docs/Linux/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/docs/Linux/.DS_Store differ diff --git a/docs/Linux/Editeurs/index.md b/docs/Linux/Editeurs/index.md new file mode 100644 index 0000000..1dad160 --- /dev/null +++ b/docs/Linux/Editeurs/index.md @@ -0,0 +1,8 @@ +# Editeurs + + + +[nano](nano.md) + +[vi](vi.md) + diff --git a/docs/Linux/Editeurs/nano.md b/docs/Linux/Editeurs/nano.md new file mode 100644 index 0000000..d40639a --- /dev/null +++ b/docs/Linux/Editeurs/nano.md @@ -0,0 +1,161 @@ +# Editeurs + +[ss64.com](http://ss64.com/vi.html) + + + +### Nano ([https://www.nano-editor.org/](https://www.nano-editor.org/)) + +CTRL + A : Permet d'aller au début de la ligne + +CTRL + E : Permet d'aller à la fin de la ligne + +CTRL + Y : Permet de remonter de page en page + +CTRL + V : Permet de descendre de page en page + + + +CTRL + _ : Permet de se rendre au n° de ligne indiqué + +CTRL + C : Permet de savoir à quel n° de ligne / colonne / caractère se trouve votre curseur + + + +CTRL + W : Permet de faire une [recherche](https://korben.info/recherche-2) + + + +CTRL + D : Permet de supprimer le caractère sous le curseur + +Meta - T : Coupe le texte depuis le curseur jusqu'à la fin du fichier + + + +CTRL + K : Permet de supprimer une ligne complète (comme la commande dd sous Vi) + +CTRL + U : Coller + + + +CTRL + O : Permet de sauvegarder votre fichier + +CTRL + X : Permet de quitter nano + +CTRL + G : Affiche l'aide + +Meta - X : Masquer / afficher l'aide-mémoire + + + +CTRL + P : déplace le curseur vers le haut + +CTRL + N : déplace le curseur vers le bas + +CTRL + F : déplace le curseur vers la droite + +CTRL + B : déplace le curseur vers la gauche + + + +CTRL + Space : se déplace d'un mot en avant + +Meta - Space : se déplace d'un mot en arrière + + + +Meta - ( : saute au début du paragraphe + +Meta - ) : saute à la fin du paragraphe + +Meta - \ : saute au début du fichier + +Meta - / : saute à la fin du fichier + + + +Meta - U : annuler + +Meta - E : redo + + + +Meta - A : marquer (début) + +Meta - 6 (shift) : copier + + + +Meta - flèche haut : précédent + +Meta - flèche bas : suivant + + + +CTRL + B : en arrière + +CTRL + F : en avant + + + +CTRL + J : Justifier + +CTRL + T : correcteur orthographique + +CTRL + _ : aller à la ligne xx + + + +*CTRL + \ : Remplacer** + +**Meta - ] : Parenthèse* + + + +Meta sur macOS: ESC puis + + + +#### Copier / couper / coller sous nano + +Se placer devant la ligne: + +CTRL + K pour couper la ligne courante + +CTRL + U pour la recoller + +puis + +CTRL + U pour la coller ailleurs + + + +#### Pour sélectionner plusieurs lignes: + +Placer une marque: + +CTRL + ^ (ou Meta - A) + +et se déplacer avec les flèches pour surligner le texte. + +puis + +CTRL + K pour couper le bloc + +Meta - ^ pour copier le bloc + +puis + +CTRL + U pour le coller + + + +#### Recherche + +CTRL + W + +Occurence suivante: + +CTRL + W puis Retour + +CTRL + C pour sortir du mode recherche \ No newline at end of file diff --git a/docs/Linux/Editeurs/vi.md b/docs/Linux/Editeurs/vi.md new file mode 100644 index 0000000..5a5450c --- /dev/null +++ b/docs/Linux/Editeurs/vi.md @@ -0,0 +1,48 @@ +# vi + + + +https://ss64.com/vi.html + +![vi modes](vimodes.png + +vi est éditeur de texte disponible sur tous les linux. + +Très puissant, son fonctionnement en 3 modes insertion, commande et ligne de commande est déroutante pour le débutant. + +![vimodes](vimodes.png) + +(c) [ss64.com](https://ss64.com/vi.html) + + + +Au lancement, vi est en **mode commande**. + +- ***:w*** sauver les changements dans le buffer +- ***ZZ*** ou ***:wp*** sauver les changements et quitter vi +- ***:q!*** quitter sans sauver +- ***:w file*** sauver dans un nouveau fichier +- ***:10,15w* file** sauver les lignes dans un nouveau fichier +- ***:10,15w* file** sauver les lignes dans un nouveau fichier + + + +Pour passer en **mode insertion**, taper: + +- i +- I +- o +- O +- a +- A + + + +Pour repasser en **mode commande**, taper *ESC* + + + + + + + diff --git a/docs/Linux/Editeurs/vimodes.png b/docs/Linux/Editeurs/vimodes.png new file mode 100644 index 0000000..cf1fe4e Binary files /dev/null and b/docs/Linux/Editeurs/vimodes.png differ diff --git a/docs/Linux/archiver.md b/docs/Linux/archiver.md new file mode 100644 index 0000000..1ad3265 --- /dev/null +++ b/docs/Linux/archiver.md @@ -0,0 +1,299 @@ +# Archiver et compresser + +#### tar + +Créer une archive tar: **tar -cvf** + +```bash +root@DiskStation:~ # tar -cvf archive.tar .profile .bashrc test-dossier/ +``` + +Afficher le contenu de l'archive sans l'extraire: **tar -tf** + +```bash +root@DiskStation:~ # tar -tf archive.tar +.profile +.bashrc +test-dossier/ +test-dossier/test-copy-scp.txt +``` + +Ajouter un fichier à l'archive: **tar -rvf** + +```bash +root@DiskStation:~ # tar -rvf archive.tar .bash_history + +root@DiskStation:~ # tar -tf archive.tar +.profile +.bashrc +test-dossier/ +test-dossier/test-copy-scp.txt +.bash_history +``` + +Extraire les fichiers de l'archive: **tar -xvf** + +```bash +root@DiskStation:~ # tar -xvf archive.tar +``` + + + +#### gzip + +Compresser avec gzip: + +```bash +root@DiskStation:~ # gzip archive.tar + +root@DiskStation:~ # ls +archive.tar.gz +``` + +Decompresser avec gunzip: + +```bash +root@DiskStation:~ # gunzip archive.tar.gz + +root@DiskStation:~ # ls +archive.tar +``` + +Voir le contenu de l'archive avec zcat: + + + +#### bzip2 + +Compresser avec bzip2: + +```bash +root@DiskStation:~ # bzip2 archive.tar + +root@DiskStation:~ # ls +archive.tar.bz2 +``` + +Decompresser avec bunzip2: + +```bash +root@DiskStation:~ # bunzip2 archive.tar.bz2 + +root@DiskStation:~ # ls archive.tar +``` + + + +#### zip + +Compresser avec zip: + +```bash +bruno@DS916:~ $ zip -r scripts.zip scripts/ + adding: scripts/ (stored 0%) + adding: scripts/@eaDir/ (stored 0%) + adding: scripts/@eaDir/ffmpeg@SynoResource (deflated 84%) + adding: scripts/@eaDir/ffmpeg@SynoEAStream (deflated 35%) + adding: scripts/ffmpeg (deflated 64%) + adding: scripts/ffmpeg-convertMP4v3.sh (deflated 50%) + adding: scripts/running3.sh (deflated 48%) + adding: scripts/ffmpeg-convertMP4v4.sh (deflated 49%) + adding: scripts/ffmpeg-convertMP4v5.sh (deflated 56%) +``` + +Exclure les fichiers ressources invisibles (“*MACOSX” “.*Filename” “.ds store”): + +```bash +bruno@DS916:~ $ zip -r -X scripts.zip scripts/ +``` + +Décompresser avec zip: + +```bash +bruno@DS916:~/test $ unzip scripts.zip +Archive: scripts.zip + creating: scripts/ + creating: scripts/@eaDir/ + inflating: scripts/@eaDir/ffmpeg@SynoResource + inflating: scripts/@eaDir/ffmpeg@SynoEAStream + inflating: scripts/ffmpeg + inflating: scripts/ffmpeg-convertMP4v3.sh + inflating: scripts/running3.sh + inflating: scripts/ffmpeg-convertMP4v4.sh + inflating: scripts/ffmpeg-convertMP4v5.sh +``` + + + +#### dmg (macOS) + +Créer: + +```bash +bruno@SilverBook:~$ hdiutil create -format UDZO -srcfolder hubiC/ hubic.dmg +......... +created: /Users/bruno/hubic.dmg +``` + +Différents formats d'image: + +- UDZO – Compressed image (default) +- UDRO – Read only image +- UDBZ – Better compressed image +- UDRW – Read/Write image +- UDTO – DVD disk image + +Monter: + +```bash +bruno@SilverBook:~$ hdiutil attach hubic.dmg +Calcul de la somme de contrôle de Protective Master Boot Record (MBR : 0)… +Protective Master Boot Record (MBR : : vérifiée CRC32 $DC586CEA +Calcul de la somme de contrôle de GPT Header (Primary GPT Header : 1)… + GPT Header (Primary GPT Header : 1) : vérifiée CRC32 $4EE88DC7 +Calcul de la somme de contrôle de GPT Partition Data (Primary GPT Table : 2)… +GPT Partition Data (Primary GPT Tabl : vérifiée CRC32 $42D33ACB +Calcul de la somme de contrôle de (Apple_Free : 3)… + (Apple_Free : 3) : vérifiée CRC32 $00000000 +Calcul de la somme de contrôle de disk image (Apple_HFS : 4)… +......................................................................................................................... + disk image (Apple_HFS : 4) : vérifiée CRC32 $D4406A43 +Calcul de la somme de contrôle de (Apple_Free : 5)… + (Apple_Free : 5) : vérifiée CRC32 $00000000 +Calcul de la somme de contrôle de GPT Partition Data (Backup GPT Table : 6)… +GPT Partition Data (Backup GPT Table : vérifiée CRC32 $42D33ACB +Calcul de la somme de contrôle de GPT Header (Backup GPT Header : 7)… + GPT Header (Backup GPT Header : 7) : vérifiée CRC32 $16D559B6 +vérifiée CRC32 $BE421D06 +/dev/disk3 GUID_partition_scheme +/dev/disk3s1 Apple_HFS /Volumes/hubiC +``` + +Voir: + +```bash +bruno@SilverBook:~$ ls -lah /Volumes/hubiC/ +total 8 +drwxr-xr-x 11 bruno staff 442B 12 aoû 12:05 . +drwxr-xr-x@ 6 root wheel 204B 12 aoû 12:07 .. +drwxr-xr-x 2 bruno staff 68B 6 aoû 17:39 Documents +drwxr-xr-x 3 bruno staff 102B 6 aoû 17:39 HubiC +-rw-r--r-- 1 bruno staff 669B 6 aoû 17:39 HubiC readme.txt +drwxr-xr-x 2 bruno staff 68B 6 aoû 17:39 Images +drwxr-xr-x 2 bruno staff 68B 6 aoû 17:39 Videos +drwxr-xr-x 9 bruno staff 306B 6 aoû 17:39 scripts plex 0.9xx +drwxr-xr-x 9 bruno staff 306B 6 aoû 17:39 scripts plex 1.0xx +``` + +Ejecter: + +```bash +bruno@SilverBook:~$ hdiutil eject /Volumes/hubiC/ +"disk3" unmounted. +"disk3" ejected. +``` + + + +#### Archiver et compresser en même temps (gzip) + +Archiver et compresser en gzip: **tar -zcvf** + +```bash +root@DiskStation:~ # tar -zcvf archive.tar.gz .bashrc .profile test-dossier/ +.bashrc +.profile +test-dossier/ +test-dossier/test-copy-scp.txt + +root@DiskStation:~ # ls +archive.tar.gz +``` + +Voir le contenu de l'archive gzip: **tar -ztf** + +```bash +root@DiskStation:~ # tar -ztf archive.tar.bz2 +``` + +Décompresser: **tar -xzvf** + +```bash +root@DiskStation:~ # tar -xzvf archive.tar.gz +.bashrc +.profile +test-dossier/ +test-dossier/test-copy-scp.txt + +root@DiskStation:~ # ls -la +drwxr-xr-x 3 root root 4096 Aug 6 07:45 . +drwx—— 8 root root 4096 Aug 6 07:18 .. +-rw-r–r– 1 root root 953 Aug 5 11:04 .bashrc +-rw-r–r– 1 root root 497 Aug 5 10:15 .profile +-rw-r–r– 1 root root 925 Aug 6 07:42 archive.tar.gz +drwxr-xr-x 2 root root 4096 Aug 6 07:04 test-dossier + +# décompresser dans un dossier cible +root@DiskStation:~ # tar -xzvf archive.tar.gz -C /tmp/ +``` + + + +#### Archiver et compresser en même temps (bz2) + +Décompresser: **tar -xf (+ v pour mode verbose)** + +```bash +root@DS916:/volume1/web/_archives# tar -xf nextcloud-11.0.2.tar.bz2 +root@DS916:/volume1/web/_archives# ls -la + +total 137156 + +d---------+ 1 root root 308 Apr 15 16:58 . +d---------+ 1 root root 306 Apr 15 16:57 .. +----------+ 1 bruno users 3045723 Oct 20 07:07 gitlist-0.5.0.tar.gz +drwxr-xr-x 1 nobody 65534 414 Feb 26 20:44 nextcloud +----------+ 1 bruno users 38598274 Apr 15 09:48 nextcloud-11.0.2.tar.bz2 +``` + + + +#### Extraire un seul fichier d'une archive tar.gz + +Extrait le fichier README de l'archive automysqlbackup-v3.0_rc6.tar.gz + +```bash +bruno@SilverBook:~/Downloads$ tar --extract --file=automysqlbackup-v3.0_rc6.tar.gz README +``` + +Extrait le fichier book.enchant.html du dossier php-chunked-xhtml de l'archive php*manual*fr.tar.gz + +```bash +bruno@SilverBook:~/Downloads$ tar --extract --file=php_manual_fr.tar.gz php-chunked-xhtml/book.enchant.html +``` + +Extraire plusieurs fichiers d'archive: + +```bash +bruno@SilverBook:~/Downloads$ tar xvf php_manual_fr.tar.gz php-chunked-xhtml/book.enchant.html php-chunked-xhtml/function.mysql-connect.html +``` + + + +#### Extraire un seul fichier d'une archive zip + +Connaitre la liste des fichiers de l'archive: + +```bash +bruno@SilverBook:~/Downloads$ unzip -l zenphoto-zenphoto-1.4.14.zip +``` + +Extraire des fichiers de l'archive: + +```bash +bruno@SilverBook:~/Downloads$ unzip zenphoto-zenphoto-1.4.14.zip zenphoto-zenphoto-1.4.14/zp-core/zp-extensions/zenpage/zenpage.css zenphoto-zenphoto-1.4.14/zp-core/zp-extensions/tinymce4/skins/lightgray/img/anchor.gif +Archive: zenphoto-zenphoto-1.4.14.zip +4c21854e7a7950ec8d9644a959da019d9781d36c + inflating: zenphoto-zenphoto-1.4.14/zp-core/zp-extensions/tinymce4/skins/lightgray/img/anchor.gif + inflating: zenphoto-zenphoto-1.4.14/zp-core/zp-extensions/zenpage/zenpage.css +``` \ No newline at end of file diff --git a/docs/Linux/commandes.md b/docs/Linux/commandes.md new file mode 100644 index 0000000..76001c0 --- /dev/null +++ b/docs/Linux/commandes.md @@ -0,0 +1,119 @@ +# Commandes + +### Supprimer le contenu d’un repertoire Linux: + +On se place dans le répertoire puis: + +`bruno@macbook-pro:~/Desktop/folder$ rm -rf *` + +ou alors: + +`bruno@macbook-pro:~/Desktop/folder$ rm -rf ton_repertoire/*` + + + +### Copier tous les fichiers .zip dans un autre dossier: + +```bash +$ cp *.zip /volume1/Backup/ +``` + + + +### Déplacer un fichier vers un dossier parent: + +```bash +$ mv plex.zip ../../.. +``` + + + +### Connaitre le SHELL utilisé: + +```bash +$ echo $SHELL +/opt/bin/bash +``` + + + +### Aller au répertoire utilisateur: + +```bash +$ cd $HOME +``` + + + +### Afficher les numéros de ligne avec cat: + +```bash +$ cat --number foo.c | more +$ cat -n foo.c | less +``` + + + +### Commentaire multi-lignes: + +```bash +#!/bin/bash +echo "Say Something" +< +$ usermod -aG sudo +# ou +$ sudo gpasswd -a sudo +Adding user to group sudo +``` + +Retirer les privilèges super-utilisateur (sudo) à un utilisateur: + +```bash +$ sudo deluser sudo +$ sudo gpasswd -d sudo + +# retire de tous les groups sauf de son groupe individuel +$ usermod -G "" + +``` + diff --git a/docs/Linux/conditions.md b/docs/Linux/conditions.md new file mode 100644 index 0000000..41f65eb --- /dev/null +++ b/docs/Linux/conditions.md @@ -0,0 +1,402 @@ +# Conditions + + + +## IF + +### if + +```bash +if [ $foo -ge 3 ]; then + ... (si $foo >= 3) +elif [ $foo -lt 3 ]; then + ... (si $foo < 3) +else + ... +fi + +if [ $foo -ge 3 ] +then + ... (si $foo >= 3) +elif [ $foo -lt 3 ] +then + ... (si $foo < 3) +else + ... +fi +``` + + + +### if imbriqué + +```bash +if [ $value -ge 1 ] +then + + if [ $foo -eq 1 ] + then + echo "One" + elif [ $foo -eq 2 ] + then + echo "Two" + else + echo "Bigger than two" + fi + +fi +``` + + + +### AND & OR + +```bash +if [[ -n $1 ]] && [[ -r $1 ]] +then + echo "File exists and is readable" +fi + + +if [[ -z $1 ]] || [[ ! -r $1 ]] +then + echo "Either you didn't give me a value or file is unreadable" + exit 2 +fi +``` + + + +### Conditions: + +#### -fichier + +Si le fichier *existingfile* existe + +```bash +if [ -a existingfile ]; then +ou +if [ -e existingfile ]; then + +if [ -a tmp.tmp ]; then +``` + +Si le fichier *blockspecialfile (/dev/fd0)* existe + +```bash +if [ -b blockspecialfile ]; then + +if [ -b /dev/fd0 ]; then +``` + +Si le fichier *characterspecialfile (/dev/null tty)* existe + +```bash +if [ -c characterspecialfile ]; then + +if [ -c /dev/dsp ]; then +``` + +Si le répertoire *directory* existe + +```bash +if [ -d directory ]; then + +if [ -d ~/.kde ]; then +``` + +Si le fichier *regularfile (ni un blockspecialfile, ni un characterspecialfile, ni un directory)* existe + +```bash +if [ -f regularfile ]; then + +if [ -f ~/.bashrc ]; then +``` + +Si le fichier *sgidfile (set-group-ID)* existe + +```bash +if [ -g sgidfile ]; then + +if [ -g . ]; then +``` + +Si le fichier *fileownedbyeffectivegroup* existe + +``` +if [ -G fileownedbyeffectivegroup ]; then + +if [ ! -G file ]; then +``` + +Si le fichier *symboliclink (symbolic link)* existe + +```bash +if [ -h symboliclink ]; then +ou +if [ -L symboliclink ]; then + +if [ -h $pathtofile ]; then +``` + +Si le fichier *stickyfile (sticky bit set)* existe + +```bash +if [ -k stickyfile ]; then + +if [ ! -k /tmp ]; then +``` + +Si le fichier *modifiedsincelastread* *(a été modifié aprèès la dernière lecture)* existe + +```bash +if [ -N modifiedsincelastread ]; then + +if [ -N /etc/crontab ]; then +``` + +Si le fichier *fileownedbyeffectiveuser* *(si l'utilisateur exécutant le script le possède)* existe + +```bash +if [ -O fileownedbyeffectiveuser ]; then + +if [ -O file ]; then +``` + +Si le fichier *namedpipe* existe + +```bash +if [ -p namedpipe ]; then + +if [ -p $file ]; then +``` + +Si le fichier *readablefile (droit lecture)* existe + +```bash +if [ -r readablefile]; then + +if [-r file ]; then +``` + +Si le fichier *noemptyfile (taille > 0 octet)* existe + +```bash +if [ -s nonemptyfile ]; then + +if [ -s logfile ]; then +``` + +Si le fichier *socket* existe + +```bash +if [ -S socket ]; then + +if [ -S /var/lib/mysql/mysql.sock ]; then +``` + +Si le fichier *openterminal* existe + +```bash +if [ -t openterminal ]; then + +if [ -t /dev/pts/3 ]; then +``` + +Si le fichier *suidfile (set-user-ID)* existe + +```bash +if [ -u suidfile ]; then + +if [ -u executable ]; +``` + +Si le fichier *writeablefile (droit écriture)* existe + +```bash +if [ -w writeablefile ]; then + +if [ -w /dev/hda ]; then +``` + +Si le fichier *executablefile (droit exécutable)* existe + +```bash +if [ -x executablefile ]; then + +if [ -x /root ]; +``` + +Si le fichier *newerfile a été modifié après olderfile*, ou *si newerfile existe et pas olderfile.* + +```bash +if [ newerfile -nt olderfile ]; then + +if [ story.txt1 -nt story.txt ]; +``` + +Si le fichier *olderfile a été modifié avant newerfile*, ou *si newerfile existe et pas olderfile.* + +```bash +if [ olderfile -ot newerfile ]; then + +if [ /mnt/remote/remotefile -ot localfile ]; then +``` + +Si les fichiers *same et file font référence au même device / inode* + +```bash +if [ same -ef file ]; then + +if [ /dev/cdrom -ef /dev/dvd ]; then +``` + + + + + +#### -chaine + +Si les chaines sont *identiques* [ STRING1 == STRING2 ] + +```bash +if [ “$1” == “moo” ]; then +``` + +Si les chaines sont *différentes* [ STRING1 != STRING2 ] + +```bash +if [ “$userinput” != “$password” ]; +``` + +Si la chaine 1 *est triée après* la chaine 2 [ STRING1 > STRING2 ] + +```bash +if [ “$userinput” > “$password” ]; +``` + +Si la chaine 1 *est triée avant* la chaine 2 [ STRING1 < STRING2 ] + +```bash +if [ “$userinput” < “$password” ]; +``` + +Si la chaine *NONEMPTYSTRING a une longueur > 0* (contient 1 ou plusieurs caractères) + +```bash +if [ -n NONEMPTYSTRING ]; then + +if [ -n “$userinput” ]; then +``` + +Si la chaine *EMPTYSTRING est vide* (NULL) + +```bash +if [ -z EMPTYSTRING ]; then + +if [ -z $uninitializedvar ]; then +``` + +Si la chaine réussie la REGEX [[ STRING1 =~ REGEXPATTERN ]] + +```bash +if [[ “$email” =~ “b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}b” ]]; then +``` + + + +#### -nombre + +Si deux nombres sont égaux (EQual) [ NUM1 -eq NUM2 ] + +```bash +if [ $NUM1 -eq $NUM2 ]; then +``` + +Si deux nombres sont différents (Not Equal) [ NUM1 -ne NUM2 ] + +```bash +if [ $NUM1 -ne $NUM2 ]; then +``` + +Si NUM 1 est supérieur à NUM 2 (Greater Than) [ NUM1 -gt NUM2 ] + +```bash +if [ $NUM1 -gt $NUM2 ]; then +``` + +Si NUM 1 est supérieur ou égal à NUM 2 (Greater than or Equal) [ NUM1 -ge NUM2 ] + +```bash +if [ $NUM1 -ge $NUM2 ]; then +``` + +Si NUM 1 est inférieur à NUM 2 (Less Than) [ NUM1 -lt NUM2 ] + +```bash +if [ $NUM1 -lt $NUM2 ]; then +``` + +Si NUM 1 est inférieur ou égal à NUM 2 (Less than or Equal) [ NUM1 -le NUM2 ] + +```bash +if [ $NUM1 -le $NUM2 ]; then +``` + +Exemples: + +```bash +if [ $? -eq 0 ]; then # $? returns the exit status of the previous command +echo “Previous command ran succesfully.” +fi + +if [ $(ps -p $pid -o ni=) -ne $(nice) ]; then +echo “Process $pid is running with a non-default nice value” +fi + +if [ $num -lt 0 ]; then +echo “Negative numbers not allowed; exiting…” +exit 1 +fi +``` + + + +#### -double parenthèses + +Si deux nombres sont égaux (( NUM1 == NUM2 )) + +```bash +if (( NUM1 == NUM2 )); then +``` + +Si deux nombres sont différents (( NUM1 != NUM2 )) + +```bash +if (( NUM1 != NUM2 )); then +``` + +Si NUM 1 est supérieur à NUM 2 (( NUM1 > NUM2 )) + +```bash +if (( NUM1 > NUM2 )); then +``` + +Si NUM 1 est supérieur ou égal à NUM 2 (( NUM1 >= NUM2 )) + +```bash +if (( NUM1 >= NUM2 )); then +``` + +Si NUM 1 est inférieur à NUM 2 (( NUM1 < NUM2 )) + +```bash +if (( NUM1 < NUM2 )); then +``` + +Si NUM 1 est inférieur ou égal à (( NUM1 <= NUM2 )) + +```bash +if (( NUM1 <= NUM2 )); then +``` + diff --git a/docs/Linux/executer.md b/docs/Linux/executer.md new file mode 100644 index 0000000..2b60a87 --- /dev/null +++ b/docs/Linux/executer.md @@ -0,0 +1,308 @@ +# Excecuter une application en root + + + +### A) Sudo + +Avec sudo, on prend les droits root pour exécuter une commande. + +```bash +$ sudo opkg update +``` + +Le mot de passe est mémorisé pendant x minutes, pendant les lesquelles pour les commandes lancées avec sudo, le mot-de-passe n'est pas demandé. + +On peut "oublier" le mot de passe mémorisé. + +```bash +$ sudo -k +``` + +On peut ouvrir une "session root" avec sudo. + +```bash +$ sudo -i +``` + +Avec **sudo -i**, le mot de passe **utilisateur** est demandé. +Avec **su -**, le mot de passe **root** est demandé. + +Obtenir la listes des commandes dispos: + +```bash +$ sudo -l +Password: +Matching Defaults entries for bruno on DS916: + syslog=authpriv + +User bruno may run the following commands on DS916: + (ALL) ALL +``` + + + +### B) sudoers + +Plutot que d'éditer `sudoers`, on peut créer des fichiers de personnalisation dans `/etc/sudoer.d/` + +```bash +/etc/sudoers.d$ ls -la +total 28 +drwxr-xr-x 2 root root 4096 sept. 11 20:02 . +drwxr-xr-x 144 root root 12288 sept. 11 19:52 .. +-r--r----- 1 root root 180 mars 22 2017 mintupdate +-r--r----- 1 root root 958 janv. 18 2018 README +-r--r----- 1 root root 51 août 26 10:20 vagrant +``` + +`chmod 440` sur ces fichier. + + + +#### options + +Reduire le temps de grâce: + +Ajouter `timestamp_timeout=X` à la ligne `Defaults` + +```bash +Defaults env_reset,timestamp_timeout=X +``` + + + +#### Cmnd alias + +Il faut éditer `/etc/sudoers` avec visudo: + +```bash +$ sudo visudo -s +``` + +ou avec nano: + +```bash +$ sudo nano /etc/sudoers +``` + + + +```bash +# /etc/sudoers +# +# This file MUST be edited with the 'visudo' command as root. +# +# See the man page for details on how to write a sudoers file. +# Host alias specification + +# User alias specification + +# Cmnd alias specification +Cmnd_Alias NETWORK=/sbin/ifconfig, /sbin/iwconfig, /sbin/dhclient + +# Defaults + +Defaults !lecture,tty_tickets,!fqdn,insults + +# User privilege specification +root ALL=(ALL) ALL + +# Members of the admin group may gain root privileges +%admin ALL=(ALL) ALL, NOPASSWD:NETWORK +``` + +root a tous les droits. + +le groupe (%) admin peut lancer `ifconfig` avec un sudo mais SANS mot-de-passe, et tout le reste avec sudo Et mot-de-passe. + +```bash +$ sudo ifconfig +``` + + + +username n'a le droit d'exécuter sudo que pour le seul script.sh (et sans mot-de-passe) + +``` +username ALL=NOPASSWD: /mon/script.sh +``` + +```bash +$ sudo /mon/script.sh +``` + + + +autres exemples: + +```bash +nano vagrant +``` + +```bash +# add vagrant user +vagrant ALL=(ALL) NOPASSWD:ALL +``` + + + +```bash +nano mintupdate +``` + +```bash +# Allow any user to check for new system updates without +# requiring user autentification + +Cmnd_Alias UPDATE = /usr/lib/linuxmint/mintUpdate/checkAPT.py + +ALL ALL = NOPASSWD:UPDATE +``` + + + +[https://doc.ubuntu-fr.org/sudoers](https://doc.ubuntu-fr.org/sudoers) + + + +### C) Setuid + +### suid + +Lorsque l’on place un suid sur un fichier, n’importe quel utilisateur peut l’exécuter en héritant des permissions du propriétaire, comme s’il était lui-même le propriétaire. + +Exemple: quand un fichier exécutable est propriété de l'[utilisateur root](https://fr.wikipedia.org/wiki/Utilisateur_root), et est rendu *setuid*, tout processus exécutant ce fichier peut effectuer ses tâches avec les permissions associées à root + +Le *suid* ne s’active que sur des fichiers. La valeur de *suid* est 4 sur le chiffre octal de poids fort, son flag est s ou S (s si le droit d'exécution est présent, S sinon). + +Pour activer le *suid* : + + ```bash +$ chmod u+s fichier + +$ chmod 4755 fichier + ``` + +Pour supprimer le *suid*: + + ```bash +$ sudo chmod u-s fichier + +$ chmod 0755 fichier + ``` + + + +```bash +$ ls -la +-rwxr-xr-x 1 bruno users 2264 Sep 11 17:02 _npm.sh + +# on met le suid (exécutable + suid -> s) +$ chmod u+s _npm.sh +$ ls -la +-rwsr-xr-x 1 bruno users 2264 Sep 11 17:02 _npm.sh + +# on retire le suid +$ chmod u-s _npm.sh +$ ls -la +-rwxr-xr-x 1 bruno users 2264 Sep 11 17:02 _npm.sh + +# le script n'est pas exécutable +$ chmod 644 _npm.sh +$ ls -la +$ -rw-r--r-- 1 bruno users 2264 Sep 11 17:02 _npm.sh + +#on met le suid (non exécutable + suid -> S) +$ chmod u+s _npm.sh +$ ls -la +-rwSr--r-- 1 bruno users 2264 Sep 11 17:02 _npm.sh +``` + +~~Un script ne peut pas être set-uid.~~ + +~~c'est pas au niveau du script mais du binaire appelé qu'il faut le faire~~ + + + +Rendre root possesseur du script. + +```bash +$ chown root:root /path/to/root-script.sh` +``` + + + +#### sgid + +**Sur un fichier**: ce droit fonctionne comme le droit *suid*, mais appliqué aux groupes. + +Il donne à un utilisateur les droits du groupe auquel appartient le propriétaire de l’exécutable et non plus les droits du propriétaire. + +La valeur de *sgid* est 2 sur le chiffre octal de poids fort, son flag est s ou S (s si le droit d'exécution est présent, S sinon). + +Pour activer le *sgid*: + +```bash +$ chmod g+s fichier + +$ chmod 2755 fichier +``` + +Pour activer le *suid* et le *sgid*: + +```bash +$ chmod ug+s fichier + +# le poids fort vaut 6 (4+2) +$ chmod 6755 fichier +``` + +Pour supprimer le *sgid*: + +```bash +$ chmod u-s fichier + +$ chmod 0755 fichier +``` + + + +**Sur un répertoire**: ce droit a une tout autre utilisation s’il est appliqué à un répertoire. + +Normalement, lorsqu’un fichier est créé par un utilisateur, il en est propriétaire, et un groupe par défaut lui est appliqué (généralement *users* si le fichier a été créé par un utilisateur, et *root* ou *wheel* s’il a été créé par *root*). +Cependant, lorsqu’un fichier est créé dans un répertoire portant le droit SGID, alors ce fichier se verra attribuer par défaut le groupe du répertoire. De plus, si c’est un autre répertoire qui est créé dans le répertoire portant le droit *sgid*, ce sous-répertoire portera également ce droit. En revanche, si des sous-répertoires existent déjà au moment de l'ajout du *Setgid*, ils ne sont pas affectés par celui-ci. + +```bash +$ chmod g+s repertoire + +$ chmod 2755 repertoire +``` + + + +#### sticky bit + +Le droit d’écriture signifie que l’on peut créer et supprimer les fichiers de ce répertoire. Le sticky bit permet de faire la différence entre les deux droits. + +**Sur un fichier,** Gnu/Linux n’en tient pas compte contrairement aux vieux systèmes Unix. Ainsi le sticky bit activé indique à l’OS que le fichier sera utilisé fréquemment et sera ainsi stocké dans un fichier d’échange pour avoir la main dessus rapidement. + +La valeur du *sticky bit* est 1 sur le chiffre octal de poids fort, son flag est t ou T. + +```bash +$ sudo chmod +t fichier* +$chmod 1750 /path/to/root-script.sh +``` + +**Sur un répertoire** le sticky bit aura pour effet d’interdire à quiconque n’étant pas le propriétaire du fichier sa suppression. Cependant, il sera toujours possible de modifier le fichier d’un autre si l’on possède les droits nécessaires. La création de nouveaux fichiers est toujours possible pour tous les utilisateurs possédant le droit d'écriture sur ce répertoire + +```bash +$ sudo chmod +t repertoire* +``` + +Sur certains systèmes UNIX, le sticky bit est utilisé pour le répertoire /tmp + + + +### D) gksu & gksudo + +Ce sont simplement des front-end graphiques pour *su* et *sudo*. \ No newline at end of file diff --git a/docs/Linux/filtres.md b/docs/Linux/filtres.md new file mode 100644 index 0000000..ec865cf --- /dev/null +++ b/docs/Linux/filtres.md @@ -0,0 +1,45 @@ +# Filtres + +#### sort + +Sorts standard input then outputs the sorted result on standard output. + +#### uniq + +Given a sorted stream of data from standard input, it removes duplicate lines of data (i.e., it makes sure that every line is unique). + +#### grep + +Examines each line of data it receives from standard input and outputs every line that contains a specified pattern of characters. + +#### fmt + +Reads text from standard input, then outputs formatted text on standard output. + +#### pr + +Takes text input from standard input and splits the data into pages with page breaks, headers and footers in preparation for printing. + +#### head + +Outputs the first few lines of its input. Useful for getting the header of a file. + +#### tail + +Outputs the last few lines of its input. Useful for things like getting the most recent entries from a log file. + +#### tr + +Translates characters. Can be used to perform tasks such as upper/lowercase conversions or changing line termination characters from one type to another (for example, converting DOS text files into Unix style text files). + +#### sed + +Stream editor. Can perform more sophisticated text translations than tr. + +#### awk + +An entire programming language designed for constructing filters. Extremely powerful. + + + +`-rw-r–r– 1 root root 0 avril 24 22:49 security.ubuntu.com*ubuntu*dists*xenial-security*restricted*binary-i386*Packages` \ No newline at end of file diff --git a/docs/Linux/find.md b/docs/Linux/find.md new file mode 100644 index 0000000..caeb81e --- /dev/null +++ b/docs/Linux/find.md @@ -0,0 +1,118 @@ +# find + + + +La commande **find** permet de retrouver des fichiers à partir de certains critères. Elle doit être utilisé avec l'option **-print** + +Les critères de recherche sont les suivants : + +- **-name** recherche sur le nom du fichier, +- **-perm** recherche sur les droits d'accès du fichier, +- **-links** recherche sur le nombre de liens du fichier, +- **-user** recherche sur le propriétaire du fichier, +- **-group** recherche sur le groupe auquel appartient le fichier, +- **-type** recherche sur le type (d=répertoire, c=caractère, f=fichier normal), +- **-size** recherche sur la taille du fichier en nombre de blocs (1 bloc=512octets), +- **-atime** recherche par date de dernier accès en lecture du fichier, +- **-mtime** recherche par date de dernière modification du fichier, +- **-ctime** recherche par date de création du fichier. + +Options: + + + +Recherche par nom de fichier: + +```bash +find /usr -name toto -print + +find /usr -name " *.c " -print + +# commence par un a ou A, suivi de quelque chose, et se termine par un chiffre compris entre 3 et 6 + +find . -name '[aA]*[3-6]' -print +``` + +Recherche suivant la date de dernière modification: + +```bash +# modifiés il y a 30 jours + +find / -mtime 30 -print + +# modifiés il y a 30 jours ou plus + +find / -mtime +30 -print + +# modifiés il y a 30 jours ou moins + +find / -mtime 30 -print +``` + +Recherche suivant la taille: + +```bash +# fichiers dont la taille dépasse 30ko + +find / -size +30k -print +``` + +Recherche en utilisant les opérateurs logiques: + +```bash +# les fichiers n'appartenant pas à l'utilisateur olivierles fichiers n'appartenant pas à l'utilisateur olivier + +find . ! -user olivier -print + +# Recherche les fichiers dont le nom est a.out ou les fichiers se terminant par *.c (une condition OU l'autre). + +find . \ ( -name a.out -o -name " *.c " \ ) -print + +# Recherche des fichiers dont le nom est core et d'une taille supérieure à 1Mo (une condition ET l'autre). + +find . \ (-name core -a size +2000 \ ) -print +``` + +Recherche combinée: + +```bash +# les fichiers de l'utilisateur bruno dont les permissions sont 755 + +find / -type f -user bruno -perm 755 -print +``` + + + +Commandes en option: + +```bash +# Recherche les fichiers toto et les efface. + +find . -name toto -exec rm {}\ ; + +# Pour avoir une demande de confirmation avant l'exécution de rm + +find . -name toto -ok rm {}\ ; +``` + +Utilisation avec d'autres commandes:' + +```bash +# Recherche les fichiers normaux dans le répertoire courant, puis chercher le chaine toto dans ces fichiers. + +find . -type f -print | xargs grep toto + +# Recherche les fichiers toto et les efface après confimation (-p). +# idem -exec, " | xargs " ne crée qu'un seim processus. + +find . -name toto | xargs -p rm +``` + + + +Redirection des messages d'erreur: + +```bash +find / -name toto -print 2>/dev/null +``` + diff --git a/docs/Linux/grep.md b/docs/Linux/grep.md new file mode 100644 index 0000000..d6a624b --- /dev/null +++ b/docs/Linux/grep.md @@ -0,0 +1,88 @@ +# grep + + + +La commande **grep** permet de rechercher une chaîne de caractères dans un fichier. + +Options: + +```bash +-i (ignore case) insensible à la casse +-v affiche les lignes ne contenant pas la chaîne +-c (count) compte le nombre de lignes contenant la chaîne +-n (number) chaque ligne contenant la chaîne est numérotée +-x ligne correspondant exactement à la chaîne +-l affiche le nom des fichiers qui contiennent la chaîne +-C (context) fait figurer les deux lignes qui précèdent et suivent la ligne où figure le mot recherché +-Ax (after) affiche les x lignes qui suivent la ligne où figure le mot recherché +-Bx (before) affiche les x lignes qui précèdent la ligne où figure le mot recherché +-r (recursif) +-w mot exact +``` + + + +Chercher dans un dossier (récursif): + +```bash +grep -r "brew" ./docs/ +./docs//Divers/plex.md: $ brew install mono + +# N'affiche que les fichiers (-l): +grep -l -r "brew" ./docs/ +./docs//Divers/plex.md +./docs//macos/node-js.md +``` + + + +Regex: + +```bash +grep -E ^a toto.txt +``` + +L'option -E est optionnelle (compatibilité). + +| Caractère spécial | Signification | +| ----------------- | ------------------------------------------------------------ | +| `.` | Caractère quelconque | +| `^` | Début de ligne | +| `$` | Fin de ligne | +| `[]` | Un des caractères entre les crochets | +| `?` | L'élément précédent est optionnel (peut être présent 0 ou 1 fois) | +| `*` | L'élément précédent peut être présent 0, 1 ou plusieurs fois | +| `+` | L'élément précédent doit être présent 1 ou plusieurs fois | +| `|` | Ou | +| `()` | Groupement d'expressions | + +Lignes commençant par les caractères compris entre a et d: + +```bash +grep ^[a-d] fichier.txt +``` + + + +Rechercher plusieurs chaines: + +```bash +grep -E 'tata|toto' fichier.txt +``` + +ou passer un fichier de motifs à grep: + +```bash +cat motif.txt + +grep -f "motif.txt" fichier.txt +``` + + + +Afficher les 5 lignes qui suivent le motif recherché: + +```bash +grep 'toto' -A5 fichier.txt +``` + diff --git a/docs/Linux/index.md b/docs/Linux/index.md new file mode 100644 index 0000000..6718a1e --- /dev/null +++ b/docs/Linux/index.md @@ -0,0 +1,31 @@ +# Linux + +[Authentification automatique par SSH sans mot de passe](../macos/ssh/ssh-passwordless.md) + +[Archiver / compresser](archiver.md) + +[Commande scp](scp.md) + +[Commande sftp](sftp.md) + +[Commande ssh](ssh.md) + +[Commandes tail/head](tail-head.md) + +[Commandes apt-get & apt-cache](../Raspberry/apt-get.md) + +[Editeurs](index.md) (vi, nano…) + +[Shells](shell.md) + +[Permissions](permissions.md) + +[I/O Redirections](redirections.md) + +[Pipelines](pipeline.md) + +[Filtres](filtres.md) + +[Mises-à-jour sans connection internet](maj.md) + +[Quelques commandes sympas](commandes.md) \ No newline at end of file diff --git a/docs/Linux/maj.md b/docs/Linux/maj.md new file mode 100644 index 0000000..6f37ad6 --- /dev/null +++ b/docs/Linux/maj.md @@ -0,0 +1,39 @@ +# Faire les mises-à-jour sans connection internet + +[apt-offline (ubuntu.fr)](https://doc.ubuntu-fr.org/apt-offline) + +[Scripts (ubuntu.fr)](https://doc.ubuntu-fr.org/tutoriel/scripts_de_mise_a_jour_sans_internet) + +[LinuxMint](https://community.linuxmint.com/tutorial/view/1059) + + + +#### 1ere méthode (exemple pour Wine): + +Sur **la machine reliée à internet,** ajouter le dépôt et mettre à jour: + +```bash +$ sudo add-apt-repository ppa:wine/wine-builds +$ sudo apt-get update +``` + +Mettre en cache les paquets sans les extraire: + +```bash +$ sudo apt-get clean +$ sudo apt-get --download-only install winehq-devel +$ sudo apt-get --download-only dist-upgrade +``` + +Copier tous les fichiers .deb contenus dans le dossier /var/cache/apt/archive sur une clé USB: + +```bash +$ cp -R /var/cache/apt/archives/ /media/usb-drive/deb-pkgs/ +``` + +Sur **la machine sans internet**, installer les paquets depuis la clé USB: + +```bash +$ cd /media/usb-drive/deb-pkgs +$ sudo dpkg -i *.deb +``` \ No newline at end of file diff --git a/docs/Linux/permissions.md b/docs/Linux/permissions.md new file mode 100644 index 0000000..5a4d8b5 --- /dev/null +++ b/docs/Linux/permissions.md @@ -0,0 +1,135 @@ +# Permissions + +#### Quelques commandes: + +- su - temporarily become the superuser +- sudo - temporarily become the superuser +- chmod - modify file access rights +- chown - change file ownership +- chgrp - change a file's group ownership + + + +``` + -rwxrwxrwx + + [- (fichier) ou d (dossier)] [rwx (possesseur) - rwx (groupe) - rwx (autres)] + + +``` + + + +#### chmod: change les permissions pour un fichier ou un dossier + +``` +rwx rwx rwx = 111 111 111 +rw- rw- rw- = 110 110 110 +rwx —–- -–— = 111 000 000 +``` + +et + +``` +rwx = 111 in binary = 7 +rw- = 110 in binary = 6 +r-x = 101 in binary = 5 +r–- = 100 in binary = 4 +``` + +**Les réglages les plus courants:** + +*-applications:* + +``` +777 (rwxrwxrwx) +755 (rwxr-xr-x) +700 (rwx——) +``` + +*-fichiers:* + +``` +666 (rw-rw-rw-) +644 (rw-r–r–) +600 (rw——-) +``` + +**Permissions pour les dossiers:** + +- r: permet de lister le contenu d'un répertoire si l'attribut x est mis + +- w: les fichiers à l'intérieur du répertoire peuvent être crées, effacés ou renommer si l'attribut x est mis +- x: permet d'entrer dans le répertoire (cd dir) + +``` +777 (rwxrwxrwx) +755 (rwxr-xr-x) +700 (rwx——) +``` + + + +```bash +bruno@macbook-pro:~$ ls -la +-rw-r--r--@ 1 bruno staff 848 6 aoû 09:20 backup-syno.tar.gz +bruno@macbook-pro:~/test-dossier-2$ chmod 777 backup-syno.tar.gz +bruno@macbook-pro:~$ ls -la +-rwxrwxrwx@ 1 bruno staff 848 6 aoû 09:20 backup-syno.tar.gz +``` + + + +#### chown: change le possesseur d'un fichier ou dossier (superuser) + +```bash +bruno@macbook-pro:~$ ls -la +-rwxrwxrwx@ 1 bruno staff 848 6 aoû 09:20 backup-syno.tar.gz +bruno@macbook-pro:~$ sudo chown root backup-syno.tar.gz +Password: +bruno@macbook-pro:~$ ls -la +-rwxrwxrwx@ 1 root staff 848 6 aoû 09:20 backup-syno.tar.gz +``` + + + +#### chgrp: change le groupe d'un fichier ou dossier (superuser) + +```bash +bruno@macbook-pro:~$ ls -la +-rwxrwxrwx@ 1 root staff 848 6 aoû 09:20 backup-syno.tar.gz +bruno@macbook-pro:~$ sudo chgrp admin backup-syno.tar.gz +bruno@macbook-pro:~$ ls -la +-rwxrwxrwx@ 1 root admin 848 6 aoû 09:20 backup-syno.tar.gz +``` + + + +#### setuid: + +``` +# chown root:root monshell.sh +# chmod 4755 monshell.sh +# exit +$ ./monshell.sh +``` + + + +#### Voir les autorisations au format octal: + + **-Linux:** + +```bash +stat -c '%n %a' * +``` + + **-OSX**: + +```bash +bruno@Parallels-VM ~ $ stat -c '%n %a' * +apt-off.sh 755 +Bureau 755 +Documents 755 +Images 755 +``` diff --git a/docs/Linux/pipeline.md b/docs/Linux/pipeline.md new file mode 100644 index 0000000..5a8d04f --- /dev/null +++ b/docs/Linux/pipeline.md @@ -0,0 +1,37 @@ +# Pipelines + +Connecte plusieurs commandes ensembles (la sortie standart d'une commande est l'entrée standart +de la suivante) + + + +Affiche les fichiers du répertoire par page: + +```bash +bruno@macbook-pro:~$ ls -l | less +``` + + + +Affiche les 10 plus récents fichiers du répertoire: + +```bash +bruno@macbook-pro:~$ ls -lt | head +``` + + + +Affiche une liste de répertoires et leur taille, triée du plus grand au plus petit: + +```bash +bruno@macbook-pro:~$ du | sort -nr +``` + + + +Affiche le nombre total de fichiers du répertoire courant et dans tous ses sous-répertoire: + +```bash +find . -type f -print | wc -l +``` + diff --git a/docs/Linux/redirections.md b/docs/Linux/redirections.md new file mode 100644 index 0000000..8b2d8c1 --- /dev/null +++ b/docs/Linux/redirections.md @@ -0,0 +1,35 @@ +# I/O Redirections + +#### Standard Output + +Redirige la sortie standart vers un nouveau fichier: + +```bash +bruno@macbook-pro:~$ ls > liste.txt +``` + + + +Redirige la sortie standart vers un fichier (ajoute à la suite): + +```bash +bruno@macbook-pro:~$ ls >> liste.txt +``` + + + +#### Standard Input + +Considère liste.txt comme entrée standart (au lieu du clavier): + +```bash +bruno@macbook-pro:~$ sort < liste.txt +``` + + + +#### On peut combiner les 2 + +```bash +bruno@macbook-pro:~$ sort < liste.txt > liste_triee.txt +``` \ No newline at end of file diff --git a/docs/Linux/scp.md b/docs/Linux/scp.md new file mode 100644 index 0000000..960a52e --- /dev/null +++ b/docs/Linux/scp.md @@ -0,0 +1,103 @@ +# Commande scp (copie sécurisée) + +#### Serveur 1 -> Serveur 2 + +Copie d'un fichier d'une machine serveur1 vers une autre machine serveur2: + +```bash +$ scp Login1@Serveur1:Chemin1/NomFichier1 Login2@Serveur2:Chemin2/NomFichier2 + +macbook-pro:~ bruno $ scp root@192.168.1.8:/root/test-copy-scp.txt +funnymac@ssh funnymac@ftp.cluster011.ovh.net:/www/backup/ +``` + + + +#### Client -> Serveur + +Copie d'un fichier depuis le répertoire courant vers un répertoire du serveur: + +```bash +~ scp Fichier login@serveur:Chemin +~ scp /home/mickael/data/Ficher2 root@192.168.10.131:/var/www/ +~ scp /Users/bruno/test-copy-scp-2.txt root@192.168.1.8:/root/ +root@DiskStation:~ # scp /root/.profile funnymac@ftp.cluster011.ovh.net:www/backup/.profile_syno_root +.profile 100% 497 0.5KB/s 0.5KB/s 00:00 +``` + +Copie d'un répertoire, avec éventuellement ses sous-répertoires, vers un répertoire du serveur: + +```bash +~ scp -r Repertoire login@serveur:Chemin +~ scp -r /home/mickael/data/ root@192.168.10.131:/var/www/ +``` + +Si pas port 22 + +```bash +~ scp -r -P 7256 /home/mickael/data/ root@192.168.10.131:/var/www/ +~ scp -r -P 7256 /Users/bruno/test-dossier-2/ root@192.168.1.8:/root/ + +bruno@SilverBook:~/Downloads$ scp -P 7256 IPTV.bundle-master.zip bruno@clicclac.synology.me:/volume1/web +bruno@clicclac.synology.me's password: +IPTV.bundle-master.zip 100% 673KB 84.0KB/s 00:08 +``` + + + +#### Serveur -> Client + +Copie d'un fichier du serveur vers le répertoire courant: + +```bash +~ scp login@serveur:Chemin/Fichier . +~ scp root@192.168.10.131:/var/www/Fichier2 /home/mickael/data/ +~ macbook-pro:~ bruno$ scp root@192.168.1.8:/root/test-copy-scp.txt /Users/bruno/Documents +``` + +Copie d'un répertoire du serveur vers le répertoire courant: + +```bash +~ scp -r login@serveur:Chemin/Repertoire . +~ macbook-pro:~ bruno$ scp -r root@192.168.1.8:/root/test /Users/bruno/Documents +~ macbook-pro:~ bruno$ scp -r root@192.168.1.8:/root/test-dossier . (home) +``` + + + + + +#### Autres exemples + +Archive et compresse une liste de fichiers, puis envoie l'archive sur le ftp OVH. + +```bash +root@DiskStation:~ # tar -zcvf backup-syno.tar.gz -T .liste-backup.txt | scp backup-syno.tar.gz funnymac@ftp.cluster011.ovh.net:www/backup +``` + +Envoie un fichier du Macbook sur le ftp OVH. + +```bash +macbook-pro:~ bruno$ scp .bash_profile funnymac@ftp.cluster011.ovh.net:www/backup +``` + + + +#### Éditer un fichier à distance en SSH + +```bash +nano scp://root@192.168.240.132//etc/fichier.cnf +``` + + + + + + + +#### Envoyer un fichier sur le NAS: + +```bash +$ scp -P 72566 vendor.zip bruno@clicclac.synology.me:/volume1/web/gitlist/ +``` + diff --git a/docs/Linux/sftp.md b/docs/Linux/sftp.md new file mode 100644 index 0000000..c868fd3 --- /dev/null +++ b/docs/Linux/sftp.md @@ -0,0 +1,68 @@ +# Commande sftp (ftp sécurisée) + +#### Se connecter au serveur: + +```bash +admin@DiskStation:~ $ sftp funnymac@ftp.cluster011.ovh.net:www +Connected to ftp.cluster011.ovh.net. +Changing to: /home/funnymac/www +``` + +#### Changer de dossier: + +```bash +sftp> cd backup +``` + +#### Connaitre le chemin distant: + +```bash +sftp> pwd +Remote working directory: /home/funnymac/www/backup +``` + +#### Lire le répertoire courant: + +```bash +sftp> ls +backup-syno.tar.gz +``` + +#### Connaitre le chemin sur le client: + +```bash +sftp> !pwd +/volume1/homes/admin +``` + +#### Télécharger un fichier: + +```bash +sftp> get backup-syno.tar.gz +Fetching /home/funnymac/www/backup/backup-syno.tar.gz to backup-syno.tar.gz +/home/funnymac/www/backup/backup-syno.tar.gz 100% 933 0.9KB/s 0.9KB/s 00:00 +``` + +#### Envoyer un fichier: + +```bash +sftp> put .liste-backup.txt +Uploading .liste-backup.txt to /home/funnymac/www/backup/.liste-backup.txt +.liste-backup.txt 100% 119 0.1KB/s 0.1KB/s 00:00 + +sftp> ls +backup-syno.tar.gz + +sftp> ls -la +drwx---r-x 2 funnymac users 6 Aug 6 13:13 . +drwx---r-x 18 funnymac users 34 Jul 27 06:54 .. +-rw-r--r-- 1 funnymac users 119 Aug 6 13:13 .liste-backup.txt +-rw-r--r-- 1 funnymac users 933 Aug 6 10:21 backup-syno.tar.gz +``` + +#### Se déconnecter: + +```bash +sftp> quit +``` + diff --git a/docs/Linux/shell.md b/docs/Linux/shell.md new file mode 100644 index 0000000..c65280c --- /dev/null +++ b/docs/Linux/shell.md @@ -0,0 +1,41 @@ +# Shells + + + +### ASH + +#### Préférences: + +- System: `/etc/profile` +- User: `~/.profile` + + + +### BASH: + +#### Préférences: + + Il cherche les fichiers dans l'ordre suivant: + +1. BASH comme login SHELL (une session où on se loggue dans le système, une connexion ssh): + 1. `/etc/profile` + 2. `~/.bash_profile` + 3. `~/.bash_login` + 4. `~/.profile` +2. BASH comme application (après s'être loggué avec un autre SHELL) + 1. `/etc/bash.bashrc` + 2. `~/.bashrc` + + + +### Recharger la configuration: + +```bash +$ source ~/.profile + +ou + +$ . ~/.profile +``` + +On peut aussi créer un alias: `alias rload=". ~/.profile"` \ No newline at end of file diff --git a/docs/Linux/ssh.md b/docs/Linux/ssh.md new file mode 100644 index 0000000..212b2f7 --- /dev/null +++ b/docs/Linux/ssh.md @@ -0,0 +1,101 @@ +# Commande ssh + +#### Se connecter à un serveur par un autre port que 22: + +```bash +bruno@macbook-pro:~$ ssh bruno@192.168.1.7 -p 42666 +bruno@192.168.1.7's password: +bruno@DS916:/var/services/homes/bruno $ +``` + + + +#### Fixer le message WARNING: UNPROTECTED PRIVATE KEY FILE! + +On réinitilalise les permissions des clés: + +```bash +bruno@macbook-pro:~$ sudo chmod 600 ~/.ssh/id_rsa +bruno@macbook-pro:~$ sudo chmod 600 ~/.ssh/id_rsa +``` + +Si cela ne suffit pas: + +```bash +bruno@macbook-pro:~$ sudo chmod 600 ~/.ssh/known_hosts +bruno@macbook-pro:~$ sudo chmod 755 ~/.ssh +``` + + + +#### Copier un fichier: + +```bash +macbook-pro:~ bruno$ ssh root@192.168.1.8 "cat prefs.tar.gz"> prefs.tar.gz +``` + + + +#### Exécuter une (ou plusieurs) commande sur un serveur distant: + +```bash +macbook-pro:~ bruno$ ssh root@192.168.1.8 hostname +DiskStation + +bruno@SilverBook:~$ ssh -p34987 bruno@xxxxxxx.synology.me 'hostname ; uptime' +bruno@xxxxxxx.synology.me's password: +DS916 + 07:56:40 up 2 days, 19:50, 0 users, load average: 1.13, 1.15, 1.14 + +bruno@SilverBook:~$ ssh -p34987 bruno@xxxxxxx.synology.me << EOF +> uname -a +> lscpu | grep "^CPU(s)" +> grep -i memtotal /proc/meminfo +> EOF +Pseudo-terminal will not be allocated because stdin is not a terminal. +bruno@clicclac.synology.me's password: +Linux DS916 3.10.102 #15266 SMP Mon Mar 26 15:12:32 CST 2018 x86_64 GNU/Linux synology_braswell_916+ +/bin/bash: line 2: lscpu: command not found +MemTotal: 1963472 kB +``` + + + +#### Exécuter un script distant sur un serveur distant: + +```bash +bruno@SilverBook:~$ 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 +``` + + + +#### Exécuter un script local sur un serveur distant: + +```bash +bruno@SilverBook:~$ ssh -p34987 bruno@xxxxxxx.synology.me 'bash -s' < test.sh +bruno@xxxxxxx.synology.me's password: +toto +``` + + + +#### Mode verbose + +```bash +bruno@macbook-pro:~$ ssh -vvv dsm916 +OpenSSH_6.9p1, LibreSSL 2.1.8 +debug1: Reading configuration data /Users/bruno/.ssh/config +debug1: /Users/bruno/.ssh/config line 3: Applying options for dsm916 +debug1: Reading configuration data /etc/ssh/ssh_config +debug1: /etc/ssh/ssh_config line 20: Applying options for * +debug1: /etc/ssh/ssh_config line 102: Applying options for * +debug2: ssh_connect: needpriv 0 +debug1: Connecting to 192.168.1.7 [192.168.1.7] port 22. +debug1: Connection established. +debug1: identity file /Users/bruno/.ssh/id_dsa type 2 +.../... +bruno@DS916:/var/services/homes/bruno $ +``` \ No newline at end of file diff --git a/docs/Linux/tail-head.md b/docs/Linux/tail-head.md new file mode 100644 index 0000000..fdb3b3b --- /dev/null +++ b/docs/Linux/tail-head.md @@ -0,0 +1,91 @@ +# Commandes tail - head + + + +### Tail + +#### Par défaut, tail affiche les 10 dernières lignes du fichier. + +```bash +$ tail /var/log/messages +``` + + + +#### Afficher les 15 dernières lignes du fichier. + +```bash +$ tail -n15 /var/log/messages +$ tail -15 /var/log/messages +$ tail -n 15 /var/log/messages +``` + + + +#### L'option -f affiche le fichier au fil de l'eau + +```bash +$ tail -f /var/log/messages +``` + + + +### MultiTail + +Permet d'afficher plusieurs fichiers en meme temps: + +```bash +$ multitail error_log access_log +``` + +Permet d'afficher 2 fichiers côte à côte: + +```bash +$ multitail -s 2 error_log access_log +``` + +ou 'v' en cours d'exécution + +Faire défiler (sur 100 lignes): 'b' ('q' pour quitter le mode défilement') + +Pour changer le nb de lignes: +-m pour le prochain fichier +-M pour tous les fichiers + +Fusionner 2 fichiers (ils s'affichent ensemble dans une seul fenêtre): + +```bash +$ multitail error_log -I access_log +``` + +Visualiser la sortie de programmes externes: + +```bash +$ multitail -l "ping localhost" +``` + +Filtrer à l'aide de regexp (grep): + +```bash +$ multitail -e '200' access_log +``` + +```bash +$ multitail -v -e "ssh" -v -e "gnu-pop3d" -e "localhost" /var/log/messages +``` + +-e 'test': n'affiche que les lignes qui contiennent 'test' +-v -e 'test': n'affiche que les autres lignes + + + +### Head + +#### Afficher les 5 premères lignes du fichier. + +```bash +$ head -5 /var/log/messages +$ head -n5 /var/log/messages +$ head -n 5 /var/log/messages +``` + diff --git a/docs/Linux/variables.md b/docs/Linux/variables.md new file mode 100644 index 0000000..47cc634 --- /dev/null +++ b/docs/Linux/variables.md @@ -0,0 +1,22 @@ + + +Incrémenter une variable: + +```bash +i=$((i+1)) user 0m0.992s +i=$((i++)) user 0m0.964s +((i=i+1)) user 0m0.760s +((i+=1)) user 0m0.700s +((i++)) user 0m0.644s +((++i)) user 0m0.556s +let "i=i+1" user 0m1.116s +let "i+=1" user 0m1.100s +let "i++" user 0m1.008s +let i=i+1 user 0m0.952s +let i+=1 user 0m1.040s +let i++ user 0m0.820s +declare -i i; i=i+1 user 0m0.528s +declare -i i; i+=1 user 0m0.492s +i=0; i=$(expr $i + 1) user 0m5.464s +``` + diff --git a/docs/MySQL/Backup.md b/docs/MySQL/Backup.md new file mode 100644 index 0000000..2bd78fb --- /dev/null +++ b/docs/MySQL/Backup.md @@ -0,0 +1,48 @@ +# Backup + + + +### Sauvegarder une base: + +```bash +$ mysqldump -u root a_database> a_file.sql +``` + +```bash +$ mysqldump -u root -p wordpress4 | pv | gzip> wordpress4.sql.gz +``` + + + +### Restaurer une base depuis un backup: + +```bash +$ mysql -u root -p a_database UPDATE USER.master SET PASSWORD = AES_ENCRYPT('a_password','a_passkey') WHERE username = 'a_username' +``` + + + +### Migration de bases: + +- Arrêt de MySQL +- Backup du nouveau dossier data: + +```bash +sudo mv /usr/local/mysql-5.6.14-osx10.7-x86_64/data /usr/local/mysql-5.6.14-osx10.7-x86_64/dataold +``` + +- Copie des anciennes bases à leur nouveau emplacement: + +```bash +sudo cp -rf /usr/local/mysql-5.5.13-osx10.6-x86_64/data /usr/local/mysql-5.6.10-osx10.7-x86_64/ +``` + +- Redémarrer MySQL \ No newline at end of file diff --git a/docs/MySQL/Expired-root-Password.md b/docs/MySQL/Expired-root-Password.md new file mode 100644 index 0000000..1353fb7 --- /dev/null +++ b/docs/MySQL/Expired-root-Password.md @@ -0,0 +1,31 @@ +# Reset Expired root Password for MySQL 5.7 on Mac OS X + +1. Arrêter MySQL (PrefPane) + +```bash +$ sudo su +$ sudo mysqld_safe –skip-grant-tables +``` + +2. Dans un autre terminal: (MySQL 5.7) + +```bash +sh-3.2# mysql -u root +mysql> UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE user='root'; +mysql> FLUSH PRIVILEGES; +``` + +ou (MySQL 5.6) + +```bash +sh-3.2# mysql -u root +mysql> FLUSH PRIVILEGES; +mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'; +``` + +3. Se connecter avec le nouveau password: + +```bash +$ mysql -u root -p Enter password: +``` + diff --git a/docs/MySQL/Socket-error.md b/docs/MySQL/Socket-error.md new file mode 100644 index 0000000..e70d389 --- /dev/null +++ b/docs/MySQL/Socket-error.md @@ -0,0 +1,8 @@ +# Fix the 2002 MySQL Socket error (OSX) + +```bash +$ sudo mkdir /var/mysql + +$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock +``` + diff --git a/docs/MySQL/diverses.md b/docs/MySQL/diverses.md new file mode 100644 index 0000000..82503f8 --- /dev/null +++ b/docs/MySQL/diverses.md @@ -0,0 +1,21 @@ +# Commandes diverses + +#### Arrêter MySQL: + +```bash +$ sudo /usr/local/mysql/support-files/mysql.server stop +``` + +#### Démarrer MySQL: + +```bash +$ sudo /usr/local/mysql/support-files/mysql.server start +``` + +*Sous OSX, utiliser le PrefPane et pas les commandes (package MySQL officiel).* + +#### Version de MySQL: + +```bash +$ mysql -v +``` \ No newline at end of file diff --git a/docs/MySQL/index.md b/docs/MySQL/index.md new file mode 100644 index 0000000..c6f78cc --- /dev/null +++ b/docs/MySQL/index.md @@ -0,0 +1,24 @@ +# MySQL + + + +[Reset Expired root Password for MySQL 5.7 on Mac OS X](Expired-root-Password.md) + +[mysqlcheck](mysqlcheck.md) + +[backup](Backup.md) + +[Socket error](Socket-error.md) + +[Commandes diverses](diverses.md) + + + +### Liens: + +[:fa-link: https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/](https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/) + +[:fa-link: https://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/](https://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/) + +[:fa-link: http://apple.stackexchange.com/questions/255671/error-mysql-server-pid-file-could-not-be-found](http://apple.stackexchange.com/questions/255671/error-mysql-server-pid-file-could-not-be-found) + diff --git a/docs/MySQL/mysqlcheck.md b/docs/MySQL/mysqlcheck.md new file mode 100644 index 0000000..437b0b8 --- /dev/null +++ b/docs/MySQL/mysqlcheck.md @@ -0,0 +1,68 @@ +# mysqlcheck + + + +### Vérification d'une table: + +```bash +$ mysqlcheck -c funnymac download -u root -p +Enter password: +funnymac.download OK +``` + +### Vérification de toutes les tables d'une base: + +```bash +$ mysqlcheck -c funnymac -u root -p +Enter password: +funnymac.download OK +funnymac.downloads OK +funnymac.eggs OK +funnymac.ipod OK +funnymac.ipod_news OK +funnymac.ipod_vers OK +funnymac.liens OK +funnymac.livre OK +funnymac.note OK +funnymac.numeric_info OK +funnymac.numeric_log OK +funnymac.numeric_vers OK +funnymac.tips OK +funnymac.truc OK +funnymac.vote OK +``` + +### Vérification de toutes les bases: + +```bash +$ mysqlcheck -c -u root -p –all-databases +``` + +### Vérification de certaines bases: + +```bash +$ mysqlcheck -c -u root -p –databases funnymac zenphoto +``` + +### Optimiser une table: + +```bash +$ mysqlcheck -o funnymac download -u root -p +Enter password: +funnymac.download OK +``` + +### Réparer une table: + +```bash +$ mysqlcheck -r funnymac download -u root -p +Enter password: +funnymac.download OK +``` + +### Combiner Vérifier, Optimiser et Réparer: + +!!! attention + Ne semble pas fonctionner sous OSX + + diff --git a/docs/Plesk/Ghost.md b/docs/Plesk/Ghost.md new file mode 100644 index 0000000..cb870d0 --- /dev/null +++ b/docs/Plesk/Ghost.md @@ -0,0 +1,92 @@ +# Installer Ghost + + + +### Installer ghost-cli: + +Se connecter au serveur comme root: + +```bash +ssh root@mon_vps +``` + +Ghost [requiert](https://docs.ghost.org/docs/supported-node-versions) l'installation de [node.js](https://nodejs.org/) + +```bash +root@localhost:~# /opt/plesk/node/8/bin/npm install -g ghost-cli + +/opt/plesk/node/8/bin/ghost -> /opt/plesk/node/8/lib/node_modules/ghost-cli/bin/ghost ++ ghost-cli@1.9.3 +added 387 packages in 18.168s +``` + +Se connecter au serveur comme utilisateur + +```bash +httpuser@localhost:~$ echo 'PATH=$PATH:/opt/plesk/node/8/bin/' >> .profile +httpuser@localhost:~$ echo 'export PATH' >> .profile +httpuser@localhost:~$ source .profile +``` + +Vérifier que ghost-cli est bien installé: + +```bash +httpuser@localhost:~$ ghost version + +Ghost-CLI version: 1.9.3: +``` + + + +### Installer ghost: + +Créer un dossier **ghost** sur le serveur: + +```bash +bruno@localhost:~$ cd httpdocs/ +bruno@localhost:~/httpdocs$ mkdir ghost +``` + +Installer Ghost: + +```bash +bruno@localhost:~/httpdocs/ghost$ ghost install local + +✔ Checking system Node.js version +✔ Checking current folder permissions +✔ Checking memory availability +✔ Checking for latest Ghost version +✔ Setting up install directory +✔ Downloading and installing Ghost v2.1.1 +✔ Finishing install process +✔ Configuring Ghost +✔ Setting up instance +ℹ Ensuring user is not logged in as ghost user [skipped] +ℹ Checking if logged in user is directory owner [skipped] +✔ Checking current folder permissions +✔ Validating config +✔ Checking memory availability +✔ Starting Ghost + +You can access your publication at http://localhost:2368/ +Next, go to to your admin interface at http://localhost:2368/ghost/ to complete the setup of your publication + +Ghost uses direct mail by default +To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config +``` + + + +https://docs.ghost.org/docs/install + + + +### Installer ghost (avec Docker): + +Cliquer sur Docker + +Rechercher ghost dans le catalogue d'images Docker + +Sur l'image ghost (officiel), cliquer sur exécuter + +Cocher Démarrage automatique après redémarrage du système \ No newline at end of file diff --git a/docs/Plesk/index.md b/docs/Plesk/index.md new file mode 100644 index 0000000..fbae15f --- /dev/null +++ b/docs/Plesk/index.md @@ -0,0 +1,64 @@ +# Plesk + + + + + +```bash +~# plesk +Usage: plesk [command] + +Commands: + bin - Run the specified Plesk command-line utility (e.g., domain, client) + conf - Open the specified Plesk configuration file in the editor + daily - Run daily maintenance script + db - Database related commands. Open MySQL console by default. + ext - Call a command-line interface of the specified Plesk extension + help - Show help and exit + installer - Parallels Installer shortcuts and command completion + log - Open the specified Plesk configuration file in the editor + login - generate login link for specified user + php - Run a PHP script using the Plesk PHP interpreter + repair - Check and repair Plesk + sbin - Run the specified Plesk internal utility + version - Show product version information + + + +plesk installer --select-release-current --install-component php7.2 +``` + + + +Réparer Plesk: + +```bash +$ plesk installer --select-release-current --reinstall-patch --upgrade-installed-components + +$ plesk repair installation +``` + + + +Tester la zone DNS: + +```bash +# plesk bin dns --info maboiteverte.fr + +www.maboiteverte.fr. CNAME maboiteverte.fr. +_dmarc.maboiteverte.fr. TXT v=DMARC1; p=none +maboiteverte.fr. TXT v=spf1 +a +mx +a:localhost.localdomain -all +ftp.maboiteverte.fr. CNAME maboiteverte.fr. +ipv4.maboiteverte.fr. A 212.227.191.167 +mail.maboiteverte.fr. A 212.227.191.167 +maboiteverte.fr. MX 10 mail.maboiteverte.fr. +webmail.maboiteverte.fr. A 212.227.191.167 +maboiteverte.fr. A 212.227.191.167 +ns2.maboiteverte.fr. A 212.227.191.167 +maboiteverte.fr. NS ns2.maboiteverte.fr. +ns1.maboiteverte.fr. A 212.227.191.167 +maboiteverte.fr. NS ns1.maboiteverte.fr. + +SUCCESS: Getting information for Domain 'maboiteverte.fr' complete. +``` + diff --git a/docs/Raspberry/.DS_Store b/docs/Raspberry/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/docs/Raspberry/.DS_Store differ diff --git a/docs/Raspberry/apt-get.md b/docs/Raspberry/apt-get.md new file mode 100644 index 0000000..fab2ebc --- /dev/null +++ b/docs/Raspberry/apt-get.md @@ -0,0 +1,104 @@ +# apt-get & apt-cache + +#### Mettre à jour met à jour la liste des fichiers disponibles dans les dépôts APT: + +```bash +$ sudo apt-get update +``` + +#### Mettre à jour tous les paquets installés sur le système: + +```bash +$ sudo apt-get upgrade +``` + +**Si après sudo apt-get upgrade, on a le message « Les paquets suivants ont été conservés : »:** + +il faut faire un apt-get dist-upgrade, c’est parce que la mise a jour de ces paquets nécessite la mise a jour d’autres paquets plus importants”. + +```bash +$ sudo apt-get dist-upgrade +``` + +#### Supprimer les paquets inutiles et fichiers config: + +```bash +$ sudo apt-get remove -y --purge wolfram-engine minecraft-pi sonic-pi +``` + +#### Désinstalle les paquets indiqués et leurs fichiers de configuration : + +```bash +# Les fichiers de préférences et les logs sont conservés. + +$ sudo apt-get purge +``` + +#### Désinstalle les paquets indiqués, les dépendances logicielles et leurs fichiers de configuration: + +```bash +# Les fichiers de préférences et les logs sont conservés. + +$ sudo apt-get autoremove --purge +``` + +#### Nettoyer et effacer les dépendances avec les packages que vous avez dés-installées: + +```bash +$ sudo apt-get autoremove --purge +``` + +#### Suppression du cache des paquets de apt: + +```bash +# Supprimer la totalité des paquets présents dans /var/cache/apt/archives + +$ sudo apt-get clean + +# Supprimer les paquets présents dans /var/cache/apt/archives , mais en conservant ceux qui ont un équivalent dans les dépôts. + +$ sudo apt-get autoclean +``` + +#### Mise à jour générale: + +```bash +$ sudo apt-get update && sudo apt-get upgrade -y +``` + +#### Liste des m-à-j disponibles: + +```bash +$ sudo apt-get update && sudo apt-get -u upgrade --assume-no +``` + +#### Chercher un package: + +```bash +$ apt-cache search vim + +$ apt-cache search vim | more + +$ apt-cache search vim | grep 'word' + +$ apt-cache search ^vim +``` + +#### Afficher les dépendances d’un package: + +```bash +$ apt-cache depends package +``` + +#### Afficher les infos sur un package: + +```bash +$ apt-cache show< package> +``` + +#### Affiche le nom de chaque paquet connu par APT: + +```bash +$ apt-cache pkgnames —generate +``` + diff --git a/docs/Raspberry/aptitude.md b/docs/Raspberry/aptitude.md new file mode 100644 index 0000000..7603f08 --- /dev/null +++ b/docs/Raspberry/aptitude.md @@ -0,0 +1,98 @@ +# aptitude + +https://debian-facile.org/doc:systeme:apt:aptitude + +#### Mettre à jour met à jour la liste des paquets: + +```bash +$ sudo aptitude update +``` + +#### Mettre à jour tous les paquets installés sur le système: + +```bash +$ sudo aptitude safe-upgrade +``` + +#### Pour les mises à jour nécessitant d'installer ou de désinstaller les dépendances nécessaires : ( message « Les paquets suivants ont été conservés : ») + +```bash +$ sudo aptitude full-upgrade + +# idem à $ sudo aptitude dist-upgrade +``` + +#### **Installer un paquet :** + +```bash +$ sudo aptitude install +``` + +#### Supprimer un paquet: + +```bash +# Les fichiers de préférences et les logs sont conservés. + +$ sudo aptitude remove +``` + +#### Supprimer les paquets indiqués et leurs fichiers de configuration : + +```bash +# Les fichiers de préférences et les logs sont conservés. + +$ sudo aptitude purge +``` + +#### **Supprimer un paquet en le mettant "automatique"** + +(celui-ci sera soit désinstallé tout de suite, soit automatiquement désinstallé dès que plus aucun autre paquet n'aura besoin de lui) : + +```bash +$ sudo aptitude markauto +``` + +#### Chercher un paquet: + +```bash +$ sudo aptitude search wge +``` + +**Indicateurs de réponse** + +i le paquet est installé et toutes ses dépendances sont satisfaites + +c le paquet a été supprimé mais ses fichiers de configuration sont toujours présents sur le système + +p le paquet et tous ses fichiers de configuration ont été supprimés, ou le paquet n'a jamais été installé + +v le paquet est virtuel + +B le paquet a des dépendances cassées + +A le paquet a été automatiquement installé + +#### **Vérifier si un paquet est installé** : + +```bash +$ sudo aptitude show wget +``` + +#### **Liste des packages non à jour:** + +```bash +$ sudo aptitude search '~U' +``` + +#### **Dépendances du paquet** : + +```bash +$ sudo aptitude search ~R wget +``` + +#### **Dépendances inverses du paquet** : + +```bash +$ sudo aptitude search ~D wget +``` + diff --git a/docs/Raspberry/backup.md b/docs/Raspberry/backup.md new file mode 100644 index 0000000..1e2073e --- /dev/null +++ b/docs/Raspberry/backup.md @@ -0,0 +1,98 @@ +# Backup + +### Avec sshpass (MdP en clair) + +```bash +$ sudo apt-get install sshpass +``` + +```bash +\#!/bin/bash + +sudo sshpass -p "password" rsync -avzO --exclude='@eaDir' -e ssh bruno@192.168.1.7:/var/services/homes/bruno/CloudStation/Drive/Raspberry :/var/services/homes/bruno/CloudStation/Drive/Unix /home/pi/Documents +``` + +Sauver avec CTRL-O (Return) et quitter avec CTRL-X (Return) + +### Par clé + +```bash +$ ssh-keygen -t rsa -C pi@framboise + +$ cat ~/.ssh/id_rsa.pub | ssh bruno@192.168.1.7 -p42666 'cat >> .ssh/authorized_keys' +``` + +```bash +\#!/bin/bash + +rsync -avzO --exclude='@eaDir' -e ssh bruno@192.168.1.7:/var/services/homes/bruno/CloudStation/Drive/Raspberry :/var/services/homes/bruno/CloudStation/Drive/Unix /home/pi/Documents + +\# option -O pour éviter l’erreur: + +\# rsync: failed to set times on "/home/pi/Documents/Unix": Operation not permitted (1) +``` + +Sauver avec CTRL-O (Return) et quitter avec CTRL-X (Return) + +Rendre le script exécutable + +``` +$ sudo chmod +x /home/pi/sync.sh +``` + + + +### Ajouter le script à cron: + +Créer une crontab pour l'utilisateur pi + +```bash +pi@framboise:~ $ crontab -u pi -e + +no crontab for pi - using an empty one + +Select an editor. To change later, run 'select-editor'. + +1. /bin/ed +2. /bin/nano <---- easiest +3. /usr/bin/vim.tiny + +Choose 1-3 [2]: 2 + +crontab: installing new crontab +``` + +Editer la crontab utilisateur (pi) + +```bash +$ pi@framboise:~ $ crontab -e +``` + +Ajouter la ligne + +`*/5 * * * * /home/pi/Documents/sync.sh >> /home/pi/sync.log 2>&1` + +Le script sync.sh est exécuté toutes les 5mn. + +STDOUT est redirigé sur sync.log et STDERR aussi. + +Redirection du flux de sortie (STDOUT): >/dev/null + +Rediriger uniquement STDERR: 2>/dev/null + +Rediriger STDERR là où est redirigé STDOUT: 2>&1 + +Si les sorties ne sont redirigées, erreur dans /var/syslog + +```bash +CRON[8380]: (CRON) info (No MTA installed, discarding output) + +(pas de Mail Transfer Agent, ie Postfix, Mutt…) +``` + +Lire la crontab utilisateur (pi) + +```bash +pi@framboise:~ $ crontab -l +``` + diff --git a/docs/Raspberry/boot.md b/docs/Raspberry/boot.md new file mode 100644 index 0000000..c9b71cd --- /dev/null +++ b/docs/Raspberry/boot.md @@ -0,0 +1,56 @@ +# Boot et clone + +#### Mise à jour du Raspberry: + +```bash +#version du firmware +$ uname -a + +#mise à jour du dépot +$ sudo apt-get update + +#mise à jour du système +$ sudo apt-get upgrade + +#mise à jour firmware +$ sudo apt-get install raspberrypi-bootloader + +$ sudo reboot +``` + + + +#### Backup de la SD card: + +```bash +ssh pi@raspberrypi.local sudo dd if=/dev/mmcblk0 | pv | gzip -c> raspberry.img.gz +``` + + + +#### cmdline.txt original de la SD: + +```bash +dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles +``` + + + +#### boot sur le mSSD: + +Modifier la cmdline.txt avec root=/dev/sda2 + + + +#### Cloner la SD sur le mSSD: + +[:fa-link: https://github.com/billw2/rpi-clone](https://github.com/billw2/rpi-clone) + +```bash +#1er clone +$ sudo rpi-clone sda -f -s framboise + +#Clones suivants +$ sudo rpi-clone sda -s framboise +``` + diff --git a/docs/Raspberry/divers.md b/docs/Raspberry/divers.md new file mode 100644 index 0000000..b4b3062 --- /dev/null +++ b/docs/Raspberry/divers.md @@ -0,0 +1,154 @@ +# Raspberry (divers) + +#### Installer le correcteur orthographique français: + +```bash +$ sudo apt-get install myspell-fr +``` + + + +#### Installer LibreOffice français: + +```bash +$ sudo apt-get install libreoffice-l10n-fr + +$ sudo apt-get install myspell-fr + +$ sudo apt-get install hyphen-fr + +$ sudo apt-get install mythes-fr + +$ sudo apt-get install libreoffice-help-fr +``` + + + +#### Installer avec Git: + +```bash +cd /SourceCache +git clone https://github.com/gerard/ext4fuse.git +cd ext4fuse +make +``` + + + +#### Installer une appli depuis un .deb: + +```bash +pi@framboise:~/Downloads $ wget http://www.bristolwatch.com/rpi/dl/beaver_0.4.1-1_armhf.deb + +pi@framboise:~/Downloads $ sudo dpkg -i beaver_0.4.1-1_armhf.deb +``` + + + +#### Editer un fichier de config: + +```bash +$ sudo leafpad /etc/samba/smb.conf & +``` + + + +#### Virer les fichiers .DS_Store: + +```bash +$ find /my/data/to/move -name '*.DS_Store' -type f -delete +``` + + + +#### Installer clé bluetooth (pas utile avec Raspian): + +```bash +$ lsusb +$ update-rc.d -f dbus defaults +$ apt-get install bluetooth bluez-utils blueman +$ hcitool scan +``` + +[:fa-link: http://blog.petrilopia.net/linux/raspberry-pi-bluetooth-keyboard-work/](http://blog.petrilopia.net/linux/raspberry-pi-bluetooth-keyboard-work/) + + + +#### Installer clé wifi (pas utile avec Raspian): + +```bash +$ sudo apt-get install wicd +``` + + + +#### Permissions: + +Donner les permissions exécutable + +```bash +$ chmod +x ./subfolder/anexecutablefile.sh +``` + +Retirer er les permissions exécutable + +```bash +$ chmod -x ./subfolder/anexecutablefile.sh +``` + +Donner les permissions lecture/écriture + +```bash +$ chmod +rw .anexecutablefile.sh +``` + + + +#### blkid + +locate/print block device attributes + +```bash +pi@framboise:/media/pi/boot $ blkid + +/dev/mmcblk0p1: LABEL="boot" UUID="E5B7-FEA1" TYPE="vfat" PARTUUID="1b38a7cf-01" + +/dev/mmcblk0p2: UUID="b4ea8e46-fe87-4ddd-9e94-506c37005ac5" TYPE="ext4" PARTUUID="1b38a7cf-02" +``` + + + +#### lsblk + +list block devices + +```bash +pi@framboise:~/Downloads/Ted-2.23 $ lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +sda 8:0 0 29,8G 0 disk +|-sda1 8:1 0 41,8M 0 part /boot +`-sda2 8:2 0 29,8G 0 part / +mmcblk0 179:0 0 29,7G 0 disk +|-mmcblk0p1 179:1 0 41,8M 0 part /media/pi/boot +`-mmcblk0p2 179:2 0 29,7G 0 part /media/pi/b4ea8e46-fe87-4ddd-9e94-506c37005ac5 +``` + + +#### df -h + +```bash +pi@framboise:~ $ df -h + +Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur +/dev/root 30G 3,4G 25G 13% / +devtmpfs 460M 0 460M 0% /dev +tmpfs 464M 80M 385M 18% /dev/shm +tmpfs 464M 13M 452M 3% /run +tmpfs 5,0M 4,0K 5,0M 1% /run/lock +tmpfs 464M 0 464M 0% /sys/fs/cgroup +/dev/sda1 42M 21M 21M 51% /boot +tmpfs 93M 8,0K 93M 1% /run/user/1000 +/dev/mmcblk0p2 30G 3,3G 25G 12% /media/pi/b4ea8e46-fe87-4ddd-9e94-506c37005ac5 +/dev/mmcblk0p1 42M 21M 21M 51% /media/pi/boot +``` + diff --git a/docs/Raspberry/index.md b/docs/Raspberry/index.md new file mode 100644 index 0000000..06f398e --- /dev/null +++ b/docs/Raspberry/index.md @@ -0,0 +1,13 @@ +# Raspberry + +[Backup](backup.md) + +[Commandes apt-get & apt-cache](apt-get.md) + +[Réseau](reseau.md) + +[Boot et clone](boot.md) + +[Bouton du Pi Desktop](pi-desktop.md) + +[Divers](divers.md) \ No newline at end of file diff --git a/docs/Raspberry/pi-desktop.md b/docs/Raspberry/pi-desktop.md new file mode 100644 index 0000000..b3e3401 --- /dev/null +++ b/docs/Raspberry/pi-desktop.md @@ -0,0 +1,23 @@ +# Pi Desktop + +### Télécharger le paquet Pi Desktop: + +https://github.com/pi-desktop/deb-make/releases + + + +### Installer Pi Desktop: + +```bash +$ sudo dpkg -i pidesktop-base-1.1.0.deb +``` + + + +### Bouton du Pi Desktop: + +- Lorsque vous appuyez **une fois rapidement (plus de 150mS)** sur le bouton A/M, le Raspberry Pi **démarre** +- Lorsque vous appuyez **plus longuement (plus de 2 secondes)** sur le bouton A/M, le programme de gestion **arrête proprement le Raspberry Pi** (le système s’arrête normalement) puis **coupe l’alimentation**. +- Lorsque vous appuyez **très longuement (plus de 5 secondes)** sur le bouton A/M, le programme de gestion **arrête le Raspberry Pi à « la sauvage »** en coupant l’alimentation. + + diff --git a/docs/Raspberry/reseau.md b/docs/Raspberry/reseau.md new file mode 100644 index 0000000..dd81bb5 --- /dev/null +++ b/docs/Raspberry/reseau.md @@ -0,0 +1,105 @@ +# Réseau et partage + +#### Mettre en IP fixe: + +```bash +$ sudo nano /etc/dhcpcd.conf + +à rajouter à la fin du fichier: + +interface eth0 + +static ip_address=192.168.1.254/24 + +static routers=192.168.1.1 + +static domain_name_servers=8.8.8.8 + +interface wlan0 + +static ip_address=192.168.1.253/24 + +static routers=192.168.1.1 + +static domain_name_servers=8.8.8.8 + + +``` + + + +#### VNC: + +*VNC Server (Pi):* + +Menu → Options: + +- Sécurité: + + - Chiffrement: De préférence actif + - Authentification: Mot de passe VNC + +- Utilisateurs et autorisations: + + - Utilisateur standart: Mot de passe + + ​ + +*VNC Viewer (Mac):* + +Port 5900 + + + +#### Installer Samba: + +Installer et créer un répertoire partagé: + +```bash +$ sudo apt-get install apt-transport-https samba samba-common-bin +$ sudo mkdir -p /home/pi/share +$ sudo chown -hR pi:pi /home/pi/share +$ sudo chmod 777 /home/pi/share +``` + +Editer le fichier smb.conf: + +```bash +$ sudo nano /etc/samba/smb.conf + +## Browsing/Identification ### +# Change this to the workgroup/NT-domain name your Samba server will part of +workgroup = WORKGROUP +wins support = yes + +####### Authentication ####### +security = user + +[Share] +comment = Partage Samba sur Raspberry +path=/home/pi/share +browseable=Yes +writeable=Yes +only guest=no +create mask=0777 +directory mask=0777 +public=no +``` + +Créer un utilisateur Samba: + +```bash +$ sudo smbpasswd –a pi + +$ testparm +``` + + + +#### Liens: + +[:fa-link: http://nagashur.com/blog/2016/07/21/partage-de-fichiers-samba-avec-le-raspberry-pi/](http://nagashur.com/blog/2016/07/21/partage-de-fichiers-samba-avec-le-raspberry-pi/) + +[:fa-link: https://gist.github.com/masterT/407a6d9e30ba4169bb39](https://gist.github.com/masterT/407a6d9e30ba4169bb39) + +[:fa-link: http://www.framboise314.fr/partager-un-repertoire-sous-jessie-avec-samba/](http://www.framboise314.fr/partager-un-repertoire-sous-jessie-avec-samba/) \ No newline at end of file diff --git a/docs/Synology/.DS_Store b/docs/Synology/.DS_Store new file mode 100644 index 0000000..412e93e Binary files /dev/null and b/docs/Synology/.DS_Store differ diff --git a/docs/Synology/bash.md b/docs/Synology/bash.md new file mode 100644 index 0000000..d5c3532 --- /dev/null +++ b/docs/Synology/bash.md @@ -0,0 +1,81 @@ +# Bash + +### Installer le shell Bash: + +Se connecter sous root + +```bash +ssh root@192.168.0.8 +``` + +Installer le package **Bash** avec **ipkg** + +```bash +DiskStation$> ipkg install -A bash +``` + +------ + +Pour avoir bash au log-in, il faut éditer le fichier **/etc/passwd** + +```bash +DiskStation$> nano /etc/passwd +``` + +et remplacer la ligne + +```bash +root:x:0:0:root:/root:/bin/ash +``` + +par + +```bash +root:x:0:0:root:/root:/bin/bash +``` + +!!! attention "Attention, une m-à-j Synology peut supprimer /opt/bin/bash." + Aussi, il est préférable de garder ash pour se logger et de démarrer bash ensuite. + +On va éditer le fichier .profile + +```bash +DiskStation$> nano .profile +``` + +et y ajouter les lignes suivantes: + +```bash +if [[ -x /opt/bin/bash ]]; then + exec /opt/bin/bash +fi +``` + +------ + +Pour configurer bash, on va créer un fichier .bashrc + +```bash +DiskStation$> nano .bashrc +``` + +et y ajouter + +```bash +#prompt + +PS1='\u@\h:\w \$ ' + +#renseigne la variable SHELL + +export SHELL=/opt/bin/bash +``` + +!!! attention "Il est préférable de se logger une première fois avec en root avec ash et de faire la manip dans une 2nde fenêtre." + + + + + +[http://tldp.org/LDP/abs/html/index.html](http://tldp.org/LDP/abs/html/index.html) + diff --git a/docs/Synology/dsm6.md b/docs/Synology/dsm6.md new file mode 100644 index 0000000..6e4ad1e --- /dev/null +++ b/docs/Synology/dsm6.md @@ -0,0 +1,440 @@ +# DSM 6 + + + +### Dossiers utilisateurs: + +```bash +bruno@DS916:~ $ pwd +/var/services/homes/bruno +``` + +```bash +root@DS916:~# pwd +/root +``` + + + +### Se connecter en root: + +```bash +bruno@DS916:~ $ sudo -su root +Password: +sh-4.3# +``` + +```bash +bruno@DS916:~ $ sudo -i +root@DS916:~# +``` + + + +### Services: + +#### Afficher la liste des services + +```bash +root@DS916:~# synoservicecfg --list +DSM +apparmor +atalk +avahi +bluetoothd +bonjour +btacd +``` + +#### Gérer les services de DSM + +```bash +synoservicecfg --list + +synoservice --status + +synoservicecfg --stop + +synoservicecfg --hard-stop + +synoservicecfg --start + +synoservicecfg --hard-start + +synoservice --restart + +synoservicectl --restart +``` + +#### Redémarrer un service + +```bash +/usr/syno/sbin/synoservicecfg -restart syslog-acc +``` + + + +### Afficher les logs de connection ssh dans /var/log/message: + +- Créer en tant que root le fichier /usr/local/etc/syslog-ng/patterndb.d/sshd.conf comme suit : + +```bash +filter f_messages { + level(info..emerg) + and not facility( mail, news, cron) + and not program(syslog-ng) + and not filter(f_local) + and not filter(f_synology); +}; +``` + +- Faire un chmod 644 sur le fichier /usr/local/etc/syslog-ng/patterndb.d/sshd.conf créé. + +```bash +DS414> cd /usr/local/etc/syslog-ng/patterndb.d/ +-rw-rw-rw- 1 root root 454 Jul 16 19:15 sshd.conf +-rw-r--r-- 1 root root 454 Jul 11 15:15 VideoStation.conf +DS414> chmod 644 sshd.conf +-rw-r--r-- 1 root root 454 Jul 16 19:15 sshd.conf +-rw-r--r-- 1 root root 454 Jul 11 15:15 VideoStation.conf +``` + +- Relancer le syslog pour prise en compte du fichier (sinon un reboot du NAS) : + +```bash +DS414> synoservicecfg --restart syslog-acc +``` + + + +### Installer un paquet .deb + +```bash +# echec pour un problème de signature +$ sudo dpkg -i nano_2.7.4-1_i386.deb +Password: +Authenticating nano_2.7.4-1_i386.deb ... +debsig: Origin Signature check failed. This deb might not be signed. + +dpkg: error processing nano_2.7.4-1_i386.deb (--install): + verification on package nano_2.7.4-1_i386.deb failed! +Errors were encountered while processing: + nano_2.7.4-1_i386.deb + +# option --force-bad-verify +$ sudo dpkg -i --force-bad-verify nano_2.7.4-1_amd64.deb +Authenticating nano_2.7.4-1_amd64.deb ... +debsig: Origin Signature check failed. This deb might not be signed. + +dpkg: verification on package nano_2.7.4-1_amd64.deb failed; but installing anyway as you requested +Selecting previously unselected package nano. +(Reading database ... 118 files and directories currently installed.) +Unpacking nano (from nano_2.7.4-1_amd64.deb) ... + +# supprimer le paquet debsig-verify +$ dpkg --purge dpkg-verify +``` + + + +### Apache: + +#### Configuration: + +Les fichiers .conf se trouvent dans `/usr/local/etc/apache22 `ou `/usr/local/etc/apache24` + +Il est conseillé de faire les modifications dans `/usr/local/etc/apache22/sites-enabled` + +#### Logs: + +Ils sont dans `/var/log/httpd` + +```bash +/var/log/httpd $ ls -la +total 540 +drwxr-xr-x 2 root root 4096 Nov 16 03:07 . +drwxr-xr-x 17 root root 4096 Mar 9 01:15 .. +-rw-r--r-- 1 root root 176 Oct 9 10:10 access_log +-rw-rw---- 1 system log 146142 Mar 13 09:50 apache22-error_log +-rw-rw---- 1 system log 58824 Nov 16 02:05 apache22-error_log.1.xz +-rw-rw---- 1 system log 25992 Dec 11 2016 apache22-error_log.2.xz +-rw-rw---- 1 system log 2106 Jan 9 2017 apache24-error_log +-rw-r--r-- 1 root root 363 Oct 9 10:09 error_log +-rw-rw---- 1 system log 283282 Nov 2 2016 user-error_log +``` + +#### Redémarrer Apache: + +`synoservice --restart pkgctl-WebStation` + +`synoservice --restart pkgctl-Apache2.2` + +service [pkgctl-Apache2.2] restart failed, synoerr=[0x2000] + + + +### php7.0 + +```bash +$ php70 --ini +Configuration File (php.ini) Path: /usr/local/etc/php70 +Loaded Configuration File: /usr/local/etc/php70/php.ini +Scan for additional .ini files in: /usr/local/etc/php70/conf.d +Additional .ini files parsed: /usr/local/etc/php70/conf.d/SYNO.SDS.PhotoStation.ini +``` + +#### open_basedir + +`/tmp:/var/services/tmp:/var/services/web:/var/services/homes:/dev/urandom:/volume1/dokuwiki:/volume1/Repositories:/volume1/nextcloud` + +#### php.ini + +`extension_dir = "/usr/local/lib/php70/modules"` + +#### logs + +Web Station -> Paramètres PHP-> Paramètres Avancés -> Coeur -> error_log + +#### Connaitre les extensions chargées par PHP CLI: + +```bash +$ php -m +[PHP Modules] +apcu +bz2 +calendar +Core +ctype +curl +date +dom +exif +fileinfo +filter +gd +hash +iconv +json +libxml +mbstring +mysqlnd +openssl +pcntl +pcre +PDO +pdo_mysql +pdo_pgsql +pdo_sqlite +pgsql +readline +Reflection +session +SimpleXML +SPL +sqlite3 +standard +tokenizer +xml +xmlreader +xmlwriter +Zend OPcache +zip +zlib + +[Zend Modules] +Zend OPcache +``` + + + +#### PHP 7.0.13: curl n'est pas activé: + +- Ouvrir /volume1/@appstore/PHP7.0/misc/extension_list.json + +```bash +root@DS916:/volume1/@appstore/PHP7.0/misc# ls -la +total 24 +drwxr-xr-x 1 root root 134 Jan 7 09:08 . +drwxrwxrwx 1 root root 46 Jan 5 17:22 .. +-rw-r--r-- 1 root root 5082 Dec 19 12:20 extension_list.json +-rw-r--r-- 1 root root 5082 Jan 7 09:08 extension_list.json.bak +-rw-r--r-- 1 root root 147 Dec 19 12:20 logrotate.conf +-rw-r--r-- 1 root root 174 Dec 19 12:20 syslog.conf +root@DS916:/volume1/@appstore/PHP7.0/misc# nano extension_list.json +``` + +- Ajouter + +```bash + "curl": { + "enable_default": true, + "desc": "The curl extension allows you to connect and communicate to many different types of servers wih many different types of protocols." + }, +``` + +- Aller dans Web Station → Paramètres PHP → version 7.0 +- Cocher, décocher et recocher pour activer l'extension (en appliquant à chaque fois) + +[:fa-link: Source](https://forum.synology.com/enu/viewtopic.php?f=20&t=104368&p=464772#p464534) + + + +### Les 3 versions de PHP: + +- PHP 5.6 (BusyBox) + /bin/php +- PHP 5.6 (Package PHP 5) + /usr/local/bin/php56 +- PHP 7.0 (Package PHP 7) + /usr/local/bin/php70 + +Pour Apache, c'est la version choisie dans WebStation qui est active. + +En ligne de commande, par défaut, c'est la version Busybox qui est active: + +```bash +$ which php +/bin/php + +$ php -v +PHP 5.6.11 (cli) (built: Jun 8 2018 15:13:30) +Copyright (c) 1997-2015 The PHP Group +Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies + +$ php --ini +Configuration File (php.ini) Path: /etc/php +Loaded Configuration File: /etc/php/php.ini +Scan for additional .ini files in: (none) +Additional .ini files parsed: (none) +``` + +Les 2 autres versions sont néanmoins disponibles: + +```bash +$ which php56 +/usr/local/bin/php56 + +$ php56 -v +PHP 5.6.36 (cli) (built: May 2 2018 16:13:10) +Copyright (c) 1997-2016 The PHP Group +Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies + +$ php56 --ini +Configuration File (php.ini) Path: /usr/local/etc/php56 +Loaded Configuration File: /usr/local/etc/php56/php.ini +Scan for additional .ini files in: /usr/local/etc/php56/conf.d +Additional .ini files parsed: /usr/local/etc/php56/conf.d/phpMyAdmin.ini, +/usr/local/etc/php56/conf.d/webstation-extensions.ini + + +$ which php70 +/usr/local/bin/php70 + +$ php70 -v +PHP 7.0.30 (cli) (built: May 2 2018 16:29:25) ( NTS ) +Copyright (c) 1997-2017 The PHP Group +Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies + with Zend OPcache v7.0.30, Copyright (c) 1999-2017, by Zend Technologies + +$ php70 --ini +Configuration File (php.ini) Path: /usr/local/etc/php70 +Loaded Configuration File: /usr/local/etc/php70/php.ini +Scan for additional .ini files in: /usr/local/etc/php70/conf.d +Additional .ini files parsed: /usr/local/etc/php70/conf.d/SYNO.SDS.PhotoStation.ini +``` + +Mettre PHP70 par défaut en CLI: + +```bash +# On renomme PHP Busybox +$ cd /bin +$ mv php php_5.6.11 +$ ls -la +-rwxr-xr-x 1 root root 6600840 Jun 8 10:31 php_5.6.11 + +# On crée un lien symbolique +$ cd /usr/local/bin +$ ln -s /var/packages/PHP7.0/target/usr/local/bin/php70 php + +$ which php +/usr/local/bin/php + +$ php --ini +Configuration File (php.ini) Path: /usr/local/etc/php70 +Loaded Configuration File: /usr/local/etc/php70/php.ini +Scan for additional .ini files in: /usr/local/etc/php70/conf.d +Additional .ini files parsed: /usr/local/etc/php70/conf.d/SYNO.SDS.PhotoStation.ini +``` + + + +### Composer: + +Installation: + +```bash +root@DS916:/usr/local/bin# curl -s http://getcomposer.org/installer | php70 +All settings correct for using Composer +Downloading... + +Composer (version 1.6.3) successfully installed to: /usr/local/bin/composer.phar +Use it: php composer.phar +``` + +Installation des dépendances de l'application (ici Gitlist): + +```bash +bruno@DS916:/volume1/web/gitlist $ php70 /usr/local/bin/composer.phar install +Loading composer repositories with package information +Updating dependencies (including require-dev) +Package operations: 62 installs, 0 updates, 0 removals + +- Installing symfony/process (v3.4.6): Downloading (100%) +``` + +Pour simplifier l'utilisation: + +- Créer un script **composer.sh** dans `/usr/local/bin` +- Ajouter le contenu suivant: + +```bash +#!/bin/bash +php70 -d extension=phar.so /usr/local/bin/composer.phar $* +``` + +- Rendre le script exécutable et le renommer: + +```bash +$ chmod +X composer.sh + +$ mv composer.sh composer +``` + +- Utilisation: + +```bash +$ composer about +Composer - Package Management for PHP +Composer is a dependency manager tracking local dependencies of your projects and libraries. +See https://getcomposer.org/ for more information. +``` + +- Mise à jour: + +```bash +$ sudo composer self-update +You are already using composer version 1.7.1 (stable channel). +``` + + + +### Erreurs: + +/bin/nano + +nano: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory + +```bash +sudo ln -s /lib/libncurses.so.5.9 /lib/libtinfo.so.5 +``` + diff --git a/docs/Synology/eadir.md b/docs/Synology/eadir.md new file mode 100644 index 0000000..8737f7f --- /dev/null +++ b/docs/Synology/eadir.md @@ -0,0 +1,17 @@ +# Trouver et supprimer les répertoires @eaDir + +### Désactiver les services qui créent ces dossiers: + +Se connecter sous root en ssh, puis: + +```bash +chmod 000 S66fileindexd.sh S66synoindexd.sh S77synomkthumbd.sh S88synomkflvd.sh S99iTunes.sh +``` + +### Supprimer les répertoires @eaDir existants: + +Toujours en ssh, se placer dans le répertoire racine, puis: + +```bash +find . -type d -name "@eaDir" -print0 | xargs -0 rm -rf +``` \ No newline at end of file diff --git a/docs/Synology/index.md b/docs/Synology/index.md new file mode 100644 index 0000000..6c8439b --- /dev/null +++ b/docs/Synology/index.md @@ -0,0 +1,31 @@ +# Synology + +[Installer ipkg et ses packages (DSM5)](opkg/iPKG5.md) + +[Installer ipkg et ses packages (DSM6)](opkg/iPKG6.md) + +[Installer oPKG](opkg/oPKG.md) (Entware) + +[Installer le shell bash](bash.md) + +Installer ownCloud (depuis paquet) + +[Installer ownCloud (depuis archive) (DSM6)](owncloud.md) + +[Dossiers @eaDir](eadir.md) + +[DSM 6](dsm6.md) + +[Scripts](scripts.md) + + + +#### Liens: + +[DS916+ Guide d'installation rapide](syno_qig_ds916_fra.pdf) + +[DS414 Guide d'installation rapide](syno_qig_4bay_fra.pdf) + +[DSM 6.1 Guide de l'utilisateur](syno_usersguide_naserver_fra.pdf) + +[:fa-link: Support Synology](https://www.synology.com/fr-fr/support) \ No newline at end of file diff --git a/docs/Synology/opkg/iPKG5.md b/docs/Synology/opkg/iPKG5.md new file mode 100644 index 0000000..bab992c --- /dev/null +++ b/docs/Synology/opkg/iPKG5.md @@ -0,0 +1,83 @@ +# iPKG (DSM 5) + +### Installer iPKG: + +Se connecter sous root + +```bash +ssh root@192.168.0.8 +``` + +Télécharger et installer le bootstrap + +```bash +DiskStation> wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/syno-mvkw-bootstrap_1.2-7_arm.xsh +DiskStation> chmod 700 syno-mvkw-bootstrap_1.2-7_arm.xsh +DiskStation> sh syno-mvkw-bootstrap_1.2-7_arm.xsh +DiskStation> vi bootstrap.sh #https://github.com/basmussen/ds414-boostrap-dsm5 +DiskStation> sh bootstrap.sh +DiskStation> reboot +DiskStation> /opt/bin/ipkg update +DiskStation> /opt/bin/ipkg list +DiskStation> /opt/bin/ipkg install pkg +``` + +Nettoyer le dossier /root/ ([:fa-link:http://objnux.1s.fr/index.php?post/2009/11/25/IPKG-sur-SYNOLOGY-ds107](http://objnux.1s.fr/index.php?post/2009/11/25/IPKG-sur-SYNOLOGY-ds107)) + +```bash +DiskStation> rm syno*.* +DiskStation> rm -Rf bootstrap +``` + + + +### Mettre à jour iPKG: + +Se connecter sous root + +```bash +ssh root@192.168.0.8 +``` + +Mettre à jour les paquets installés + +```bash +DiskStation> /opt/bin/ipkg update +DiskStation> /opt/bin/ipkg upgrade +``` + + + +### Désinstaller iPKG: + +```bash +rm -rf /volume1/@optware +rm -rf /usr/lib/ipkg +``` + + + +### Rajouter /opt/bin dans le PATH + +```bash +DiskStation> cd /root +DiskStation> /opt/bin/nano .profile + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/opt/bin +``` + + + +### Configuration de nail: + +Editer le fichier /opt/etc/nail.rc: + +```bash +set from="bruno@funnymac.com" +set smtp=smtp://smtp.funnymac.com +#set smtp-use-starttls +set smtp-auth=login +set smtp-auth-user=postmaster%funnymac.com +set smtp-auth-password=dt7ek7wA +set ssl-verify=ignore +``` \ No newline at end of file diff --git a/docs/Synology/opkg/iPKG6.md b/docs/Synology/opkg/iPKG6.md new file mode 100644 index 0000000..a99b1be --- /dev/null +++ b/docs/Synology/opkg/iPKG6.md @@ -0,0 +1,145 @@ +# iPKG (DSM 6) + +### Installer iPKG: + +Se connecter en root: + +```bash +ssh bruno@192.168.1.7 +#puis +bruno@DS916:~ $ sudo -i +root@DS916:~# +``` + +Télécharger et installer le bootstrap correspondant au processeur du NAS. + +Pour le DS414 → MARVELL Armada XP MV78230 → processeur ARM v7 avec FPU → ARMv7 EABI hardfloat + +Pour le DS916 → INTEL Pentium N3710 + +[Optware-ng](https://github.com/Optware/Optware-ng) + +```bash +DiskStation> cd /volume1/@tmp + +# DS414 +DiskStation> wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | sh +# DS916 +DiskStation> wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-i686-bootstrap.sh | sh + +DiskStation> chmod +x buildroot-armeabihf-bootstrap.sh +DiskStation> sh buildroot-armeabihf-bootstrap.sh +``` + +```bash +./data.tar.gz +./ +./opt/ +./opt/bin/ +./opt/bin/ipkg-static +./opt/bin/ipkg +./opt/bin/update-alternatives +./opt/var/ +./opt/var/lock/ +./opt/share/ +./opt/share/man/ +./opt/share/man/man1/ +./opt/share/man/man1/opkg-cl.1 +./opt/share/opkg/ +./opt/share/opkg/intercept/ +./opt/share/opkg/intercept/update-modules +./opt/share/opkg/intercept/depmod +./opt/share/opkg/intercept/ldconfig +./opt/etc/ +./opt/etc/ipkg/ +./opt/etc/ipkg/ipkg.conf +./opt/etc/ipkg.conf +Bootstraping done +Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive +``` + +Une fois l'installation terminée, mettre à jour la liste des packages + +``` +DiskStation> /opt/bin/ipkg update +``` + + + +### Nettoyer le dossier d'installation: + +```bash +DiskStation> cd /volume1/@tmp +DiskStation> rm buildroot-armeabihf-bootstrap.sh +``` + + + +### Principales commandes + +Afficher la liste des packages + +```bash +DiskStation> /opt/bin/ipkg list +``` + +Afficher la liste des packages installés + +```bash +DiskStation> /opt/bin/ipkg list-installed +``` + +Installer une application + +```bash +DiskStation> /opt/bin/ipkg install pkg +``` + +Mettre à jour les packages + +```bash +DiskStation> /opt/bin/ipkg upgrade +``` + +Supprimer un package + +```bash +DiskStation> /opt/bin/ipkg remove pkg +``` + + + +### Mettre à jour iPKG: + +Se connecter sous un compte admin + +```bash +ssh bruno@192.168.0.8 +``` + +Mettre à jour les paquets installés + +```bash +DiskStation> /opt/bin/ipkg update +DiskStation> /opt/bin/ipkg upgrade +``` + + + +### Désinstaller iPKG: + +```bash +rm -rf /volume1/@optware +rm -rf /usr/lib/ipkg +``` + + + +### Rajouter /opt/bin dans le PATH: + +```bash +DiskStation> cd /root +DiskStation> /opt/bin/nano .profile + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/opt/bin +``` \ No newline at end of file diff --git a/docs/Synology/opkg/oPKG.md b/docs/Synology/opkg/oPKG.md new file mode 100644 index 0000000..9eccc47 --- /dev/null +++ b/docs/Synology/opkg/oPKG.md @@ -0,0 +1,273 @@ +# opkg (Entware) + +https://github.com/Entware/Entware/wiki + + + +### Installer oPKG: + +Se connecter en root: + +```bash +ssh bruno@192.168.1.7 +#puis +bruno@DS916:~ $ sudo -i +root@DS916:~# +``` + +Créer un dossier sur le disque: + +```bash +mkdir -p /volume1/@Entware/opt +``` + +Supprimer le dossier /opt et monter le dossier optware + +```bash +rm -rf /opt +mkdir /opt +mount -o bind "/volume1/@Entware/opt" /opt +``` + +Lancer le script d'installation: + +- for armv7 (DS414) + +```bash +wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh +``` + +- for x64 (DS916) + +```bash +wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh +``` + +Créer une tâche de démarrage: + +DSM -> Panneau de configuration -> Planificateur de tâche -> Créer une tâche déclenchée + +- Tâche: Entware +- Utilisateur: root +- Evènement: Démarrage +- Paramètres de tâche -> Exécuter la commande: + +```bash +#!/bin/sh + +# Mount/Start Entware +mkdir -p /opt +mount -o bind "/volume1/@Entware/opt" /opt +/opt/etc/init.d/rc.unslung start + +# Add Entware Profile in Global Profile +if grep -qF '/opt/etc/profile' /etc/profile; then + echo "Confirmed: Entware Profile in Global Profile" +else + echo "Adding: Entware Profile in Global Profile" +cat >> /etc/profile <<"EOF" + +# Load Entware Profile +. /opt/etc/profile +EOF +fi + +# Update Entware List +/opt/bin/opkg update +``` + +Redémarrer le NAS + +Ajouter `/opt/bin & /opt/sbin` à la variable $PATH + + + +### Utiliser oPKG + +Se connecter sous un compte admin: + +```bash +ssh bruno@192.168.0.8 +``` + +##### Mettre à jour la liste des paquets: + +```bash +bruno@DS916:~ $ sudo opkg update +Password: +Downloading http://bin.entware.net/x64-k3.2/Packages.gz +Updated list of available packages in /opt/var/opkg-lists/entware +``` + +##### Mettre à jour tous les paquets: + +```bash +bruno@DS916:~ $ sudo opkg upgrade +``` + +##### Installer un paquet: + +```bash +bruno@DS916:~ $ sudo opkg install ffmpeg +Password: +Installing ffmpeg (3.2.10-3) to root... +Downloading http://bin.entware.net/x64-k3.2/ffmpeg_3.2.10-3_x64-3.2.ipk +``` + +##### Supprimer un paquet: + +```bash +bruno@DS916:~ $ sudo opkg remove +``` + +##### Marquer un paquet: + +```bash +bruno@DS916:~ $ sudo opkg flag +``` + + + +##### Liste des paquets disponibles: + +```bash +bruno@DS916:~ $ sudo opkg list [paquet] +``` + +http://bin.entware.net/armv7sf-k3.2/Packages.html + +##### Liste des paquets installés: + +```bash +bruno@DS916:~ $ sudo opkg list-installed +alsa-lib - 1.1.5-1 +entware-opt - 227000-3 +entware-release - 1.0-2 +entware-upgrade - 1.0-1 +... +``` + +##### Liste des mises-à-jour de paquets disponibles: + +```bash +bruno@DS916:~ $ sudo opkg list-upgradable +``` + +##### Liste des fichiers d'un paquet: + +```bash +bruno@DS916:~ $ sudo opkg files nano +Package nano (2.9.6-1) is installed on root and has the following files: +/opt/share/nano/texinfo.nanorc +/opt/share/nano/po.nanorc +... +``` + +##### Chercher un paquet: + +```bash +bruno@DS916:~ $ sudo opkg search ??? +``` + +##### Afficher les infos sur un paquet: + +```bash +bruno@DS916:~ $ sudo opkg info vim +Package: vim +Version: 8.0.586-2 +Depends: libc, libssp, librt, libpthread, libncurses +Status: unknown ok not-installed +Section: utils +Architecture: x64-3.2 +MD5Sum: 49db8c4294e7edd8236eb2609dfd4527 +Size: 350167 +Filename: vim_8.0.586-2_x64-3.2.ipk +Description: Vim is an almost compatible version of the UNIX editor Vi. + (Tiny build) +``` + +##### Status d'un paquet: + +```bash +bruno@DS916:~ $ sudo opkg status nano +Package: nano +Version: 2.9.6-1 +Depends: libc, libssp, librt, libpthread, libncursesw, zlib, file +Status: install user installed +Architecture: x64-3.2 +Conffiles: + /opt/etc/nanorc ff3c86182093564e3313eeaa0eb367cb092c4bd838128bda02a91dd5e3017e63 +Installed-Time: 1536489744 +``` + + + +##### Options: + +-V --verbosity mode bavard + +-A tous les paquets (pas seulement ceux installés) + + + +https://wiki.openwrt.org/doc/techref/opkg + + + +### Ne plus rentrer de mot-de-passe pour opkg: + +```bash +bruno@DS916:~ $ cd kymsu/ +-rwx------ 1 bruno users 1078 Sep 11 18:45 kymsu2.sh +-drwxr-xr-x 1 bruno users 30 Sep 12 16:39 plugins.d +``` + + + +Créer un fichier de config sudo pour l'utilisateur dans `sudoers.d` (apparemment, pas la peine de décommenter la ligne `#includedir /etc/sudoers.d` dans `sudoers`) + +```bash +root@DS916:/etc/sudoers.d# ls -la +total 12 +drwxr-x--- 2 root root 4096 Sep 12 20:08 . +drwxr-xr-x 48 root root 4096 Sep 10 17:07 .. +-r--r----- 1 root root 68 Sep 12 20:34 bruno +root@DS916:/etc/sudoers.d# nano bruno +``` + +```bash +bruno ALL=(ALL) NOPASSWD:/var/services/homes/bruno/kymsu/kymsu2.sh +``` + +Permet à l'utilisateur bruno de lancer le script kymsu2.sh avec sudo mais sans mot de passe. + +Pas besoin de redémarrer. + +Au prochain lancement du script par la commande sudo, le mot-de-passe n'est plus demandé: + +```bash +bruno@DS916:~/kymsu $ sudo ./kymsu2.sh + +📦 oPKG + +Downloading http://bin.entware.net/x64-k3.2/Packages.gz +Updated list of available packages in /opt/var/opkg-lists/entware + +No availables updates. +``` + +Pour cette commande (passage à root), le mot-de-pass est bien demandé pour la commande sudo: + +```bash +bruno@DS916:~/kymsu $ sudo -i +Password: +``` + + + +Exécuter kymsu2.sh à distance: + +```bash +bruno@silverbook:~$ ssh dsm916 ./kymsu/kymsu2.sh +``` + diff --git a/docs/Synology/owncloud.md b/docs/Synology/owncloud.md new file mode 100644 index 0000000..496dea6 --- /dev/null +++ b/docs/Synology/owncloud.md @@ -0,0 +1,149 @@ +### Installation: + +#### Télécharger ownCloud Server + +[:fa-link:https://owncloud.org/install/#edition](https://owncloud.org/install/#edition) + +#### Installer ownCloud Server + +[:fa-link:https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#installation-wizard](https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#installation-wizard) + +#### Lancer /volume1/web/perm_owc.sh pour corriger toutes les autorisations. + +[:fa-link:https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions](https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions) + +#### Aller à l'adresse http://192.168.1.7/owncloud/ pour démarrer l'installation. + +*Créer un compte administrateur:* bruno / +*Répertoire des données:* /volume1/owncloud/data +*Configurer la base de donnée MySQL/MariaDB:* + +- User: root +- Mot de passe de la base: +- Nom de la base de donnée: owncloud +- Hôte: localhost + + + +### Autorisations: + +**Dossier owncloud:** + +```bash +bruno@DS916:/volume1/web $ +drwxr-x— 1 root http 450 Dec 11 10:01 owncloud +``` + +**et son contenu:** + +```bash +root@DS916:/volume1/web/owncloud# ls -la +total 144 +drwxr-x--- 1 root http 450 Dec 11 10:01 . +d---------+ 1 root root 408 Dec 11 10:01 .. +drwxr-x--- 1 root http 588 Dec 11 09:58 3rdparty +drwxr-x--- 1 http http 608 Dec 11 09:58 apps +drwxr-x--- 1 http http 0 Dec 11 10:01 assets +-rw-r----- 1 root http 8301 Nov 8 11:53 AUTHORS +drwxr-x--- 1 http http 72 Dec 11 10:02 config +-rw-r----- 1 root http 4134 Nov 8 11:53 console.php +-rw-r----- 1 root http 34520 Nov 8 11:53 COPYING-AGPL +drwxr-x--- 1 root http 332 Dec 11 09:59 core +-rw-r----- 1 root http 5141 Nov 8 11:53 cron.php +-rw-r----- 1 root http 35830 Nov 8 11:53 db_structure.xml +-rw-r--r-- 1 root http 2496 Nov 8 11:53 .htaccess +-rw-r----- 1 root http 179 Nov 8 11:53 index.html +-rw-r----- 1 root http 3062 Nov 8 11:53 index.php +drwxr-x--- 1 root http 58 Dec 11 09:58 l10n +drwxr-x--- 1 root http 94 Dec 11 09:59 lib +-rwxr-x--x 1 root http 283 Nov 8 11:53 occ +drwxr-x--- 1 root http 70 Dec 11 09:58 ocs +drwxr-x--- 1 root http 18 Dec 11 09:59 ocs-provider +-rw-r----- 1 root http 3086 Nov 8 11:53 public.php +-rw-r----- 1 root http 5428 Nov 8 11:53 remote.php +drwxr-x--- 1 root http 34 Dec 11 09:59 resources +-rw-r----- 1 root http 26 Nov 8 11:53 robots.txt +drwxr-x--- 1 root http 288 Dec 11 09:59 settings +-rw-r----- 1 root http 1893 Nov 8 11:53 status.php +drwxr-x--- 1 http http 26 Dec 11 09:58 themes +drwxr-x--- 1 http http 310 Dec 11 09:59 updater +-rw-r----- 1 root http 163 Nov 8 11:53 .user.ini +-rw-r----- 1 root http 233 Nov 8 11:54 version.php +``` + +**Le dossier config:** + +```bash +root@DS916:/volume1/web/owncloud/config# ls -la +total 52 +drwxr-x--- 1 http http 100 Dec 11 10:39 . +drwxr-x--- 1 root http 450 Dec 11 10:01 .. +-rw-r----- 1 http http 604 Dec 11 10:18 config.php +-rw-r----- 1 http http 604 Dec 11 10:39 config.php.bak +-rw-r----- 1 http http 40557 Nov 8 11:53 config.sample.php +-rw-r----- 1 http http 225 Nov 8 11:53 .htaccess +``` + +**Dossier data:** + +```bash +bruno@DS916:/volume1 $ +drwxrwxrwx+ 1 http http 20 Aug 28 14:28 owncloud +``` + +```bash +bruno@DS916:/volume1/owncloud $ +drwxrwx— 1 http http 146 Dec 11 10:19 data +``` + +[:fa-link:Setting Strong Directory Permissions](https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions) + + + +### Apps: + +[:fa-link:https://apps.owncloud.com/](https://apps.owncloud.com/) + +- files*mv\* direct*menu +- OwnNote +- OwnBackup + + + +### Redirection http vers https: + +Rajouter les 2 lignes suivantes au .htaccess + +```bash +RewriteCond %{HTTPS} off +RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] +``` + +```bash +root@DS916:/volume1/web/owncloud# ls -la +-rw-r--r-- 1 root http 2587 Dec 11 18:52 .htaccess +-rw-r--r-- 1 root http 2496 Dec 11 18:45 .htaccess-bak + +root@DS916:/volume1/web/owncloud# nano .htaccess +``` + +```bash + + RewriteEngine on + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L] + RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L] + RewriteRule ^.well-known/carddav /remote.php/dav/ [R=301,L] + RewriteRule ^.well-known/caldav /remote.php/dav/ [R=301,L] + RewriteRule ^remote/(.*) remote.php [QSA,L] + RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] + RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.* + RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] + +``` + +### Liens + +[:fa-link:http://www.iholken.com/index.php/2016/03/15/guide-for-installing-owncloud-9-to-synology-nas-running-dsm-6/](http://www.iholken.com/index.php/2016/03/15/guide-for-installing-owncloud-9-to-synology-nas-running-dsm-6/) \ No newline at end of file diff --git a/docs/Synology/python.md b/docs/Synology/python.md new file mode 100644 index 0000000..8565582 --- /dev/null +++ b/docs/Synology/python.md @@ -0,0 +1,64 @@ +# Installer pip et python 3 + + + +DSM 6 fournit Python 2 (2.7.12) dans `/bin/python` + + + +### Installer Python 3: + +Il faut installer **python 3** et **pip** depuis iPKGui, soit les paquets: + +- python3 +- py3-pip +- py3-setuptools + +L'installation se fait dans `/opt/bin/` + +```bash +$ which python3 +/opt/bin/python3 + +$ which pip3 +/opt/bin/pip3 +``` + +Les modules sont ici: + +`/volume1/@optware/local/lib/python3.5/site-packages` (pip, setuptools) + + + +### Installer un module (mkdocs): + +!!! Pour des problèmes de droit, l'installation se fait avec —user + PermissionError: [Errno 13] Permission denied: '/opt/local/lib/python3.5/site-packages/click-6.7.dist-info' + + + +```bash +$ pip3 install --user mkdocs +$ pip3 install --user klaus +``` + +Les modules sont installés ici: + +`/volume1/homes/bruno/.local/lib/python3.5/site-packages` + +L'applicatif est installé ici: + +`/volume1/homes/bruno/.local/bin/klaus` + + + +~/.local/lib/python3.5/site-packages/klaus/wsgi.py + + + +### Mettre à jour un module: + +```bash +$ pip3 install --user --upgrade setuptools +``` + diff --git a/docs/Synology/scripts.md b/docs/Synology/scripts.md new file mode 100644 index 0000000..89a7487 --- /dev/null +++ b/docs/Synology/scripts.md @@ -0,0 +1,24 @@ +# FFmpeg + + + +[:fa-link: Doc](http://ffmpeg.org/ffmpeg.html#Options) + +[:fa-link: Encode AAC](https://trac.ffmpeg.org/wiki/Encode/AAC) + + + +#### Copier un fichier sur le NAS + +```bash +$ scp -P42666 wsgi.py bruno@192.168.1.7:/var/services/homes/bruno/scripts/ + +$ scp -P42666 httpd_vhost.conf bruno@clicclac.synology.me:/var/services/homes/bruno/ +``` + +#### Réception d'un fichier depuis le NAS + +```bash +$ scp -P42666 bruno@clicclac.synology.me:/var/services/homes/bruno/httpd-vhost.conf /Users/bruno/Desktop +``` + diff --git a/docs/Synology/syno_qig_4bay_fra.pdf b/docs/Synology/syno_qig_4bay_fra.pdf new file mode 100644 index 0000000..749137d Binary files /dev/null and b/docs/Synology/syno_qig_4bay_fra.pdf differ diff --git a/docs/Synology/syno_qig_ds916_fra.pdf b/docs/Synology/syno_qig_ds916_fra.pdf new file mode 100644 index 0000000..e8a9a0a Binary files /dev/null and b/docs/Synology/syno_qig_ds916_fra.pdf differ diff --git a/docs/Synology/syno_usersguide_naserver_fra.pdf b/docs/Synology/syno_usersguide_naserver_fra.pdf new file mode 100644 index 0000000..b638356 Binary files /dev/null and b/docs/Synology/syno_usersguide_naserver_fra.pdf differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f09d120 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,16 @@ +# Accueil + + + +[macos](macos/index.md) + +[Linux](Linux/index.md) + +[MySQL](MySQL/index.md) + +[Raspberry](Raspberry/index.md) + +[Synology](Synology/index.md) + +[Divers](Divers/index.md) + diff --git a/docs/macos/.DS_Store b/docs/macos/.DS_Store new file mode 100644 index 0000000..320578e Binary files /dev/null and b/docs/macos/.DS_Store differ diff --git a/docs/macos/Divers.md b/docs/macos/Divers.md new file mode 100644 index 0000000..1c477af --- /dev/null +++ b/docs/macos/Divers.md @@ -0,0 +1,72 @@ +# Divers + +#### Convertir une page man en fichier txt: + +```bash +bruno@SilverBook:~$ man tmutil | col -b > tmutil.txt +``` + +( -bx) + +#### Convertir une page man en fichier pdf: + +(installer Ghostscript pour avoir ps2pdf) + +```bash +bruno@SilverBook:~$ man -t tmutil | ps2pdf - tmutil.pdf +``` + +#### Installer LaTeX: + +```bash +$ brew cask install basictex +``` + +ou + +```bash +$ brew cask install mactex +``` + +#### rsync + +`—delete` (efface de la destination ce qui n’est plus dans la source) + +#### Créer une image disque: + +```bash +bruno@SilverBook:~$ hdiutil create -srcfolder /Users/bruno/Downloads/PC archive.dmg + +....................................................................................................................................................................................... + +created: /Users/bruno/archive.dmg +``` + +#### Rapport système: + +```bash +bruno@SilverBook:~$ system_profiler -detailLevel basic > report.txt +``` + +#### Comparer fichiers et répertoires: + +```bash +$ opendiff Contract1.rtf Contract2.rtf +``` + +#### Chercher les m-à-j sur l'App Store: + +```bash +$ softwareupdate -l +Software Update Tool + +Finding available software +No new software available. +``` + +#### Installer les m-à-j: + +```bash +$ sudo softwareupdate -i -a +``` + diff --git a/docs/macos/TouchID.md b/docs/macos/TouchID.md new file mode 100644 index 0000000..b0eb4f1 --- /dev/null +++ b/docs/macos/TouchID.md @@ -0,0 +1,32 @@ +# Comment utiliser Touch ID dans le Terminal (commande sudo): + + + +```bash +$ sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.bak + +$ sudo nano /etc/pam.d/sudo +``` + + + +Ajoutez la ligne suivante au début du fichier, et enregistrez : + +`auth sufficient pam_tid.so` + +```bash +# sudo: auth account password session +auth sufficient pam_tid.so +auth sufficient pam_smartcard.so +auth required pam_opendirectory.so +account required pam_permit.so +password required pam_deny.so +session required pam_permit.so +``` + + + +!!! attention + Les connections ssh sans mot-de-passe ne fonctionnent plus. + + diff --git a/docs/macos/bash_exemples.md b/docs/macos/bash_exemples.md new file mode 100644 index 0000000..d57b637 --- /dev/null +++ b/docs/macos/bash_exemples.md @@ -0,0 +1,77 @@ +# Bash (exemples) + + + +Ajouter un préfixe à la ligne d'un fichier texte: + +```bash +brew list | sed -e 's/^/brew install /' > brew-list.txt +``` + +Pour un suffixe: + +```bash +sed -e 's/$/suffix/' +``` + + + +Cherche tous les .jpg d'un répertoire et les effacer: + +```bash +find . -name '*jpg' -exec rm {} + +``` + + + +Concaténer tous les .csv: + +```bash +find . -type f -iname "*.csv" -exec cat {} \; > toutes.txt +``` + + +Couleurs dans le terminal: + +```bash +export UNDERLINE=$(tput sgr 0 1) +export BOLD=$(tput bold) +export BLACK=$(tput setaf 0) +export RED=$(tput setaf 1) +export GREEN=$(tput setaf 2) +export YELLOW=$(tput setaf 3) +export BLUE=$(tput setaf 4) +export PURPLE=$(tput setaf 5) +export CYAN=$(tput setaf 6) +export WHITE=$(tput setaf 7) +export GRAY=$(tput setaf 8) +export LIGHTRED=$(tput setaf 9) +export LIGHTGREEN=$(tput setaf 10) +export LIGHTYELLOW=$(tput setaf 11) +export LIGHTBLUE=$(tput setaf 12) +export LIGHTPURPLE=$(tput setaf 11) +export LIGHTCYAN=$(tput setaf 11) +export RESET=$(tput sgr0) +``` + +```bash +echo "${BLUE}blue${RESET} ${RED}red${RESET}" +blue red +for i in {0..255}; do echo "$(tput setaf $i)test"; done + +``` + +Supprimer récursivement tous les fichiers .DS_ST0RE: + +```bash +sudo find / -name ".DS_Store" -depth -exec rm {} \; +``` + +```bash +find . -name '*.DS_Store' -type f -delete +``` + +```bash +find . -name '.DS_Store' -type f -print -exec rm -f {} + +``` + diff --git a/docs/macos/executer_shell_script.md b/docs/macos/executer_shell_script.md new file mode 100644 index 0000000..b612a29 --- /dev/null +++ b/docs/macos/executer_shell_script.md @@ -0,0 +1,30 @@ +# Exécuter un shell script depuis le Finder + + + +- Renommer le script avec l'extension .command: + + ```bash + $ cp mkdocs.sh mkdocs.command + ``` + +- Le rendre exécutable + + ```bash + $ chmod +x mkdocs.command + ``` + +- Le script doit commencer par `!/bin/bash` + + + +Pour le lancer depuis LaunchBar: Info Fichier -> Ouvrir avec -> iTem + + + +Connaître le répertoire courant: + +```bash +DIRNAME=`dirname "$0"` +``` + diff --git a/docs/macos/homebrew/brew-cask.md b/docs/macos/homebrew/brew-cask.md new file mode 100644 index 0000000..2307f48 --- /dev/null +++ b/docs/macos/homebrew/brew-cask.md @@ -0,0 +1,191 @@ +# Homebrew-Cask + + + +**[:fa-link: Homebrew-Cask](https://github.com/caskroom/homebrew-cask)** + +**[:fa-link: https://caskroom.github.io](https://caskroom.github.io)** + + + +### Installer un plug-in QuickLook ([:fa-link: QLVideo](https://github.com/Marginal/QLVideo)): + +```bash +$ brew cask install qlvideo + +# --force réinstalle le Cask (si déjà présent) +``` + + +### Desinstaller: + +```bash +$ brew cask uninstall qlvideo +``` + + +### Liste de tous les Casks disponibles: + +```bash +$ brew cask search +``` + + + +### Liste de tous les Casks disponibles à propos de Chrome: + +```bash +$ brew cask search chrome +==> Partial Matches +chrome-devtools dmm-player-for-chrome google-chrome +chrome-remote-desktop-host epichrome mkchromecast +==> Remote Matches +caskroom/versions/google-chrome-canary caskroom/versions/google-chrome-dev +caskroom/versions/google-chrome-beta +``` + + + +### Information au sujet d'un Cask: + +```bash +$ brew cask info google-chrome +google-chrome: 63.0.3239.132 +https://www.google.com/chrome/ +Not installed +From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/google-chrome.rb +==> Name +Google Chrome +==> Artifacts +Google Chrome.app (App) +``` + + + +### Liste des Casks installés: + +```bash +$ brew cask list +basictex qlcolorcode suspicious-package +betterzipql qlstephen + +# -1 sortie sur une seule colonne +# --versions montre toutes les versions installés +``` + + + +### Aller à la page du project Homebrew-Cask: + +```bash +$ brew cask home +``` + + + +### Aller à la page du Cask: + +```bash +$ brew cask home qlstephen +``` + + + +### Liste des Casks mis-à-jour disponibles: + +```bash +$ brew cask outdated + +# --greedy inclus les Casks avec auto_updates true et version :latest +# --verbose +``` + + + +### Installer les mises-à-jour: + +```bash +$ brew cask reinstall `brew cask outdated` +``` + + + +```bash +$ brew cask outdated --greedy --verbose | grep -v '(latest)' | awk '{print $1}' | xargs brew cask reinstall + +# mets à jour les auto_updates true mais pas les version :latest +``` + + + +### Mettre à jour tous les Casks: + +```bash +$ brew cask upgrade + +# --greedy met à jour les Casks avec auto_updates true et version :latest +``` + + + +### Script d'installation: + +```bash +# !/bin/sh + +# Brew packages that I use alot. + +brew install wget +brew install ffmpeg +brew install node +brew install imagemagick + +# Some cask packages that I like. + +brew cask install google-chrome +brew cask install xquartz +brew cask install virtualbox +``` + +Sauver le script sous le fichier **installConfig.sh** et le rendre exécutable: + +```bash +$ chmod +x installConfig.sh +``` + + + +### Cache: + +```bash +$ cd ~/Library/Caches/Homebrew/Cask +total 480296 +drwxr-xr-x 11 bruno staff 352 18 jan 18:54 . +drwxr-xr-x 92 bruno staff 2944 17 jan 17:19 .. +-rw-r--r--@ 1 bruno staff 19529710 14 déc 12:30 airy--3.3.179.dmg +-rw-r--r-- 1 bruno staff 135495923 10 jan 01:59 atom--1.23.3.zip +-rw-r--r-- 1 bruno staff 74574230 7 jui 2017 basictex--2017.0607.pkg +-rw-r--r--@ 1 bruno staff 2158705 22 oct 05:23 cakebrew--1.2.5.dmg +-rw-r--r-- 1 bruno staff 28404 26 oct 14:01 qlcolorcode--2.0.9.zip +-rw-r--r-- 1 bruno staff 55479 21 mai 2017 qlmarkdown--1.3.5.zip +-rw-r--r-- 1 bruno staff 30945 24 mai 2017 qlstephen--1.4.4.zip +-rw-r--r--@ 1 bruno staff 5078603 22 mai 2017 transmission--2.92.dmg +-rw-r--r--@ 1 bruno staff 2825054 13 nov 11:03 vnc-viewer--6.17.1113.dmg +``` + + + +### Vider le cache: + +```bash +# Supprimer tous les téléchargements +$ brew cask cleanup + +# Supprimer les téléchargements vieux de + de 10 jours. +$ brew cask cleanup --outdated +``` + + + +https://github.com/Homebrew/homebrew-cask/blob/master/doc/development/adding_a_cask.md + diff --git a/docs/macos/homebrew/brew.md b/docs/macos/homebrew/brew.md new file mode 100644 index 0000000..de8a6cf --- /dev/null +++ b/docs/macos/homebrew/brew.md @@ -0,0 +1,457 @@ +# Homebrew + + + +**[:fa-link: https://docs.brew.sh](https://docs.brew.sh)** + +[:fa-link: formulae.brew.sh](http://braumeister.org) + + + + +### Update Homebrew et les formules: + +```bash +$ brew update +``` + +### Chercher les M-à-J: + +```bash +$ brew outdated + +# --verbose +``` + +### Mettre tout à jour: + +```bash +$ brew upgrade + +# --cleanup Met à jour et supprime les anciennes versions installées. +``` + + + +### Formules: + +#### Mettre à jour une formule: + +```bash +$ brew upgrade + +# --cleanup Met à jour et supprime les anciennes versions installées. +``` + +#### Installer une formule: + +```bash +$ brew install + +$ brew install --verbose --debug + +# --build-from-source Compile la formule depuis la source même si une bottle est disponible. Les dépendances sont installées depuis les bottles. +``` + +#### Installer une formule d’ailleurs la branche: + +```bash +$ brew install https://raw.github.com/user/repo/branch/formula.rb +``` + +#### Reinstaller une formule depuis les sources: + +```bash +$ brew reinstall -s +``` + +#### Desinstaller une formule: + +```bash +$ brew uninstall + +# --force toutes les versions de la formule seront effacées +# --ignore-dependencies desinstallera même si des dépendances restent installées +``` + +#### Desinstaller les anciennes versions d’une formule: + +```bash +$ brew cleanup + +# Supprime toutes les anciennes dans la Cellar et dans le Cache. + +# --dry-run (ou -n) montre ce qui va être supprimer mais n'enlève rien. +# --prune=days supprime les fichiers du Cache plus vieux que jours. +``` + +#### Desinstaller toutes les anciennes versions: + +```bash +$ brew cleanup + +# (-n ou --dry-run) voir tout ce qui sera désinstaller +``` + +#### Empecher la m-à-j d’un package: + +```bash +$ brew pin +``` +```bash +bruno@SilverBook:/usr/local/Cellar/terminal-notifier/1.8.0$ brew pin terminal-notifier +``` + +#### Re-permettre la m-à-j: + +```bash +$ brew unpin +``` + +#### Liste des formules installées: + +```bash +$ brew list + +# --versions affiche la verion en plus. +# --pinned affiche les formules pinned +``` + +#### Afficher des infos sur une formule installée: + +```bash +$ brew info +``` +```bash +$ brew info terminal-notifier + +terminal-notifier: stable 1.8.0 (bottled), HEAD + +Send macOS User Notifications from the command-line + +https://github.com/julienXX/terminal-notifier + +/usr/local/Cellar/terminal-notifier/1.7.1 (14 files, 2MB) + + Poured from bottle on 2016-10-19 at 07:24:46 + +/usr/local/Cellar/terminal-notifier/1.8.0 (5 files, 99.8KB) * + + Poured from bottle on 2017-08-12 at 20:20:48 + +From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/terminal-notifier.rb + +==> Requirements + +Build: xcode ✔ + +Required: macOS >= 10.8 ✔ +``` + +#### Description d'une formule: + +```bash +$ brew desc +``` + +```bash +$ brew desc httpd +httpd: Apache HTTP server +``` + +#### Afficher les options d'une formule: + +```bash +$ brew options +``` + +```bash +$ brew options php72 + --with-argon2 + Include libargon2 password hashing support + --with-cgi + Enable building of the CGI executable (implies --without-fpm) + --with-debug + Compile with debugging symbols + +# --compact sur une seule ligne +``` + +#### Chercher une formule (avec description): + +```bash +$ brew search --desc +``` + +```bash +$ brew search --desc pdf + +briss: Crop PDF files + +diff-pdf: Visually compare two PDF files +``` + +#### Activer une autre version: + +```bash +$ brew switch +``` +```bash +bruno@SilverBook:/usr/local/Cellar/terminal-notifier/1.8.0$ brew switch terminal-notifier 1.7.1 + +Cleaning /usr/local/Cellar/terminal-notifier/1.7.1 + +Cleaning /usr/local/Cellar/terminal-notifier/1.8.0 + +1 links created for /usr/local/Cellar/terminal-notifier/1.7.1 +``` + +#### Configurer (arguments) une formule: + +```bash +$ brew edit +``` + +#### Afficher la homepage de Homebrew: + +```bash +$ brew home +``` + +#### Afficher la homepage de la formule: + +```bash +$ brew home +``` + +#### Log: + +```bash +$ brew log +``` + +#### « keg-only » + +La formule est installée dans Cellar. Elle n’est pas linkée dans /usr/local + +Pour la linker: + +```bash +$ brew link +``` + +#### Changer de version de PHP: + +```bash +$ brew unlink php54 && brew link php53 +``` + +#### + +### Dépendances: + +#### Voir les dépendances: + +```bash +$ brew deps +``` + +```bash +$ brew deps httpd +apr +apr-util +boost +c-ares +jansson +jemalloc +libev +libevent +nghttp2 +openssl +pcre + +# --tree Présentation comme arbre +``` + +#### Montrer les formules installées qui ne sont pas des dépendances d'autres formules installées: + +```bash +$ brew leaves +``` + +#### Montrer les dépendances manquantes: + +```bash +$ brew missing +$ brew missing +``` + +#### Dépendances inverses: + +```bash +$ brew uses x264 --installed +ffmpeg +``` + + + +### Outils: + +#### Vérifier le système: + +```bash +$ brew doctor +``` + +#### Prune (supprimer les liens symboliques morts): + +```bash +$ brew prune + +# --dry-run +``` + +#### Où va tout ce que télécharge Homebrew (cache): + +```bash +$ brew --cache + +/Users/bruno/Library/Caches/Homebrew +``` + +```bash +$ cd /Users/bruno/Library/Caches/Homebrew +total 2616544 +drwxr-xr-x 92 bruno staff 2944 17 jan 17:19 . +drwx------+ 194 bruno staff 6208 18 jan 18:57 .. +drwxr-xr-x 11 bruno staff 352 18 jan 18:54 Cask +-rw-r--r-- 1 bruno staff 400053 28 oct 08:20 apr-1.6.3.high_sierra.bottle.tar.gz +-rw-r--r-- 1 bruno staff 242481 3 nov 02:01 apr-util-1.6.1_1.high_sierra.bottle.tar.gz +-rw-r--r-- 1 bruno staff 88679443 19 déc 10:23 boost-1.66.0.high_sierra.bottle.tar.gz +-rw-r--r-- 1 bruno staff 3434 16 déc 20:15 brew-pip-0.4.1.tar.gz +-rw-r--r-- 1 bruno staff 12310915 21 nov 13:01 cmake-3.10.0.high_sierra.bottle.tar.gz +``` + +#### Affiche le chemin de Cellar: + +```bash +$ brew --Cellar +/usr/local/Cellar + +$ brew --Cellar httpd +/usr/local/Cellar/httpd +``` + +#### Sauvegarder sa configuration Homebrew: + +Liste des packages, taps et casks installés: + +```bash +$ brew tap Homebrew/bundle +$ brew bundle dump +``` + +Ceci crée un fichier Brewfile que l'on peut éditer. + +```bash +tap 'homebrew/php' +brew 'homebrew/php/php71', args: ['with-imap'] +brew 'shpotify' +cask 'spotify' +``` + +#### Restaurer sa configuration: + +```bash +# Se positionner dans le répertoire contenant le fichier Brewfile + +$ brew bundle +``` + + + +### Services: + +#### Liste des services gérés par brew services: + +```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 +``` + +#### Lancer au démarrage: + +```bash +$ brew services start mysql +``` + +#### Démarrer (pas au boot): + +```bash +$ brew services run mysql +``` + +#### Arrêter le service: + +```bash +$ brew services stop mysql +``` + +#### Redémarrer le service: + +```bash +$ brew services restart mysql +``` + + + +### Taps (third-party repositories): + +[:fa-link: brew tap](https://docs.brew.sh/Taps.html) rajoute des repositories à **brew** + +#### Liste les repos tapped: + +```bash +$ brew tap +caskroom/cask +homebrew/apache +homebrew/core +homebrew/dupes +homebrew/php +homebrew/services +homebrew/versions +tideways/profiler +vapor/tap +``` + +Les tap sont situés là: + +```bash +bruno@silverbook:/usr/local/Homebrew/Library/Taps$ ls +caskroom homebrew tideways vapor +``` + +#### Ajouter un repo: + +```bash +$ brew tap +``` + +#### Supprimer un repo: + +```bash +$ brew untap +``` + + + +### Cask: + +### [:fa-link: Homebrew-Cask](brew-cask.md) \ No newline at end of file diff --git a/docs/macos/index.md b/docs/macos/index.md new file mode 100644 index 0000000..7cc44c7 --- /dev/null +++ b/docs/macos/index.md @@ -0,0 +1,36 @@ +# macos + +### Apache / PHP / MySQL + +[Installer **Apache** (homebrew)](webserver/apache.md) + +[Installer **PHP** (homebrew)](webserver/php.md) + +[Installer **MySQL** (homebrew)](webserver/mysql.md) + +[:fa-link: **PHP info** (Macbook)](http://silverbook.local/info.php) + + + +### Gestionnaire de paquets + +[**MacPorts**](https://clicclac.synology.me/dokuwiki/doku.php?id=osx:macports) est un système pour installer, compiler et gérer des programmes open-source. + +[**homebrew**](homebrew/brew.md) est un système pour installer, compiler et gérer des programmes open-source. + +[**pip**](python/pip.md) (Python install packages) + +[node](node/node-js.md) + + + +### Divers + +[Se connecter au NAS en ssh et sans mot de passe](ssh/ssh-passwordless.md) + +[Sécurité (Gatekeeper...)](securite.md) + +[Calcul d'un checksum, md5, sha256…](md5.md) + +[Touch ID](TouchID.md) + diff --git a/docs/macos/liens.md b/docs/macos/liens.md new file mode 100644 index 0000000..2ea8e0b --- /dev/null +++ b/docs/macos/liens.md @@ -0,0 +1,9 @@ +# Liens + + + +[Launchd](http://www.launchd.info) + +[How to Use launchd to Run Scripts on Schedule in macOS](https://www.maketecheasier.com/use-launchd-run-scripts-on-schedule-macos/) + +[Schedule jobs with crontab on Mac OS X](https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx.html) \ No newline at end of file diff --git a/docs/macos/md5.md b/docs/macos/md5.md new file mode 100644 index 0000000..e794162 --- /dev/null +++ b/docs/macos/md5.md @@ -0,0 +1,28 @@ +# Calculer le checksum d'un fichier ou d'un dossier + + + +Il faut installer **md5deep** (Recursively compute digests on files/directories) avec [homebrew](homebrew/brew.md). + +Le paquet contient hash deep, md5deep, sha1deep, sha256deep, tigerdeep, whirlpooldeep. + + + +### Calcul du sha256 d’un fichier + +```bash +HackiMac:~ bruno$ sha256deep /Users/bruno/Library/ssdtPRGen/ACPI/APIC.aml + +64e0949f7af61f2c23e74ecd6c9f59d25f4b9b904befd9252159f671f0ea2581 /Users/bruno/Library/ssdtPRGen/ACPI/APIC.aml +``` + + + +### Calcul du sha256 d’un dossier + +```bash +HackiMac:~ bruno$ sha256deep -r /Volumes/EFI/EFI/CLOVER/kexts/Other/realtekALC.kext + +57b4630bf6365fd46d76e5d845b97cc8d1042e5fa48621086c3edcefb4d20517 /Volumes/EFI/EFI/CLOVER/kexts/Other/realtek +``` + diff --git a/docs/macos/node/ghost.md b/docs/macos/node/ghost.md new file mode 100644 index 0000000..5af0a37 --- /dev/null +++ b/docs/macos/node/ghost.md @@ -0,0 +1,67 @@ +# ghost + + + +[Installer nvm](nvm.md). + +Version LTS de Node: + +```bash +$ nvm install --lts +$ nvm use --lts +``` + +Installer ghost-cli: + +```bash +$ npm install -g ghost-cli +``` + +Créer un répertoire où installer Ghost: + +```bash +$ mkdir myblog +$ cd myblog +$ ghost install local +``` + +Quand l'installation est terminée, on accède à Ghost à l'adresse http://localhost:2368/ et http://localhost:2368/ghost/ pour la page administration. + + + +Paramétrage de Ghost (après l'installation) + +```bash +$ ghost setup +? Enter your blog URL: http://localhost:2368 +? Enter your MySQL hostname: localhost +? Enter your MySQL username: root +? Enter your MySQL password: [hidden] +? Enter your Ghost database name: ghost_prod +✔ Configuring Ghost +✔ Setting up instance +? Do you wish to set up "ghost" mysql user? Yes +✔ Setting up "ghost" mysql user +? Do you wish to set up Nginx? No +ℹ Setting up Nginx [skipped] +Task ssl depends on the 'nginx' stage, which was skipped. +ℹ Setting up SSL [skipped] +? Do you wish to set up Systemd? No +ℹ Setting up Systemd [skipped] +? Do you want to start Ghost? Yes +Ghost is already running! Run `ghost ls` for more information +``` + + + +View running ghost processes: + +```bash +$ ghost ls +┌─────────────┬───────────────┬─────────┬───────────────────────┬────────────────────────┬──────┬─────────────────┐ +│ Name │ Location │ Version │ Status │ URL │ Port │ Process Manager │ +├─────────────┼───────────────┼─────────┼───────────────────────┼────────────────────────┼──────┼─────────────────┤ +│ ghost-local │ ~/Sites/ghost │ 2.0.3 │ running (development) │ http://localhost:2368/ │ 2368 │ local │ +└─────────────┴───────────────┴─────────┴───────────────────────┴────────────────────────┴──────┴─────────────────┘ +``` + diff --git a/docs/macos/node/index.md b/docs/macos/node/index.md new file mode 100644 index 0000000..b5959e8 --- /dev/null +++ b/docs/macos/node/index.md @@ -0,0 +1,10 @@ +# WebServer + + + +[Ghost](ghost.md) + +[node-js](node-js.md) + +[nvm](nvm.md) + diff --git a/docs/macos/node/node-js.md b/docs/macos/node/node-js.md new file mode 100644 index 0000000..8360f3f --- /dev/null +++ b/docs/macos/node/node-js.md @@ -0,0 +1,163 @@ +# node.js + + + +[Node.js](https://nodejs.org/fr/)® est un environnement d’exécution JavaScript construit sur le [moteur JavaScript V8 de Chrome](https://developers.google.com/v8/). + +[npm](https://www.npmjs.com) est un gestionnaire de paquets pour JavaScript automatiquement installé avec Node. + +[nvm](https://github.com/creationix/nvm) (Node Version Manager) est un gestionnaire de version de Node. + + + +### Installation (Homebrew): + +```bash +# installer node et npm + +$ brew install node +``` + + + +### Installation (directe): + +Installer [Node.js](https://nodejs.org/en/download/) (version LTS) + + + +### Installation ([nvm](nvm.md)): + +```bash +$ brew install nvm + +# installer Node 8 +$ nvm install 8 + +# installer Node 10 +$ nvm install 10 +``` + + + +### Version de npm: + +```bash +# version: +$ node -v +v9.5.0 +$ npm -v +5.6.0 +``` + + + +### Update: + + +```bash +npm install npm@latest -g + +$ brew install node + +$ npm install npm --global +``` + +https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory + + + +### Local: + +Installer npm packages localement => `/Users/bruno/Sites/node_modules` + +- Installer: `npm install ` +- Mise-à-jour: `npm update` (depuis le répertoire du module) +- Desinstaller: `npm uninstall ` + +Mises à jour disponibles: + +```bash +bruno@silverbook:~/Sites/node_modules$ npm outdated +Package Current Wanted Latest Location +jquery MISSING 3.2.1 3.2.1 +livephotoskit 1.4.11 1.5.2 1.5.2 +``` + +Mettre-à-jour: +```bash +$ npm outdated | awk '{print $1}' | xargs npm update +``` + + + +### Global: + +Installer npm packages globalement => `/usr/local/lib/node_modules/` + +- Installer: `npm install -g ` +- Mise-à-jour: `npm update -g ` +- Désinstaller: `npm uninstall -g ` + + + + +### Aller dans node_modules: + +```bash +bruno@SilverBook:~$ cd Sites/node_modules/ +``` + +puis + +- Liste package installé: `nom ls` +- Mises à jour disponibles: `nom outdated` +- Installer une m-à-j: `nom update` +- Installer un package: `nom install package` +- Désinstaller un package: `nom uninstall package` + + + +### Supprimer tous les modules: + +```bash +$ for package in `ls node_modules`; do npm uninstall $package; done; +``` + + + +### Maintenance: + +```bash +$ npm doctor +npm WARN verifyCachedFiles Content garbage-collected: 46 (4358853 bytes) +npm WARN verifyCachedFiles Cache issues have been fixed +Check Value Recommendation +npm ping OK +npm -v v5.10.0 Use npm v6.4.1 +node -v v8.11.4 +npm config get registry https://registry.npmjs.org/ +which git /usr/bin/git +Perms check on cached files ok +Perms check on global node_modules ok +Perms check on local node_modules ok +Verify cache contents verified 2159 tarballs +``` + + + +### Packages: + +[Rechercher un package](https://npms.io) + + + +##### uninstall-all-modules + +Desinstaller tous les modules= + +```bash +$ npm uninstall +``` + +##### livephotoskit, jquery, picturefill \ No newline at end of file diff --git a/docs/macos/node/nvm.md b/docs/macos/node/nvm.md new file mode 100644 index 0000000..3a63e67 --- /dev/null +++ b/docs/macos/node/nvm.md @@ -0,0 +1,109 @@ +# nvm + + + +Installer nvm: + +```bash +$ brew install nvm +``` + +Créer un répertoire où sera installé les différentes versions de Node. + +```bash +$ mkdir ~/.nvm +``` + +Editer .bash_profile pour régler le répertoire NVM_DIR + +```bash +$ nano ~/.bash_profile +``` + +et ajouter les lignes suivantes. + +```bash +export NVM_DIR=~/.nvm +source $(brew --prefix nvm)/nvm.sh +``` + +Recharger le shell pour activer nvm. + +```bash +$ source ~/.bash_profile + +$ echo $NVM_DIR +$ nvm --version +``` + +Installer NodeJS. + +```bash +# la dernière version 8 +$ nvm install 8 + +# la version 8.9.4 +$ nvm install 8.9.4 + +# la dernière version 6 +$ nvm install 6 +``` + +Liste des versions de Node installées: + +```bash +$ nvm ls +# ou +$nvm list +-> v8.11.4 + v10.9.0 +default -> 8 (-> v8.11.4) +node -> stable (-> v10.9.0) (default) +stable -> 10.9 (-> v10.9.0) (default) +iojs -> N/A (default) +lts/* -> lts/carbon (-> v8.11.4) +lts/argon -> v4.9.1 (-> N/A) +lts/boron -> v6.14.4 (-> N/A) +lts/carbon -> v8.11.4 +``` + +Versions téléchargées: + +```bash +$ cd $NVM_DIR +- OR - +$ cd ~/.nvm +$ ls versions/node +v10.9.0 v8.11.4 +``` + +Version en usage: + +```bash +$ node -v +v8.11.4 +``` + +Changer de version: + +```bash +$ nvm use 10.9.0 +Now using node v10.9.0 (npm v6.2.0) +$ nvm use 10 +Now using node v10.9.0 (npm v6.2.0) +$ node -v +v10.9.0 +``` + +```bash +$ nvm use 8.11.4 +Now using node v8.11.4 (npm v5.6.0) +$ node -v +v8.11.4 +``` + +```bash +$ nvm use --lts +Now using node v8.11.4 (npm v5.6.0) +``` + diff --git a/docs/macos/python/Django.md b/docs/macos/python/Django.md new file mode 100644 index 0000000..b0078b6 --- /dev/null +++ b/docs/macos/python/Django.md @@ -0,0 +1,99 @@ +# Installer Django + + + +[Django](https://docs.djangoproject.com/en/2.0/topics/install/#installing-distribution-package) est un framework Web Python. + + + +#### Installer [mysqlclient](https://pypi.python.org/pypi/mysqlclient) + +```bash +$ pip3 install mysqlclient +``` + + + +#### Installer Django + +```bash +$ pip3 install Django + +$ python3 -m django --version +2.0.2 +``` + +[Django avec Apache et mod_wsgi](https://docs.djangoproject.com/fr/2.0/howto/deployment/wsgi/modwsgi/) + + + +Se positionner en dehors de Document root (/Users/bruno) pour démarrer un projet Django: + +```bash +~$ django-admin startproject mydjango +``` + + + +Installer [mod_wsgi](https://pypi.python.org/pypi/mod_wsgi) depuis pip: + +```bash +$ APXS=/usr/local/bin/apxs pip3 install mod_wsgi +``` + +ou depuis Homebrew: + +```bash +$ brew uninstall -vd mod_wsgi +$ brew install -vd mod_wsgi --with-homebrew-python +``` + +Lancer la commande `mod_wsgi-express module-config` pour connaitre les directives à ajouter à la configuration d'Apache (httpd.conf): + +```bash +$ mod_wsgi-express module-config +LoadModule wsgi_module "/usr/local/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-darwin.so" +WSGIPythonHome "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6" +``` + +Une fois https.conf modifié, relancer Apache: + +```bash +$ sudo apachectl -k restart -e Debug -E /dev/stdout +``` + +Une autre option est de copier le module mod_wsgi dans l'installation d'Apache avec la commande `mod_wsgi-expressinstall-module` + + + +Se positionner dans le dossier mydjango pour démarrer le serveur: + +```bash +$ python3 manage.py runserver +``` + +Pour changer le port (8000 par défaut) + +```bash +$ python3 manage.py runserver 8001 +``` + + + +Créer les tables dans la BDD. + +```bash +$ python3 manage.py migrate +``` + +Création d'un utilisateur administrateur. + +```bash +$ python manage.py createsuperuser +``` + + + + + +https://docs.djangoproject.com/fr/2.0/intro/tutorial03/#write-views-that-actually-do-something \ No newline at end of file diff --git a/docs/macos/python/index.md b/docs/macos/python/index.md new file mode 100644 index 0000000..e7e30fa --- /dev/null +++ b/docs/macos/python/index.md @@ -0,0 +1,10 @@ +# WebServer + + + +[Django](Django.md) + +[pip](pip.md) + +[python3](python3.md) + diff --git a/docs/macos/python/pip.md b/docs/macos/python/pip.md new file mode 100644 index 0000000..9d1bfac --- /dev/null +++ b/docs/macos/python/pip.md @@ -0,0 +1,301 @@ +# Installer pip (python 2): + +[:fa-link: https://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade](https://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade) + +### Documentation pip: + +[:fa-link: https://pip.pypa.io/en/stable/](https://pip.pypa.io/en/stable/) + + + +### Installer pip: + +```bash +$ sudo easy_install pip +``` + + Pour [Python 3](python3.md), **pip** est installé d'origine. + + + +### Version courrante de pip: + +```bash +$ pip --version +pip 9.0.1 from /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg (python 2.7) +``` + + + +### Mettre à jour pip: + +```bash +$ sudo pip install --upgrade pip +``` + +```bash +$ pip install --user --upgrade pip +``` + +!!! attention + Sur macOS, à cause de SIP (System Integrity Protection), l'installation se fait avec le mot-clé —user + + + +### Cache: + +Linux and Unix + +```bash +~/.cache/pip # and it respects the XDG_CACHE_HOME directory. +``` + +OS X + +```bash +~/Library/Caches/pip +``` + +Windows + +```bash +%LocalAppData%\pip\Cache +``` + + + +pip peut installer en ignorant le cache: + +```bash +pip --no-cache-dir install mkdocs +``` + + + +### Installer un module (mkdocs): + +```bash +$ pip install --user mkdocs +``` + +Les modules sont ici: + +`/Users/bruno/Library/Python/2.7/bin` + + + +### Désinstaller un module: + +```bash +$ pip uninstall +``` + + + +### Installer une ancienne version d'un module: + +```bash +$ pip3 show tornado +Name: tornado +Version: 5.0 +.../... + +$ pip3 install tornado==4.5.3 +Collecting tornado==4.5.3 +Installing collected packages: tornado + Found existing installation: tornado 5.0 + Uninstalling tornado-5.0: + Successfully uninstalled tornado-5.0 +Successfully installed tornado-4.5.3 + +$ pip3 install 'tornado>=4.1.0,<4.5.3' + +``` + + + +### Informations sur un module: + +```bash +$ pip show + +$ pip show mkdocs +Name: mkdocs +Version: 0.17.2 +Summary: Project documentation with Markdown. +Home-page: http://www.mkdocs.org +Author: Tom Christie +Author-email: tom@tomchristie.com +License: BSD +Location: /Users/bruno/Library/Python/2.7/lib/python/site-packages +Requires: tornado, PyYAML, click, Markdown, Jinja2, livereload +``` + + + +### Liste des modules installés: + +```bash +$ pip list --format=columns + +Package Version + +-------------------------------------- --------- + +altgraph 0.10.2 + +backports-abc 0.5 + +bdist-mpkg 0.5.0 +``` + + + +### Liste des modules mis-à-jour: + +```bash +$ pip list --outdated --format=columns + +Package Version Latest Type + +-------------------------------------- -------- ------ ----- + +altgraph 0.10.2 0.15 wheel + +macholib 1.5.1 1.9 wheel + +matplotlib 1.3.1 2.1.1 wheel +``` + + + +```bash +$ pip3 list --outdated --format=freeze +packaging==16.8 +Sphinx==1.7.0 +``` + +```bash +$ pip3 list --outdated --format=columns +Package Version Latest Type + +------ + +packaging 16.8 17.1 wheel +Sphinx 1.7.0 1.7.1 wheel +``` + +```bash +$ pip3 list --outdated --format=legacy +packaging (16.8) - Latest: 17.1 [wheel] +Sphinx (1.7.0) - Latest: 1.7.1 [wheel] +``` + +```bash +$ pip3 list --outdated --format=json +[{"name": "packaging", "version": "16.8", "latest_version": "17.1", "latest_filetype": "wheel"}, {"name": "Sphinx", "version": "1.7.0", "latest_version": "1.7.1", "latest_filetype": "wheel"}] +``` + + + +### Mettre à jour un module: + +```bash +$ pip install --user --upgrade + +$ pip install --user --upgrade mkdocs-material +``` + + + +### Chercher un module: + +```bash +$ pip search + +$ pip search markdown + +aberdeen (0.4.0) - Conversion from markdown files to database entries to use as the backend of a blog + +python-academicmarkdown (0.9.0) - A markdown preparser for academic writing + +odoo8-addon-web-widget-text-markdown (8.0.1.0.0.99.dev7) - web_widget_text_markdown + +lektor-markdown-admonition (0.1) - Adds basic admonition tag support to Markdown. +``` + + + +### Montrer les dépendances d'un module: + +```bash +$ pip3 show mkdocs | grep Requires +Requires: tornado, Markdown, click, PyYAML, Jinja2, livereload +``` + + + +### Modules: + +#### Yolk: + +```bash +$ pip3 install yolk3k +``` + +Montrer les dépendances: + +```bash +$ yolk -d mkdocs +mkdocs 0.17.3 + PyYAML>=3.10 + tornado<5.0,>=4.1 + Jinja2>=2.7.1 + click>=3.3 + Markdown>=2.3.1 + livereload>=2.5.1 +``` + +Montrer les M-à-J disponibles: + +```bash +$ yolk -U +tornado 4.5.3 (5.0) +``` + +Listes des modules installés: + +```bash +$ yolk -l +Babel - 2.5.3 - active development (/usr/local/lib/python3.6/site packages) +Django - 2.0.3 - active development (/usr/local/lib/python3.6/site-packages) +``` + +#### pipdeptree: + +Savoir quel module requiert tel module: + +```bash +$ pipdeptree -r -p mkdocs +mkdocs==0.17.3 + +- mkdocs-material==2.7.0 [requires: mkdocs>=0.17.1] +``` + +Montrer les dépendances: + +```bash +$ pipdeptree -p mkdocs +mkdocs==0.17.3 + +- click [required: >=3.3, installed: 6.7] +- Jinja2 [required: >=2.7.1, installed: 2.10] + - MarkupSafe [required: >=0.23, installed: 1.0] +- livereload [required: >=2.5.1, installed: 2.5.1] + - six [required: Any, installed: 1.11.0] + - tornado [required: Any, installed: 4.5.3] +- Markdown [required: >=2.3.1, installed: 2.6.11] +- PyYAML [required: >=3.10, installed: 3.12] +- tornado [required: <5.0,>=4.1, installed: 4.5.3] +``` + diff --git a/docs/macos/python/python3.md b/docs/macos/python/python3.md new file mode 100644 index 0000000..c9e9cbb --- /dev/null +++ b/docs/macos/python/python3.md @@ -0,0 +1,120 @@ +# Python 3 + + + +Python 3 peut s'installer avec Homebrew: + +```bash +$ brew install python3 +``` + +Les extensions Python 3 s'installent dans `/usr/local/lib/python3.6/site-packages/` + +Pour lancer un script Python 3: + +```bash +$ python3 script.py +``` + + + +Pour que python pointe sur Python 3 (homebrew), rajouter ceci à .bash_profile: + +```bash +export PATH=/usr/local/opt/python/libexec/bin:$PATH +``` + + + +Pip est installé d'origine avec Python 3. On le lance avec la commande **pip3**: + +```bash +$ pip3 list --outdated --format=columns +$ pip3 install mkdocs +``` + + + +Installation utilisateur: + +```bash +$ python3 -m site --user-base +/Users/bruno/Library/Python/3.6 +``` + +[Pipenv](https://docs.pipenv.org) + + + +### Modules: + +#### Mkdocs + +Mkdocs si'installe dans `/usr/local/bin` : + +```bash +bruno@silverbook:/usr/local/bin$ ./mkdocs --version +mkdocs, version 0.17.2 +``` + +Par défaut, c'est **mkdocs** installé avec Python 2 (macOS) qui se lance. + +Pour utiliser **mkdocs** installé pour Python 3 (Homebrew): + +```bash +bruno@silverbook:~/project$ /usr/local/bin/mkdocs serve +``` + + + +Par comparaison, les extensions Python 2 s'installent dans `/Library/Python/2.7/site-packages/` + +**Mkdocs** si'installe dans `~/Library/Python/2.7/bin` : + +```bash +bruno@silverbook:~/Library/Python/2.7/bin$ ./mkdocs --version +mkdocs, version 0.17.2 +``` + + + +#### Django + +[Installer Django](Django.md) + + + +#### Rechercher un module + +[PyPI - the Python Package Index](https://pypi.python.org/pypi) + + + +#### Problème à l'installation + +Erreur lors de l’install de python3 avec Homebrew: + +```bash +bruno@HackiMac:/usr/local/bin$ brew install python3 + +==> Downloading https://homebrew.bintray.com/bottles/python-3.7.0.high_sierra.bottle.3.tar.gz + +Already downloaded: /Users/bruno/Library/Caches/Homebrew/downloads/d76c2354ae237f190a868bb74f28d606b88cce724222bafa114e91cd8a1462d5--python-3.7.0.high_sierra.bottle.3.tar.gz + +==> Pouring python-3.7.0.high_sierra.bottle.3.tar.gz + +Error: An unexpected error occurred during the `brew link` step +The formula built, but is not symlinked into /usr/local +Permission denied @ dir_s_mkdir - /usr/local/Frameworks +Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks + + +``` + +Solution: + +```bash +sudo mkdir /usr/local/Frameworks +sudo chown $(whoami):admin /usr/local/Frameworks +``` + diff --git a/docs/macos/securite.md b/docs/macos/securite.md new file mode 100644 index 0000000..a8cb145 --- /dev/null +++ b/docs/macos/securite.md @@ -0,0 +1,32 @@ +# Sécurité (Gatekeeper...) + +#### Pour ajouter une application aux exceptions Gatekeepers et à la liste de lancement des applications approuvées: + +```bash +$ spctl --add /Path/To/Application.app +``` + + + +#### Suppression d'une demande de la liste d'approbation du Gatekeeper: + +```bash +$ spctl --remove /Path/To/Application.app +``` + + + +#### Pour désactiver complètement Gatekeeper: + +```bash +$ sudo spctl --master-disable +``` + + + +#### Pour désactiver Gatekeeper pour certaines applications: + +```bash +$ sudo xattr -rd com.apple.quarantine /Applications/LockedApp.app +``` + diff --git a/docs/macos/ssh/ssh-passwordless.md b/docs/macos/ssh/ssh-passwordless.md new file mode 100644 index 0000000..d8f000c --- /dev/null +++ b/docs/macos/ssh/ssh-passwordless.md @@ -0,0 +1,280 @@ +# Se connecter au NAS en ssh et sans mot de passe + + + +**Pré requis:** + +Le serveur doit accepter la connexion par clé: la ligne `PubKeyAuthentication yes` doit être présente dans le fichier de configuration du serveur, généralement /etc/ssh/sshd_config. + +Sur Mac, installer ssh-copy-id: + +```bash +$ brew install ssh-copy-id +``` + + + +### Générer sur la machine locale (Mac) + +Le jeu de clé/certficat (la clé est créée dans `~/.ssh/`): + +```bash +$ ssh-keygen -t rsa -b 4096 -C "Commentaire: ma clé sur le macbook" +Generating public/private rsa key pair. +Enter file in which to save the key (/Users/bruno/.ssh/id_rsa): +Enter passphrase (empty for no passphrase): +Enter same passphrase again: +Your identification has been saved in /Users/bruno/.ssh/id_rsa. +Your public key has been saved in /Users/bruno/.ssh/id_rsa.pub. +The key fingerprint is: +SHA256:WFJNXaCoraMCYSiP0xqlOvdOsh74W86rC5OgHJppvuw Commentaire: ma clé sur le macbook +The key's randomart image is: ++---[RSA 4096]----+ +| .o...o. | +| . .... | +|. . o . | +|+.. * | +|+O o S | +|@=+ . | +|@Bo o o | +|B+oO . . | +|.EOBB. | ++----[SHA256]-----+ +``` + +Plusieurs types de clé possibles (rsa, ecdsa, ed25519): + +```bash +$ ssh-keygen -t rsa -b 4096 -C "USEFUL-COMMENT" +$ ssh-keygen -t ecdsa -b 521 +$ ssh-keygen -t ed25519 +``` + +Sur ovh.com -> **rsa** + +Sur vps 1and1 -> **ed25519** + +Les clés DSA sont dépréciées dans OpenSSH 7.0 + +Autres options: + +-o crée un clé privée au nouveau format OpenSSH (au lieu du format PEM plus compatible). Le nouveau format est plus résistant au brut-force mais n'est pas compatible avec OpenSSH pré 6.5. Les clés ed25519 sont toujours au nouveau format. + + + +### Copier la clé publique sur le serveur: + +Copiez la clé publique *(id_rsa.pub*) sur le serveur NAS dans le fichier “*authorized_keys*” dans le répertoire `$HOME/.ssh` de l'utilisateur. + +```bash +$ cat ~/.ssh/id_rsa.pub | ssh admin@192.168.0.8 'cat>> ~/.ssh/authorized_keys' +# si ssh n'est pas sur le port 22 +$ cat ~/.ssh/id_rsa.pub | ssh -p35148 admin@192.168.0.8 'cat>> ~/.ssh/authorized_keys' +``` + +ou + +```bash +$ ssh-copy-id -i ~/.ssh/id_rsa.pub admin@192.168.0.8 +# si ssh n'est pas sur le port 22 +$ ssh-copy-id -i ~/.ssh/id_rsa.pub admin@192.168.0.8 -p35148 +``` + +Pour les oneliners... + +```bash +ssh matthieu@monserveur.local 'mkdir -p ~/.ssh; chmod 0700 ~/.ssh; echo ' $(< ~/.ssh/ma_cle_perso.pub) ' >> ~/.ssh/authorized_keys ; chmod 0600 ~/.ssh/authorized_keys' +``` + +Sur le serveur, vérifier les autorisations: + +```bash +[server]$ chmod 700 ~/.ssh +[server]$ chmod 600 ~/.ssh/* +``` + + + +### Ajouter la passphrase à SSH-agent. + +Démarrer ssh-agent en arrière-plan: + +```bash +$ eval "$(ssh-agent -s)" +Agent pid 2876 +``` + +Ajouter la clé à ssh-agent: + +```bash +$ ssh-add -K ~/.ssh/id_rsa +Enter passphrase for /Users/bruno/.ssh/id_rsa: +Identity added: /Users/bruno/.ssh/id_rsa (/Users/bruno/.ssh/id_rsa) +``` + +Si on utilise une passphrase avec OSX 10.12.2+, il faut ajouter à `~/.ssh/config` + +```bash +Host * + # la passphrase de la clé privée est stockée dans la keychain de macOS + AddKeysToAgent yes + # ssh-agent décrypte la clé privée en mémoire + UseKeychain yes + IdentityFile ~/.ssh/id_rsa +``` + +La passphrase est stockée durablement dans la keychain, on n’a plus besoin de la rentrer à chaque session. + + + +### SSH Config + +Le fichier *config* se trouve dans `~/.ssh/` + +Il permet de configurer et de faciliter les connections ssh pour chaque serveur. + +```bash +Host * + AddKeysToAgent yes + UseKeychain yes + +#SCE_ICON:linux +Host dsm414 + User bruno + HostName 192.168.1.8 + Port 42666 + IdentityFile ~/.ssh/id_ed25519 +``` + +On se connecte directement au serveur avec: + +```bash +$ ssh dsm414 +``` + + + +### Se connecter à la machine distante sans mot-de-passe: + +```bash +$ ssh bruno@xxx.synology.me -p12345 +bruno@DS916:~ $ +``` + +Finalement, sur le serveur, on peut éditer le fichier `/etc/ssh/sshd_config` pour supprimer l'authentification par mot de passe (`PasswordAuthentication no`). A ne faire que si l'on a un accès physique au serveur. + + + +### Plus: + +#### En cas de compromission de la clé privée, que faut-il faire ? + +- Regénérer une nouvelle paires de clés ; +- Redéployer la nouvelle clé publique sur tous les serveurs ; +- Révoquer la clé publique sur tous les serveurs où elle est présente, c’est-à-dire supprimer la ligne correspondant à votre clé publique dans le fichier ~/.ssh/authorized_keys et en même temps vérifier que d’autres clés publiques non légitimes n’ont pas été ajoutées ; +- Si la clé publique était présente sur un compte root, il va falloir faire un audit complet du serveur car il peut potentiellement avoir été compromis, bonne chance. + + + +#### Info sur une clé: + +```bash +$ ssh-keygen -l -f ~/.ssh/id_rsa.pub +2048 SHA256:a++yRIZiaqAx7hJkYdmgYBVeGJtbiFdNrFNrsr0Qi7k bruno@HackiMac.local (RSA) +``` + + + +#### Changer la passphrase: + +```bash +$ ssh-keygen -f id_rsa -p +Enter new passphrase (empty for no passphrase): +Enter same passphrase again: +Your identification has been saved with the new passphrase. +``` + +Cela modifie la clé privée, la clé publique ne change pas. + + + +#### Changer le format de clé: + +##### Convertir au nouveau format OpenSSH: + +```bash +$ ssh-keygen -f ~/.ssh/id_dsa -o -c -C "dsa@HackiMac.local" +Key now has no comment +The comment in your key file has been changed. +``` + +- -o: convertit la clé privée de PEM au nouveau format format OpenSSH. +- -c: changer le commentaire dans les clés privée et publique. +- -C: commentaire + +##### Convertir une clé publique au format PEM: + +```bash +$ ssh-keygen -f server.pub -e -m pem +``` + +#### Vérifier si ssh-agent est lancé (macOS): + +```bash +$ launchctl list | grep ssh-agent +2251 0 com.openssh.ssh-agent +``` + +#### Pour retrouver la passphrase: + +Trousseau d’accès -> Présentation -> Afficher les éléments invisibles - > Chercher *id_rsa* ou *ssh* + +Clic droit et copier le mot de passe dans le presse-papier (le mot de passe de session est demandé) + +#### Supprimer une entrée SSH du fichier known_hosts: + +En vous connectant en SSH à une machine que vous venez de réinstaller, vous risquez d’avoir le message suivant sur le poste client : + +```bash +$ ssh-keygen -R NomDuServeur + +$ ssh-keygen -f "/home//.ssh/known_hosts" -R +``` + +#### Regénérer les clés: + +Si on veut, pour une raison ou un autre, changer cette pair de clés, il faut : + +1. **Côté serveur** : éditer le fichier `/etc/ssh/sshd_config` pour vérifier ou remettre l'authentification par mot de passe est à yes : `PasswordAuthentication yes` +2. recharger ssh : `service ssh start` +3. supprimer le fichier `~/.ssh/authorized_keys` + +4. **Côté client** : supprimer les fichier `~/.ssh/id_rsa` et `~/.ssh/id_rsa.pub` puisqu'on va les régénérer en se créant une nouvelle paire de clés. + +#### Les clés d'hôtes: + +elles sont dans `/etc/sshd/ssh_host*` + +#### Copier sa clé publique dans le presse-papier: + +- ```bash + - Mac OS: pbcopy < ~/.ssh/id_rsa.pub + - Windows: clip < ~/.ssh/id_rsa.pub + - Linux: xclip -sel clip < ~/.ssh/id_rsa.pub + ``` + + + +[:fa-link: How to Set Up a Password-less SSH Login](http://osxdaily.com/2012/05/25/how-to-set-up-a-password-less-ssh-login/) + +[:fa-link: ssh-copy-id](http://www.qth.fr/tag/ssh-copy-id) + + + +[https://www.ssh.com/ssh/keygen/](https://www.ssh.com/ssh/keygen/) + +[https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically](https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically) + +[http://happygitwithr.com/ssh-keys.html](http://happygitwithr.com/ssh-keys.html) + +[https://help.github.com/articles/connecting-to-github-with-ssh/](https://help.github.com/articles/connecting-to-github-with-ssh/) \ No newline at end of file diff --git a/docs/macos/ssh/ssh.md b/docs/macos/ssh/ssh.md new file mode 100644 index 0000000..1cfe71d --- /dev/null +++ b/docs/macos/ssh/ssh.md @@ -0,0 +1,54 @@ +# ssh + + + +La configuration SSHD est stockée dans `/private/etc/ssh/sshd_config` + +Pour démarrer ou arrêter SSHD: + +```bash +sudo launchctl stop com.openssh.sshd + +sudo launchctl start com.openssh.sshd +``` + +[source](https://superuser.com/questions/364304/how-do-i-configure-ssh-on-os-x/364370#364370) + +```bash +# On crée un alias bash pour redémarrer sshd: +alias restartsshd='sudo launchctl stop com.openssh.ssh-agent; sudo launchctl start com.openssh.ssh-agent;' + +# Liste des services: +launchctl list | grep openssh +``` + + + +Changer le port ssh (22 par défaut) sur macOS: + +[https://apple.stackexchange.com/questions/335324/cannot-change-ssh-port-on-high-sierra](https://apple.stackexchange.com/questions/335324/cannot-change-ssh-port-on-high-sierra) + + + +**12.6.1 HTTPS vs SSH** + +If you think you have SSH set up correctly and yet you are still challenged for credentials, consider this: for the repo in question, have you possibly set up GitHub, probably called origin, as an HTTPS remote, instead of SSH? + +How to see the remote URL(s) associated with the current repo in the shell: + +git remote -v + +An SSH remote will look like this: git@github.com:USERNAME/REPOSITORY.git + +whereas an HTTPS remote will look like this: https://github.com/USERNAME/REPOSITORY.git + +You can toggle between these with git remote set-url: + +- + + + + + + + diff --git a/docs/macos/webserver/.DS_Store b/docs/macos/webserver/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/docs/macos/webserver/.DS_Store differ diff --git a/docs/macos/webserver/Xhprof.md b/docs/macos/webserver/Xhprof.md new file mode 100644 index 0000000..ef8d84a --- /dev/null +++ b/docs/macos/webserver/Xhprof.md @@ -0,0 +1,36 @@ +# Installer Xhprof pour PHP7 + + + +https://github.com/Yaoguais/phpng-xhprof (ne fonctionne pas) + +```bash +git clone git@github.com:Yaoguais/phpng-xhprof.git ./xhprof + +cd xhprof + +/usr/local/opt/php71/bin/phpize + +./configure --with-php-config=/usr/local/opt/php71/bin/php-config + +make clean && make && make test && sudo make install + +``` + + + +Installing shared extensions: /usr/local/Cellar/php71/7.1.1_12/lib/php/extensions/no-debug-non-zts-20160303/ + +http://danieldvork.in/xhprof-vs-xdebug-apache-osx/ + +https://blog.engineyard.com/2014/profiling-with-xhprof-xhgui-part-1 + +https://lamosty.com/2015/03/19/profiling-wordpress-with-xhprof-on-mac-os-x-10-10/ + + + +### Gui pour Xhpro* + +https://github.com/Tuurlijk/xhprof + +http://webadvent.org/2010/profiling-with-xhgui-by-paul-reinheimer.html \ No newline at end of file diff --git a/docs/macos/webserver/apache.md b/docs/macos/webserver/apache.md new file mode 100644 index 0000000..9e202c5 --- /dev/null +++ b/docs/macos/webserver/apache.md @@ -0,0 +1,321 @@ +# Installer Apache (homebrew) + +### Installation: + +```bash +$ sudo apachectl stop +$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null +$ brew install httpd +$ sudo brew services start httpd +``` + + + +### Arrêter / redémarrer Apache + +```bash +$ sudo apachectl start +$ sudo apachectl stop +$ sudo apachectl -k restart +$ sudo apachectl -k restart -e Debug -E /dev/stdout +``` + + + +### Log: + +```bash +$ tail -f /usr/local/var/log/httpd/error_log +``` + +```bash +$ multitail -s 2 /usr/local/var/log/httpd/error_log /usr/local/var/log/httpd/access_log +``` + + + +### Version: + +```bash +$ httpd -v +``` + + + +### Configuration: + +Ouvrir le fichier *httpd.conf*: + +```bash +$ open -e /usr/local/etc/httpd/httpd.conf +$ bbedit /usr/local/etc/httpd/extra/httpd-vhosts.conf +``` + + + +### Virtual Hosts: + +Editer le fichier *hosts*: + +```bash +$ sudo nano /etc/hosts + +127.0.0.1 silverbook.local +127.0.0.1 wordpress.silverbook.local +127.0.0.1 dev.silverbook.local +127.0.0.1 zenphoto.silverbook.local +127.0.0.1 phpmyadmin.silverbook.local +``` + +Editer le fichier *httpd-vhosts.conf*: + +```http + + DocumentRoot /Users/bruno/Sites/wordpress + ServerName wordpress.silverbook.local + CustomLog /usr/local/var/log/httpd/wordpress-access.log combined + ErrorLog /usr/local/var/log/httpd/wordpress-error.log + +``` + + + +### SSL: + +Ouvrir le fichier *httpd.conf* et dé-commenter les lignes suivantes: + +```http +LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so +... +LoadModule ssl_module lib/httpd/modules/mod_ssl.so +... +Include /usr/local/etc/httpd/extra/httpd-ssl.conf +``` + +Ouvrir le fichier *httpd-ssl.conf*: + +Remplacer le port 8443 par défaut par le port 443 et commenter 2 lignes. + +```http +Listen 443 +... + +\# General setup for the virtual host +\# DocumentRoot "/usr/local/var/www" +\# ServerName www.example.com:443 +\# ServerAdmin you@example.com + + +``` + +Ouvrir le fichier *httpd-vhosts.conf*: + +Rajouter ce bloc pour chaque Virtual Host. + +```http + + DocumentRoot "/Users/bruno/Sites" + ServerName silverbook.local + SSLEngine on + SSLCertificateFile "/usr/local/etc/httpd/server.crt" + SSLCertificateKeyFile "/usr/local/etc/httpd/server.key" + +``` + + + +### Générer un certificat auto-signé: + +Générer la clé et le certificat (*Common Name* doit correspondre à *ServerName* du *https-vhosts.conf*) + +```bash +$ cd /usr/local/etc/httpd +$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt +``` + +Vérifier la configuration Apache et relancer le serveur: + +```bash +$ sudo apachectl configtest +$ sudo apachectl -k restart +``` + + + +### Messages d'erreur personnalisés: + +Dans un fichier .htaccess, ajouter: + +```html +ErrorDocument 404 /custom_404.html +ErrorDocument 500 /custom_50x.html +``` + + + +### Messages d'erreur personnalisés multilingues: + +Ouvrir le fichier *httpd-ssl.conf* et dé-commenter les lignes suivantes: + +```http +LoadModule include_module lib/httpd/modules/mod_include.so +LoadModule negotiation_module lib/httpd/modules/mod_negotiation.so + +Include /usr/local/etc/httpd/extra/httpd-multilang-errordoc.conf +``` + + + +### Voir si Apache tourne: + +```bash +$ ps -aef | grep httpd +0 23417 1 0 2:48PM ?? 0:00.06 /usr/local/opt/httpd24/bin/httpd -D FOREGROUND +``` + + + +### M-à-J: + +directement depuis Homebrew + + + +### Installer phpmyadmin (Homebrew): + +```bash +$ brew install homebrew/php/phpmyadmin +``` + +Le fichier de configuration se trouve là:`/usr/local/etc/phpmyadmin.config.inc.php` + +Ajouter le bloc qui suit dans le **httpd.conf** + +```http + Alias /phpmyadmin /usr/local/share/phpmyadmin + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + + Require all granted + + + Order allow,deny + Allow from all + + +``` + + + +### Message d’erreur personnalisé: + +[:fa-link: https://httpd.apache.org/docs/2.4/fr/custom-error.html](https://httpd.apache.org/docs/2.4/fr/custom-error.html) + + + +### \# macOS - homebrew: + +***MacOS:*** + +``` +/usr/sbin/httpd-wrapper + +/System/Library/LaunchDaemons/org.apache.httpd.plist + +/Library/WebServer/Documents/index.html + +/private/etc/apache2/httpd.conf + +/private/etc/apache2/extra/httpd-vhosts.conf +``` + +***Homebrew:*** + +``` +/usr/local/opt/httpd/bin/httpd + +/Library/LaunchDaemons/homebrew.mxcl.httpd.plist + +/usr/local/var/www/index.html -> /Users/bruno/Sites + +/usr/local/etc/httpd/httpd.conf + +/usr/local/etc/httpd/extra/httpd-vhosts.conf +``` + + + +### Arrêt brutal de macOS: + +Il se peut qu'au redémarrage, Apache ne fonctionne plus. + +Regarder error_log: + +`` +`` +`` + +Puis arrêter et redémarrer Apache: + +```bash +$ sudo apachectl stop +$ sudo apachectl start +``` + + + +### Nouvelle version de Python: + +Apache ne fonctionne plus. Regarder error_log: + +`Fatal Python error: Py_Initialize: unable to load the file system codec` +`ModuleNotFoundError: No module named 'encodings'` + +Dans `https.conf` commencer par vérifier la version de Python dans la ligne suivante. Si elle est correcte, commenter la ligne: + +`WSGIPythonHome "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6"` + +Arrêter et redémarrer Apache. + +Si cela refonctionne, désinstaller et réinstaller mod_wsgi avec pip. + +```bash +$ pip3 list --format=columns +Package Version +------ +... +mod-wsgi 4.6.4 +... + +$ pip uninstall mod-wsgi +Uninstalling mod-wsgi-4.6.4: + Would remove: + /usr/local/bin/mod_wsgi-express + /usr/local/lib/python3.6/site-packages/mod_wsgi-4.6.4.dist-info/* + /usr/local/lib/python3.6/site-packages/mod_wsgi/* +Proceed (y/n)? y + Successfully uninstalled mod-wsgi-4.6.4 + +$ pip install mod-wsgi +Collecting mod-wsgi + Downloading https://files.pythonhosted.org/packages/9e/37/dd336068ece37c43957aa337f25c59a9a6afa98086e5507908a2d21ab807/mod_wsgi-4.6.4.tar.gz (2.6MB) + 100% |████████████████████████████████| 2.6MB 1.6MB/s +Building wheels for collected packages: mod-wsgi + Running setup.py bdist_wheel for mod-wsgi ... done + Stored in directory: /Users/bruno/Library/Caches/pip/wheels/2d/73/68/9dcbbd0147b3fde4686263a31324ea2372e42f7cefa2f7d181 +Successfully built mod-wsgi +Installing collected packages: mod-wsgi +Successfully installed mod-wsgi-4.6.4 + +$ sudo apachectl stop +$ sudo apachectl start +``` + + + +### Liens: + +[:fa-link: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions](https://getgrav.org/blog/macos-sierra-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/) \ No newline at end of file diff --git a/docs/macos/webserver/composer.md b/docs/macos/webserver/composer.md new file mode 100644 index 0000000..498ec9b --- /dev/null +++ b/docs/macos/webserver/composer.md @@ -0,0 +1,95 @@ +# Composer: + + + +### Composer s'installe avec Homebrew : + +(nécessite php avec l'extension phar) + +```bash +$ brew install composer + +$ php composer --version +Composer version 1.6.3 2018-01-31 16:28:17 +``` + +Fichier config:`~/.composer/config.json` + + + +### Pour installer une application: + +on se positionne dans son dossier où l'on trouve 2 fichiers: + +- composer.json +- composer.lock + +```bash +$ composer install + +# Sur DSM 6 +$ composer.phar install +``` + + + +Si erreur, mettre à jour: + +```bash +Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. +Your requirements could not be resolved to an installable set of packages. + + Problem 1 + - Installation request for friendsofphp/php-cs-fixer v2.2.6 -> satisfiable by friendsofphp/php-cs-fixer[v2.2.6]. + - friendsofphp/php-cs-fixer v2.2.6 requires php ^5.3.6 || >=7.0 <7.2 -> your PHP version (7.2.3) does not satisfy that requirement. +``` + + + +### Pour mettre à jour: + +```bash +$ composer update +Loading composer repositories with package information +Updating dependencies (including require-dev) +Package operations: 62 installs, 0 updates, 0 removals + +- Installing symfony/process (v4.0.6): Downloading (100%) +- Installing klaussilveira/gitter (0.2.0): Downloading (100%) + +### + +Writing lock file +Generating autoload files +``` + +Juste pour tester, aucune modification n'est faite: + +```bash +$ composer update --dry-run --profile --verbose +``` + +### Liste des commandes + +```bash +$ composer list +``` + +### Aide: + +```bash +$ composer —help +``` + +### Affiche ce qui a été installé: + +```bash +$ composer show +``` + + + +https://coderwall.com/p/ma_cuq/using-composer-to-manage-global-packages + +https://akrabat.com/global-installation-of-php-tools-with-composer/ + diff --git a/docs/macos/webserver/errors_apache.md b/docs/macos/webserver/errors_apache.md new file mode 100644 index 0000000..c9d2c00 --- /dev/null +++ b/docs/macos/webserver/errors_apache.md @@ -0,0 +1,18 @@ +# Erreurs Apache + + + +```bash +[Thu Apr 26 07:59:22.057052 2018][wsgi:warn] [pid 10412] (2)No such file or directory: mod_wsgi (pid=10412): Unable to stat Python home /usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path. +Fatal Python error: Py_Initialize: unable to load the file system codec +ModuleNotFoundError: No module named 'encodings' + +Current thread 0x00007fff98297380 (most recent call first): +[Thu Apr 26 07:59:23.055853 2018][core:notice] [pid 94] AH00052: child pid 10412 exit signal Abort trap (6) +[Thu Apr 26 07:59:23.059385 2018][wsgi:warn] [pid 10415] (2)No such file or directory: mod_wsgi (pid=10415): Unable to stat Python home /usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path. +[Thu Apr 26 07:59:23.059259 2018][wsgi:warn] [pid 10414] (2)No such file or directory: mod_wsgi (pid=10414): Unable to stat Python home /usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path. +Fatal Python error: Py_Initialize: unable to load the file system codec +Fatal Python error: Py_Initialize: unable to load the file system codec +ModuleNotFoundError: ModuleNotFoundError: No module named 'encodings'No module named 'encodings' +``` + diff --git a/docs/macos/webserver/index.md b/docs/macos/webserver/index.md new file mode 100644 index 0000000..0dd88d6 --- /dev/null +++ b/docs/macos/webserver/index.md @@ -0,0 +1,18 @@ +# WebServer + + + +[Apache](apache.md) + +[composer](composer.md) + +[PHP](php.md) + +[PHP 7.2](php72) + +[MySQL](mysql) + +[mongodb](mongodb) + +[Xhprof](Xhprof.md) + diff --git a/docs/macos/webserver/mongodb.md b/docs/macos/webserver/mongodb.md new file mode 100644 index 0000000..bb1cc8b --- /dev/null +++ b/docs/macos/webserver/mongodb.md @@ -0,0 +1,55 @@ +# Installer mongodb + + + +http://pecl.php.net/package/mongodb (v1.2.5 le 04/03/2017) + +mongo db nécessite openssl version > 1.0 + + + +How to build software outside Homebrew with Homebrew keg-only dependencies + +http://docs.brew.sh/How-to-build-software-outside-Homebrew-with-Homebrew-keg-only-dependencies.html + +```bash +export PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig + +/usr/local/opt/php71/bin/phpize + +./configure --with-php-config=/usr/local/opt/php71/bin/php-config CFLAGS=-I$(brew --prefix)/opt/openssl/include LDFLAGS=-L$(brew --prefix)/opt/openssl/lib + +make +sudo make install +``` + + + +Sinon avec Homebrew + +```bash +$ brew tap homebrew/php + +$ brew install phpxx-mongodb +``` + +Pour démarrer mongodb: + +```bash +$ brew services start mongodb +``` + +Then access the shell by: `mongo` + +Stopper la base: + +```bash +$ brew services stop mongodb +``` + +Plus d'options: + +```bash +$ brew info mongodb +``` + diff --git a/docs/macos/webserver/mysql.md b/docs/macos/webserver/mysql.md new file mode 100644 index 0000000..c587e27 --- /dev/null +++ b/docs/macos/webserver/mysql.md @@ -0,0 +1,79 @@ +# Installer mysql + +### Installation: + +```bash +$ brew update +$ brew install mariadb +$ brew services start mariadb +``` + +`/usr/local/Cellar/mariadb/10.2.11` + +### Arrêter MySQL: + +```bash +$ brew services stop mariadb +``` + +### Démarrer MySQL: + +```bash +$ brew services start mariadb +ou +$ mysql.server start +``` + +### Fix the 2002 MySQL Socket error: + +```bash +$ sudo mkdir /var/mysql +$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock +``` + +### Version: + +```bash +$ mysql -v -u root -p +``` + +### Après une m-à-j: + +arrêter puis démarrer + +### Erreurs: + +```bash +$ mysql -v -u root -p +mysql: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2 "No such file or directory") +Fatal error in defaults handling. Program aborted +``` + +Le répertoire `/usr/local/etc/my.cnf.d` n'existe plus, il faut le recréer et y créer un fichier: + +```bash +$ mkdir /usr/local/etc/my.cnf.d +$ touch wont_prune.txt +``` + +### Bases: + +Les bases sont stockées ici: `/usr/local/var/mysql` + +### Liens: + +[:fa-link: https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/ ](https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/) + +[:fa-link: https://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/ ](https://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/) + +[:fa-link: http://apple.stackexchange.com/questions/255671/error-mysql-server-pid-file-could-not-be-found](http://apple.stackexchange.com/questions/255671/error-mysql-server-pid-file-could-not-be-found) + + + +### Package MySQL + +[:fa-link: Télécharger depuis mysql.com](http://dev.mysql.com/downloads/mysql/) + +[:fa-link: Installation](https://dev.mysql.com/doc/refman/5.7/en/osx-installation.html) + +### \ No newline at end of file diff --git a/docs/macos/webserver/php.md b/docs/macos/webserver/php.md new file mode 100644 index 0000000..44bc9c7 --- /dev/null +++ b/docs/macos/webserver/php.md @@ -0,0 +1,93 @@ +# ls -Installer PHP (homebrew) + +### Installation: + +```bash +$ brew tap homebrew/php +$ brew update +$ brew install php71 --with-httpd +``` + + + +### Configurer PHP: + +```bash +$ bbedit /usr/local/etc/php/7.1/php.ini +``` + + + +### Modifier le httpd.conf: + +```http +httpd.conf: +#LoadModule php7_module /usr/local/Cellar/php71/7.1.11_22/libexec/apache2/libphp7.so +LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so +``` + + + +### Version de PHP: + +```bash +$ php -v +``` + + + +### Changer de version: + +```bash +$ brew unlink php54 && brew link php53 +``` + +Erreur: Failed loading /usr/local/opt/php71-opcache/opcache.so: dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): Symbol not found: *compiler*globals ⇒ + +```bash +$ brew reinstall php71-opcache --build-from-source +$ brew reinstall php71-apcu --build-from-source +$ brew reinstall php71-xdebug --build-from-source +$ brew reinstall php71-yaml --build-from-source +``` + + + +## Extensions: + +### Liste des extensions (Homebrew): + +```bash +$ brew search php71 +``` + + + +### Installer l'extension Tideways: + +[:fa-link: https://tideways.io/profiler/docs/setup/installation#macos-homebrew](https://tideways.io/profiler/docs/setup/installation#macos-homebrew) + +```bash +$ brew tap tideways/homebrew-profiler +$ brew install tideways-daemon-tideways +``` + + + +Puis ajouter dans le php.ini + +`extension=/usr/local/opt/php71/lib/php/extensions/no-debug-non-zts-20160303/tideways.so` + +Idem pour mongodb + +`extension=/usr/local/opt/php71/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so` + + + +### Liens: + +[:fa-link: PHP (osx)](https://php-osx.liip.ch/) (package PHP) + +[Installer Xhprof pour PHP7](Xhprof.md) + +[Installer mongodb](mongodb.md) \ No newline at end of file diff --git a/docs/macos/webserver/php72.md b/docs/macos/webserver/php72.md new file mode 100644 index 0000000..cac1f3b --- /dev/null +++ b/docs/macos/webserver/php72.md @@ -0,0 +1,25 @@ +Installer PHP 7.2 (Homebrew) + + + +Désintaller PHP + +$ brew uninstall --force php72 + + + +Installer PHP 7.2 + +$ brew install php72 --with-httpd --with-webp + + + +Infos sur PHP 7.2 + +$ brew info php72 +homebrew/php/php72: stable 7.2.0 (bottled), HEAD +PHP Version 7.2 + + + +$ brew upgrade php72-xdebug \ No newline at end of file diff --git a/docs/macos/youhavemail.md b/docs/macos/youhavemail.md new file mode 100644 index 0000000..a66040f --- /dev/null +++ b/docs/macos/youhavemail.md @@ -0,0 +1,54 @@ +# You have mail. + + + +``` +Last login: Thu Oct 26 06:25:34 on ttys000 +You have mail. +bruno@SilverBook:~$ mail + +Mail version 8.1 6/6/93. Type ? for help. + +"/var/mail/bruno": 1 message 1 new + +\>N 1 MAILER-DAEMON@Silver Mon Oct 2 16:43 91/3372 "Undelivered Mail Returned to Sender" + +? q +Held 1 message in /var/mail/bruno +You have mail in /var/mail/bruno +``` + + + +### Pour effacer les messages: + +**Solution 1** + +Taper d 1 (delete) pour supprimer le message + +**Solution 2** + +```bash +bruno@SilverBook:~$ cd /var/mail/ + +total 8 + +drwxrwxr-x 3 root mail 102 2 oct 16:43 . +drwxr-xr-x 26 root wheel 884 25 jul 15:54 .. +-rw------- 1 bruno mail 3382 27 oct 07:41 bruno + +bruno@SilverBook:/var/mail$ cd bruno + +-bash: cd: bruno: Not a directory + +total 8 + +drwxrwxr-x 3 root mail 102 2 oct 16:43 . +drwxr-xr-x 26 root wheel 884 25 jul 15:54 .. +-rw------- 1 bruno mail 3382 27 oct 07:41 bruno + +bruno@SilverBook:/var/mail$ > /var/mail/bruno + +bruno@SilverBook:/var/mail$ +``` + diff --git a/docs/mkdocs.md b/docs/mkdocs.md new file mode 100644 index 0000000..9f0f721 --- /dev/null +++ b/docs/mkdocs.md @@ -0,0 +1,151 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](http://mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs help` - Print this help message. + +## Project layout + +```bash +mkdocs.yml # The configuration file. +docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. +``` + + + +## Créer un nouveau projet de docs: + +```bash +bruno@SilverBook:~$ mkdocs new project + +INFO - Creating project directory: project + +INFO - Writing config file: project/mkdocs.yml + +INFO - Writing initial docs: project/docs/index.md + +bruno@SilverBook:~$ cd project + +total 8 +drwxr-xr-x 4 bruno staff 128 16 déc 20:48 . +drwxr-xr-x@ 70 bruno staff 2240 16 déc 20:48 .. +drwxr-xr-x 3 bruno staff 96 16 déc 20:48 docs +-rw-r--r-- 1 bruno staff 19 16 déc 20:48 mkdocs.yml + + +``` + + + +## Servir le projet: + +```bash +bruno@SilverBook:~/project$ mkdocs serve + +INFO - Building documentation... + +INFO - Cleaning site directory + +[I 171216 20:54:40 server:283] Serving on http://127.0.0.1:8000 +[I 171216 20:54:40 handlers:60] Start watching changes +[I 171216 20:54:40 handlers:62] Start detecting changes +[I 171216 20:55:00 handlers:133] Browser Connected: http://127.0.0.1:8000/ +[I 171216 20:55:41 handlers:133] Browser Connected: http://127.0.0.1:8000/ +``` + + + +## Copier les docs sur le serveur + +```bash +$ cd /Users/bruno/project + +$ ./build_and_upload.sh +``` + + + +/build_and_upload.sh + +```bash +# !/bin/bash + +cd /Users/bruno/project +mkdocs build +scp -P42666 -r ./central_docs bruno@192.168.xxx.xxx:/volume1/web +``` + + + +## Font Awesome icons: + +:fa-link: [http://bwmarrin.github.io/MkDocsPlus/](http://bwmarrin.github.io/MkDocsPlus/) + +[:fa-link: http://fontawesome.io/icons/](http://fontawesome.io/icons/) + + + +```html +:fa-link: +``` + +:fa-link: + + +```html + +``` + + + + + +```html + +``` + + + + + +```html + +``` + + + + + +## Themes: + +### Installer un thème: + +```bash +$ pip install --user mkdocs-cinder +``` + + + +### Mettre à jour un thème: + +```bash +$ pip install --user --upgrade mkdocs-material +``` + + + +[:fa-link: MkDocs-Themes](https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes) + +[:fa-link: Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) + +[:fa-link: MkDocs+](http://bwmarrin.github.io/MkDocsPlus/) + + + diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 0000000..885b384 --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.6.1 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.6.1');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.1') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/docs/stylesheets/fontawesome-all.css b/docs/stylesheets/fontawesome-all.css new file mode 100644 index 0000000..f4a9391 --- /dev/null +++ b/docs/stylesheets/fontawesome-all.css @@ -0,0 +1,2603 @@ +/*! + * Font Awesome Free 5.0.2 by @fontawesome - http://fontawesome.com + * License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa, +.fas, +.far, +.fal, +.fab { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; } + +.fa-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -.0667em; } + +.fa-xs { + font-size: .75em; } + +.fa-sm { + font-size: .875em; } + +.fa-1x { + font-size: 1em; } + +.fa-2x { + font-size: 2em; } + +.fa-3x { + font-size: 3em; } + +.fa-4x { + font-size: 4em; } + +.fa-5x { + font-size: 5em; } + +.fa-6x { + font-size: 6em; } + +.fa-7x { + font-size: 7em; } + +.fa-8x { + font-size: 8em; } + +.fa-9x { + font-size: 9em; } + +.fa-10x { + font-size: 10em; } + +.fa-fw { + text-align: center; + width: 1.25em; } + +.fa-ul { + list-style-type: none; + margin-left: 2.5em; + padding-left: 0; } + .fa-ul > li { + position: relative; } + +.fa-li { + left: -2em; + position: absolute; + text-align: center; + width: 2em; + line-height: inherit; } + +.fa-border { + border: solid 0.08em #eee; + border-radius: .1em; + padding: .2em .25em .15em; } + +.fa-pull-left { + float: left; } + +.fa-pull-right { + float: right; } + +.fa.fa-pull-left, +.fas.fa-pull-left, +.far.fa-pull-left, +.fal.fa-pull-left, +.fab.fa-pull-left { + margin-right: .3em; } + +.fa.fa-pull-right, +.fas.fa-pull-right, +.far.fa-pull-right, +.fal.fa-pull-right, +.fab.fa-pull-right { + margin-left: .3em; } + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; } + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); } + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); } + +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); } + +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + transform: rotate(270deg); } + +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); } + +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + transform: scale(1, -1); } + +.fa-flip-horizontal.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); } + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + -webkit-filter: none; + filter: none; } + +.fa-stack { + display: inline-block; + height: 2em; + line-height: 2em; + position: relative; + vertical-align: middle; + width: 2em; } + +.fa-stack-1x, +.fa-stack-2x { + left: 0; + position: absolute; + text-align: center; + width: 100%; } + +.fa-stack-1x { + line-height: inherit; } + +.fa-stack-2x { + font-size: 2em; } + +.fa-inverse { + color: #fff; } + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen +readers do not read off random characters that represent icons */ +.fa-500px:before { + content: "\f26e"; } + +.fa-accessible-icon:before { + content: "\f368"; } + +.fa-accusoft:before { + content: "\f369"; } + +.fa-address-book:before { + content: "\f2b9"; } + +.fa-address-card:before { + content: "\f2bb"; } + +.fa-adjust:before { + content: "\f042"; } + +.fa-adn:before { + content: "\f170"; } + +.fa-adversal:before { + content: "\f36a"; } + +.fa-affiliatetheme:before { + content: "\f36b"; } + +.fa-algolia:before { + content: "\f36c"; } + +.fa-align-center:before { + content: "\f037"; } + +.fa-align-justify:before { + content: "\f039"; } + +.fa-align-left:before { + content: "\f036"; } + +.fa-align-right:before { + content: "\f038"; } + +.fa-amazon:before { + content: "\f270"; } + +.fa-amazon-pay:before { + content: "\f42c"; } + +.fa-ambulance:before { + content: "\f0f9"; } + +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; } + +.fa-amilia:before { + content: "\f36d"; } + +.fa-anchor:before { + content: "\f13d"; } + +.fa-android:before { + content: "\f17b"; } + +.fa-angellist:before { + content: "\f209"; } + +.fa-angle-double-down:before { + content: "\f103"; } + +.fa-angle-double-left:before { + content: "\f100"; } + +.fa-angle-double-right:before { + content: "\f101"; } + +.fa-angle-double-up:before { + content: "\f102"; } + +.fa-angle-down:before { + content: "\f107"; } + +.fa-angle-left:before { + content: "\f104"; } + +.fa-angle-right:before { + content: "\f105"; } + +.fa-angle-up:before { + content: "\f106"; } + +.fa-angrycreative:before { + content: "\f36e"; } + +.fa-angular:before { + content: "\f420"; } + +.fa-app-store:before { + content: "\f36f"; } + +.fa-app-store-ios:before { + content: "\f370"; } + +.fa-apper:before { + content: "\f371"; } + +.fa-apple:before { + content: "\f179"; } + +.fa-apple-pay:before { + content: "\f415"; } + +.fa-archive:before { + content: "\f187"; } + +.fa-arrow-alt-circle-down:before { + content: "\f358"; } + +.fa-arrow-alt-circle-left:before { + content: "\f359"; } + +.fa-arrow-alt-circle-right:before { + content: "\f35a"; } + +.fa-arrow-alt-circle-up:before { + content: "\f35b"; } + +.fa-arrow-circle-down:before { + content: "\f0ab"; } + +.fa-arrow-circle-left:before { + content: "\f0a8"; } + +.fa-arrow-circle-right:before { + content: "\f0a9"; } + +.fa-arrow-circle-up:before { + content: "\f0aa"; } + +.fa-arrow-down:before { + content: "\f063"; } + +.fa-arrow-left:before { + content: "\f060"; } + +.fa-arrow-right:before { + content: "\f061"; } + +.fa-arrow-up:before { + content: "\f062"; } + +.fa-arrows-alt:before { + content: "\f0b2"; } + +.fa-arrows-alt-h:before { + content: "\f337"; } + +.fa-arrows-alt-v:before { + content: "\f338"; } + +.fa-assistive-listening-systems:before { + content: "\f2a2"; } + +.fa-asterisk:before { + content: "\f069"; } + +.fa-asymmetrik:before { + content: "\f372"; } + +.fa-at:before { + content: "\f1fa"; } + +.fa-audible:before { + content: "\f373"; } + +.fa-audio-description:before { + content: "\f29e"; } + +.fa-autoprefixer:before { + content: "\f41c"; } + +.fa-avianex:before { + content: "\f374"; } + +.fa-aviato:before { + content: "\f421"; } + +.fa-aws:before { + content: "\f375"; } + +.fa-backward:before { + content: "\f04a"; } + +.fa-balance-scale:before { + content: "\f24e"; } + +.fa-ban:before { + content: "\f05e"; } + +.fa-bandcamp:before { + content: "\f2d5"; } + +.fa-barcode:before { + content: "\f02a"; } + +.fa-bars:before { + content: "\f0c9"; } + +.fa-bath:before { + content: "\f2cd"; } + +.fa-battery-empty:before { + content: "\f244"; } + +.fa-battery-full:before { + content: "\f240"; } + +.fa-battery-half:before { + content: "\f242"; } + +.fa-battery-quarter:before { + content: "\f243"; } + +.fa-battery-three-quarters:before { + content: "\f241"; } + +.fa-bed:before { + content: "\f236"; } + +.fa-beer:before { + content: "\f0fc"; } + +.fa-behance:before { + content: "\f1b4"; } + +.fa-behance-square:before { + content: "\f1b5"; } + +.fa-bell:before { + content: "\f0f3"; } + +.fa-bell-slash:before { + content: "\f1f6"; } + +.fa-bicycle:before { + content: "\f206"; } + +.fa-bimobject:before { + content: "\f378"; } + +.fa-binoculars:before { + content: "\f1e5"; } + +.fa-birthday-cake:before { + content: "\f1fd"; } + +.fa-bitbucket:before { + content: "\f171"; } + +.fa-bitcoin:before { + content: "\f379"; } + +.fa-bity:before { + content: "\f37a"; } + +.fa-black-tie:before { + content: "\f27e"; } + +.fa-blackberry:before { + content: "\f37b"; } + +.fa-blind:before { + content: "\f29d"; } + +.fa-blogger:before { + content: "\f37c"; } + +.fa-blogger-b:before { + content: "\f37d"; } + +.fa-bluetooth:before { + content: "\f293"; } + +.fa-bluetooth-b:before { + content: "\f294"; } + +.fa-bold:before { + content: "\f032"; } + +.fa-bolt:before { + content: "\f0e7"; } + +.fa-bomb:before { + content: "\f1e2"; } + +.fa-book:before { + content: "\f02d"; } + +.fa-bookmark:before { + content: "\f02e"; } + +.fa-braille:before { + content: "\f2a1"; } + +.fa-briefcase:before { + content: "\f0b1"; } + +.fa-btc:before { + content: "\f15a"; } + +.fa-bug:before { + content: "\f188"; } + +.fa-building:before { + content: "\f1ad"; } + +.fa-bullhorn:before { + content: "\f0a1"; } + +.fa-bullseye:before { + content: "\f140"; } + +.fa-buromobelexperte:before { + content: "\f37f"; } + +.fa-bus:before { + content: "\f207"; } + +.fa-buysellads:before { + content: "\f20d"; } + +.fa-calculator:before { + content: "\f1ec"; } + +.fa-calendar:before { + content: "\f133"; } + +.fa-calendar-alt:before { + content: "\f073"; } + +.fa-calendar-check:before { + content: "\f274"; } + +.fa-calendar-minus:before { + content: "\f272"; } + +.fa-calendar-plus:before { + content: "\f271"; } + +.fa-calendar-times:before { + content: "\f273"; } + +.fa-camera:before { + content: "\f030"; } + +.fa-camera-retro:before { + content: "\f083"; } + +.fa-car:before { + content: "\f1b9"; } + +.fa-caret-down:before { + content: "\f0d7"; } + +.fa-caret-left:before { + content: "\f0d9"; } + +.fa-caret-right:before { + content: "\f0da"; } + +.fa-caret-square-down:before { + content: "\f150"; } + +.fa-caret-square-left:before { + content: "\f191"; } + +.fa-caret-square-right:before { + content: "\f152"; } + +.fa-caret-square-up:before { + content: "\f151"; } + +.fa-caret-up:before { + content: "\f0d8"; } + +.fa-cart-arrow-down:before { + content: "\f218"; } + +.fa-cart-plus:before { + content: "\f217"; } + +.fa-cc-amazon-pay:before { + content: "\f42d"; } + +.fa-cc-amex:before { + content: "\f1f3"; } + +.fa-cc-apple-pay:before { + content: "\f416"; } + +.fa-cc-diners-club:before { + content: "\f24c"; } + +.fa-cc-discover:before { + content: "\f1f2"; } + +.fa-cc-jcb:before { + content: "\f24b"; } + +.fa-cc-mastercard:before { + content: "\f1f1"; } + +.fa-cc-paypal:before { + content: "\f1f4"; } + +.fa-cc-stripe:before { + content: "\f1f5"; } + +.fa-cc-visa:before { + content: "\f1f0"; } + +.fa-centercode:before { + content: "\f380"; } + +.fa-certificate:before { + content: "\f0a3"; } + +.fa-chart-area:before { + content: "\f1fe"; } + +.fa-chart-bar:before { + content: "\f080"; } + +.fa-chart-line:before { + content: "\f201"; } + +.fa-chart-pie:before { + content: "\f200"; } + +.fa-check:before { + content: "\f00c"; } + +.fa-check-circle:before { + content: "\f058"; } + +.fa-check-square:before { + content: "\f14a"; } + +.fa-chevron-circle-down:before { + content: "\f13a"; } + +.fa-chevron-circle-left:before { + content: "\f137"; } + +.fa-chevron-circle-right:before { + content: "\f138"; } + +.fa-chevron-circle-up:before { + content: "\f139"; } + +.fa-chevron-down:before { + content: "\f078"; } + +.fa-chevron-left:before { + content: "\f053"; } + +.fa-chevron-right:before { + content: "\f054"; } + +.fa-chevron-up:before { + content: "\f077"; } + +.fa-child:before { + content: "\f1ae"; } + +.fa-chrome:before { + content: "\f268"; } + +.fa-circle:before { + content: "\f111"; } + +.fa-circle-notch:before { + content: "\f1ce"; } + +.fa-clipboard:before { + content: "\f328"; } + +.fa-clock:before { + content: "\f017"; } + +.fa-clone:before { + content: "\f24d"; } + +.fa-closed-captioning:before { + content: "\f20a"; } + +.fa-cloud:before { + content: "\f0c2"; } + +.fa-cloud-download-alt:before { + content: "\f381"; } + +.fa-cloud-upload-alt:before { + content: "\f382"; } + +.fa-cloudscale:before { + content: "\f383"; } + +.fa-cloudsmith:before { + content: "\f384"; } + +.fa-cloudversify:before { + content: "\f385"; } + +.fa-code:before { + content: "\f121"; } + +.fa-code-branch:before { + content: "\f126"; } + +.fa-codepen:before { + content: "\f1cb"; } + +.fa-codiepie:before { + content: "\f284"; } + +.fa-coffee:before { + content: "\f0f4"; } + +.fa-cog:before { + content: "\f013"; } + +.fa-cogs:before { + content: "\f085"; } + +.fa-columns:before { + content: "\f0db"; } + +.fa-comment:before { + content: "\f075"; } + +.fa-comment-alt:before { + content: "\f27a"; } + +.fa-comments:before { + content: "\f086"; } + +.fa-compass:before { + content: "\f14e"; } + +.fa-compress:before { + content: "\f066"; } + +.fa-connectdevelop:before { + content: "\f20e"; } + +.fa-contao:before { + content: "\f26d"; } + +.fa-copy:before { + content: "\f0c5"; } + +.fa-copyright:before { + content: "\f1f9"; } + +.fa-cpanel:before { + content: "\f388"; } + +.fa-creative-commons:before { + content: "\f25e"; } + +.fa-credit-card:before { + content: "\f09d"; } + +.fa-crop:before { + content: "\f125"; } + +.fa-crosshairs:before { + content: "\f05b"; } + +.fa-css3:before { + content: "\f13c"; } + +.fa-css3-alt:before { + content: "\f38b"; } + +.fa-cube:before { + content: "\f1b2"; } + +.fa-cubes:before { + content: "\f1b3"; } + +.fa-cut:before { + content: "\f0c4"; } + +.fa-cuttlefish:before { + content: "\f38c"; } + +.fa-d-and-d:before { + content: "\f38d"; } + +.fa-dashcube:before { + content: "\f210"; } + +.fa-database:before { + content: "\f1c0"; } + +.fa-deaf:before { + content: "\f2a4"; } + +.fa-delicious:before { + content: "\f1a5"; } + +.fa-deploydog:before { + content: "\f38e"; } + +.fa-deskpro:before { + content: "\f38f"; } + +.fa-desktop:before { + content: "\f108"; } + +.fa-deviantart:before { + content: "\f1bd"; } + +.fa-digg:before { + content: "\f1a6"; } + +.fa-digital-ocean:before { + content: "\f391"; } + +.fa-discord:before { + content: "\f392"; } + +.fa-discourse:before { + content: "\f393"; } + +.fa-dochub:before { + content: "\f394"; } + +.fa-docker:before { + content: "\f395"; } + +.fa-dollar-sign:before { + content: "\f155"; } + +.fa-dot-circle:before { + content: "\f192"; } + +.fa-download:before { + content: "\f019"; } + +.fa-draft2digital:before { + content: "\f396"; } + +.fa-dribbble:before { + content: "\f17d"; } + +.fa-dribbble-square:before { + content: "\f397"; } + +.fa-dropbox:before { + content: "\f16b"; } + +.fa-drupal:before { + content: "\f1a9"; } + +.fa-dyalog:before { + content: "\f399"; } + +.fa-earlybirds:before { + content: "\f39a"; } + +.fa-edge:before { + content: "\f282"; } + +.fa-edit:before { + content: "\f044"; } + +.fa-eject:before { + content: "\f052"; } + +.fa-ellipsis-h:before { + content: "\f141"; } + +.fa-ellipsis-v:before { + content: "\f142"; } + +.fa-ember:before { + content: "\f423"; } + +.fa-empire:before { + content: "\f1d1"; } + +.fa-envelope:before { + content: "\f0e0"; } + +.fa-envelope-open:before { + content: "\f2b6"; } + +.fa-envelope-square:before { + content: "\f199"; } + +.fa-envira:before { + content: "\f299"; } + +.fa-eraser:before { + content: "\f12d"; } + +.fa-erlang:before { + content: "\f39d"; } + +.fa-ethereum:before { + content: "\f42e"; } + +.fa-etsy:before { + content: "\f2d7"; } + +.fa-euro-sign:before { + content: "\f153"; } + +.fa-exchange-alt:before { + content: "\f362"; } + +.fa-exclamation:before { + content: "\f12a"; } + +.fa-exclamation-circle:before { + content: "\f06a"; } + +.fa-exclamation-triangle:before { + content: "\f071"; } + +.fa-expand:before { + content: "\f065"; } + +.fa-expand-arrows-alt:before { + content: "\f31e"; } + +.fa-expeditedssl:before { + content: "\f23e"; } + +.fa-external-link-alt:before { + content: "\f35d"; } + +.fa-external-link-square-alt:before { + content: "\f360"; } + +.fa-eye:before { + content: "\f06e"; } + +.fa-eye-dropper:before { + content: "\f1fb"; } + +.fa-eye-slash:before { + content: "\f070"; } + +.fa-facebook:before { + content: "\f09a"; } + +.fa-facebook-f:before { + content: "\f39e"; } + +.fa-facebook-messenger:before { + content: "\f39f"; } + +.fa-facebook-square:before { + content: "\f082"; } + +.fa-fast-backward:before { + content: "\f049"; } + +.fa-fast-forward:before { + content: "\f050"; } + +.fa-fax:before { + content: "\f1ac"; } + +.fa-female:before { + content: "\f182"; } + +.fa-fighter-jet:before { + content: "\f0fb"; } + +.fa-file:before { + content: "\f15b"; } + +.fa-file-alt:before { + content: "\f15c"; } + +.fa-file-archive:before { + content: "\f1c6"; } + +.fa-file-audio:before { + content: "\f1c7"; } + +.fa-file-code:before { + content: "\f1c9"; } + +.fa-file-excel:before { + content: "\f1c3"; } + +.fa-file-image:before { + content: "\f1c5"; } + +.fa-file-pdf:before { + content: "\f1c1"; } + +.fa-file-powerpoint:before { + content: "\f1c4"; } + +.fa-file-video:before { + content: "\f1c8"; } + +.fa-file-word:before { + content: "\f1c2"; } + +.fa-film:before { + content: "\f008"; } + +.fa-filter:before { + content: "\f0b0"; } + +.fa-fire:before { + content: "\f06d"; } + +.fa-fire-extinguisher:before { + content: "\f134"; } + +.fa-firefox:before { + content: "\f269"; } + +.fa-first-order:before { + content: "\f2b0"; } + +.fa-firstdraft:before { + content: "\f3a1"; } + +.fa-flag:before { + content: "\f024"; } + +.fa-flag-checkered:before { + content: "\f11e"; } + +.fa-flask:before { + content: "\f0c3"; } + +.fa-flickr:before { + content: "\f16e"; } + +.fa-fly:before { + content: "\f417"; } + +.fa-folder:before { + content: "\f07b"; } + +.fa-folder-open:before { + content: "\f07c"; } + +.fa-font:before { + content: "\f031"; } + +.fa-font-awesome:before { + content: "\f2b4"; } + +.fa-font-awesome-alt:before { + content: "\f35c"; } + +.fa-font-awesome-flag:before { + content: "\f425"; } + +.fa-fonticons:before { + content: "\f280"; } + +.fa-fonticons-fi:before { + content: "\f3a2"; } + +.fa-fort-awesome:before { + content: "\f286"; } + +.fa-fort-awesome-alt:before { + content: "\f3a3"; } + +.fa-forumbee:before { + content: "\f211"; } + +.fa-forward:before { + content: "\f04e"; } + +.fa-foursquare:before { + content: "\f180"; } + +.fa-free-code-camp:before { + content: "\f2c5"; } + +.fa-freebsd:before { + content: "\f3a4"; } + +.fa-frown:before { + content: "\f119"; } + +.fa-futbol:before { + content: "\f1e3"; } + +.fa-gamepad:before { + content: "\f11b"; } + +.fa-gavel:before { + content: "\f0e3"; } + +.fa-gem:before { + content: "\f3a5"; } + +.fa-genderless:before { + content: "\f22d"; } + +.fa-get-pocket:before { + content: "\f265"; } + +.fa-gg:before { + content: "\f260"; } + +.fa-gg-circle:before { + content: "\f261"; } + +.fa-gift:before { + content: "\f06b"; } + +.fa-git:before { + content: "\f1d3"; } + +.fa-git-square:before { + content: "\f1d2"; } + +.fa-github:before { + content: "\f09b"; } + +.fa-github-alt:before { + content: "\f113"; } + +.fa-github-square:before { + content: "\f092"; } + +.fa-gitkraken:before { + content: "\f3a6"; } + +.fa-gitlab:before { + content: "\f296"; } + +.fa-gitter:before { + content: "\f426"; } + +.fa-glass-martini:before { + content: "\f000"; } + +.fa-glide:before { + content: "\f2a5"; } + +.fa-glide-g:before { + content: "\f2a6"; } + +.fa-globe:before { + content: "\f0ac"; } + +.fa-gofore:before { + content: "\f3a7"; } + +.fa-goodreads:before { + content: "\f3a8"; } + +.fa-goodreads-g:before { + content: "\f3a9"; } + +.fa-google:before { + content: "\f1a0"; } + +.fa-google-drive:before { + content: "\f3aa"; } + +.fa-google-play:before { + content: "\f3ab"; } + +.fa-google-plus:before { + content: "\f2b3"; } + +.fa-google-plus-g:before { + content: "\f0d5"; } + +.fa-google-plus-square:before { + content: "\f0d4"; } + +.fa-google-wallet:before { + content: "\f1ee"; } + +.fa-graduation-cap:before { + content: "\f19d"; } + +.fa-gratipay:before { + content: "\f184"; } + +.fa-grav:before { + content: "\f2d6"; } + +.fa-gripfire:before { + content: "\f3ac"; } + +.fa-grunt:before { + content: "\f3ad"; } + +.fa-gulp:before { + content: "\f3ae"; } + +.fa-h-square:before { + content: "\f0fd"; } + +.fa-hacker-news:before { + content: "\f1d4"; } + +.fa-hacker-news-square:before { + content: "\f3af"; } + +.fa-hand-lizard:before { + content: "\f258"; } + +.fa-hand-paper:before { + content: "\f256"; } + +.fa-hand-peace:before { + content: "\f25b"; } + +.fa-hand-point-down:before { + content: "\f0a7"; } + +.fa-hand-point-left:before { + content: "\f0a5"; } + +.fa-hand-point-right:before { + content: "\f0a4"; } + +.fa-hand-point-up:before { + content: "\f0a6"; } + +.fa-hand-pointer:before { + content: "\f25a"; } + +.fa-hand-rock:before { + content: "\f255"; } + +.fa-hand-scissors:before { + content: "\f257"; } + +.fa-hand-spock:before { + content: "\f259"; } + +.fa-handshake:before { + content: "\f2b5"; } + +.fa-hashtag:before { + content: "\f292"; } + +.fa-hdd:before { + content: "\f0a0"; } + +.fa-heading:before { + content: "\f1dc"; } + +.fa-headphones:before { + content: "\f025"; } + +.fa-heart:before { + content: "\f004"; } + +.fa-heartbeat:before { + content: "\f21e"; } + +.fa-hire-a-helper:before { + content: "\f3b0"; } + +.fa-history:before { + content: "\f1da"; } + +.fa-home:before { + content: "\f015"; } + +.fa-hooli:before { + content: "\f427"; } + +.fa-hospital:before { + content: "\f0f8"; } + +.fa-hotjar:before { + content: "\f3b1"; } + +.fa-hourglass:before { + content: "\f254"; } + +.fa-hourglass-end:before { + content: "\f253"; } + +.fa-hourglass-half:before { + content: "\f252"; } + +.fa-hourglass-start:before { + content: "\f251"; } + +.fa-houzz:before { + content: "\f27c"; } + +.fa-html5:before { + content: "\f13b"; } + +.fa-hubspot:before { + content: "\f3b2"; } + +.fa-i-cursor:before { + content: "\f246"; } + +.fa-id-badge:before { + content: "\f2c1"; } + +.fa-id-card:before { + content: "\f2c2"; } + +.fa-image:before { + content: "\f03e"; } + +.fa-images:before { + content: "\f302"; } + +.fa-imdb:before { + content: "\f2d8"; } + +.fa-inbox:before { + content: "\f01c"; } + +.fa-indent:before { + content: "\f03c"; } + +.fa-industry:before { + content: "\f275"; } + +.fa-info:before { + content: "\f129"; } + +.fa-info-circle:before { + content: "\f05a"; } + +.fa-instagram:before { + content: "\f16d"; } + +.fa-internet-explorer:before { + content: "\f26b"; } + +.fa-ioxhost:before { + content: "\f208"; } + +.fa-italic:before { + content: "\f033"; } + +.fa-itunes:before { + content: "\f3b4"; } + +.fa-itunes-note:before { + content: "\f3b5"; } + +.fa-jenkins:before { + content: "\f3b6"; } + +.fa-joget:before { + content: "\f3b7"; } + +.fa-joomla:before { + content: "\f1aa"; } + +.fa-js:before { + content: "\f3b8"; } + +.fa-js-square:before { + content: "\f3b9"; } + +.fa-jsfiddle:before { + content: "\f1cc"; } + +.fa-key:before { + content: "\f084"; } + +.fa-keyboard:before { + content: "\f11c"; } + +.fa-keycdn:before { + content: "\f3ba"; } + +.fa-kickstarter:before { + content: "\f3bb"; } + +.fa-kickstarter-k:before { + content: "\f3bc"; } + +.fa-korvue:before { + content: "\f42f"; } + +.fa-language:before { + content: "\f1ab"; } + +.fa-laptop:before { + content: "\f109"; } + +.fa-laravel:before { + content: "\f3bd"; } + +.fa-lastfm:before { + content: "\f202"; } + +.fa-lastfm-square:before { + content: "\f203"; } + +.fa-leaf:before { + content: "\f06c"; } + +.fa-leanpub:before { + content: "\f212"; } + +.fa-lemon:before { + content: "\f094"; } + +.fa-less:before { + content: "\f41d"; } + +.fa-level-down-alt:before { + content: "\f3be"; } + +.fa-level-up-alt:before { + content: "\f3bf"; } + +.fa-life-ring:before { + content: "\f1cd"; } + +.fa-lightbulb:before { + content: "\f0eb"; } + +.fa-line:before { + content: "\f3c0"; } + +.fa-link:before { + content: "\f0c1"; } + +.fa-linkedin:before { + content: "\f08c"; } + +.fa-linkedin-in:before { + content: "\f0e1"; } + +.fa-linode:before { + content: "\f2b8"; } + +.fa-linux:before { + content: "\f17c"; } + +.fa-lira-sign:before { + content: "\f195"; } + +.fa-list:before { + content: "\f03a"; } + +.fa-list-alt:before { + content: "\f022"; } + +.fa-list-ol:before { + content: "\f0cb"; } + +.fa-list-ul:before { + content: "\f0ca"; } + +.fa-location-arrow:before { + content: "\f124"; } + +.fa-lock:before { + content: "\f023"; } + +.fa-lock-open:before { + content: "\f3c1"; } + +.fa-long-arrow-alt-down:before { + content: "\f309"; } + +.fa-long-arrow-alt-left:before { + content: "\f30a"; } + +.fa-long-arrow-alt-right:before { + content: "\f30b"; } + +.fa-long-arrow-alt-up:before { + content: "\f30c"; } + +.fa-low-vision:before { + content: "\f2a8"; } + +.fa-lyft:before { + content: "\f3c3"; } + +.fa-magento:before { + content: "\f3c4"; } + +.fa-magic:before { + content: "\f0d0"; } + +.fa-magnet:before { + content: "\f076"; } + +.fa-male:before { + content: "\f183"; } + +.fa-map:before { + content: "\f279"; } + +.fa-map-marker:before { + content: "\f041"; } + +.fa-map-marker-alt:before { + content: "\f3c5"; } + +.fa-map-pin:before { + content: "\f276"; } + +.fa-map-signs:before { + content: "\f277"; } + +.fa-mars:before { + content: "\f222"; } + +.fa-mars-double:before { + content: "\f227"; } + +.fa-mars-stroke:before { + content: "\f229"; } + +.fa-mars-stroke-h:before { + content: "\f22b"; } + +.fa-mars-stroke-v:before { + content: "\f22a"; } + +.fa-maxcdn:before { + content: "\f136"; } + +.fa-medapps:before { + content: "\f3c6"; } + +.fa-medium:before { + content: "\f23a"; } + +.fa-medium-m:before { + content: "\f3c7"; } + +.fa-medkit:before { + content: "\f0fa"; } + +.fa-medrt:before { + content: "\f3c8"; } + +.fa-meetup:before { + content: "\f2e0"; } + +.fa-meh:before { + content: "\f11a"; } + +.fa-mercury:before { + content: "\f223"; } + +.fa-microchip:before { + content: "\f2db"; } + +.fa-microphone:before { + content: "\f130"; } + +.fa-microphone-slash:before { + content: "\f131"; } + +.fa-microsoft:before { + content: "\f3ca"; } + +.fa-minus:before { + content: "\f068"; } + +.fa-minus-circle:before { + content: "\f056"; } + +.fa-minus-square:before { + content: "\f146"; } + +.fa-mix:before { + content: "\f3cb"; } + +.fa-mixcloud:before { + content: "\f289"; } + +.fa-mizuni:before { + content: "\f3cc"; } + +.fa-mobile:before { + content: "\f10b"; } + +.fa-mobile-alt:before { + content: "\f3cd"; } + +.fa-modx:before { + content: "\f285"; } + +.fa-monero:before { + content: "\f3d0"; } + +.fa-money-bill-alt:before { + content: "\f3d1"; } + +.fa-moon:before { + content: "\f186"; } + +.fa-motorcycle:before { + content: "\f21c"; } + +.fa-mouse-pointer:before { + content: "\f245"; } + +.fa-music:before { + content: "\f001"; } + +.fa-napster:before { + content: "\f3d2"; } + +.fa-neuter:before { + content: "\f22c"; } + +.fa-newspaper:before { + content: "\f1ea"; } + +.fa-nintendo-switch:before { + content: "\f418"; } + +.fa-node:before { + content: "\f419"; } + +.fa-node-js:before { + content: "\f3d3"; } + +.fa-npm:before { + content: "\f3d4"; } + +.fa-ns8:before { + content: "\f3d5"; } + +.fa-nutritionix:before { + content: "\f3d6"; } + +.fa-object-group:before { + content: "\f247"; } + +.fa-object-ungroup:before { + content: "\f248"; } + +.fa-odnoklassniki:before { + content: "\f263"; } + +.fa-odnoklassniki-square:before { + content: "\f264"; } + +.fa-opencart:before { + content: "\f23d"; } + +.fa-openid:before { + content: "\f19b"; } + +.fa-opera:before { + content: "\f26a"; } + +.fa-optin-monster:before { + content: "\f23c"; } + +.fa-osi:before { + content: "\f41a"; } + +.fa-outdent:before { + content: "\f03b"; } + +.fa-page4:before { + content: "\f3d7"; } + +.fa-pagelines:before { + content: "\f18c"; } + +.fa-paint-brush:before { + content: "\f1fc"; } + +.fa-palfed:before { + content: "\f3d8"; } + +.fa-paper-plane:before { + content: "\f1d8"; } + +.fa-paperclip:before { + content: "\f0c6"; } + +.fa-paragraph:before { + content: "\f1dd"; } + +.fa-paste:before { + content: "\f0ea"; } + +.fa-patreon:before { + content: "\f3d9"; } + +.fa-pause:before { + content: "\f04c"; } + +.fa-pause-circle:before { + content: "\f28b"; } + +.fa-paw:before { + content: "\f1b0"; } + +.fa-paypal:before { + content: "\f1ed"; } + +.fa-pen-square:before { + content: "\f14b"; } + +.fa-pencil-alt:before { + content: "\f303"; } + +.fa-percent:before { + content: "\f295"; } + +.fa-periscope:before { + content: "\f3da"; } + +.fa-phabricator:before { + content: "\f3db"; } + +.fa-phoenix-framework:before { + content: "\f3dc"; } + +.fa-phone:before { + content: "\f095"; } + +.fa-phone-square:before { + content: "\f098"; } + +.fa-phone-volume:before { + content: "\f2a0"; } + +.fa-pied-piper:before { + content: "\f2ae"; } + +.fa-pied-piper-alt:before { + content: "\f1a8"; } + +.fa-pied-piper-pp:before { + content: "\f1a7"; } + +.fa-pinterest:before { + content: "\f0d2"; } + +.fa-pinterest-p:before { + content: "\f231"; } + +.fa-pinterest-square:before { + content: "\f0d3"; } + +.fa-plane:before { + content: "\f072"; } + +.fa-play:before { + content: "\f04b"; } + +.fa-play-circle:before { + content: "\f144"; } + +.fa-playstation:before { + content: "\f3df"; } + +.fa-plug:before { + content: "\f1e6"; } + +.fa-plus:before { + content: "\f067"; } + +.fa-plus-circle:before { + content: "\f055"; } + +.fa-plus-square:before { + content: "\f0fe"; } + +.fa-podcast:before { + content: "\f2ce"; } + +.fa-pound-sign:before { + content: "\f154"; } + +.fa-power-off:before { + content: "\f011"; } + +.fa-print:before { + content: "\f02f"; } + +.fa-product-hunt:before { + content: "\f288"; } + +.fa-pushed:before { + content: "\f3e1"; } + +.fa-puzzle-piece:before { + content: "\f12e"; } + +.fa-python:before { + content: "\f3e2"; } + +.fa-qq:before { + content: "\f1d6"; } + +.fa-qrcode:before { + content: "\f029"; } + +.fa-question:before { + content: "\f128"; } + +.fa-question-circle:before { + content: "\f059"; } + +.fa-quora:before { + content: "\f2c4"; } + +.fa-quote-left:before { + content: "\f10d"; } + +.fa-quote-right:before { + content: "\f10e"; } + +.fa-random:before { + content: "\f074"; } + +.fa-ravelry:before { + content: "\f2d9"; } + +.fa-react:before { + content: "\f41b"; } + +.fa-rebel:before { + content: "\f1d0"; } + +.fa-recycle:before { + content: "\f1b8"; } + +.fa-red-river:before { + content: "\f3e3"; } + +.fa-reddit:before { + content: "\f1a1"; } + +.fa-reddit-alien:before { + content: "\f281"; } + +.fa-reddit-square:before { + content: "\f1a2"; } + +.fa-redo:before { + content: "\f01e"; } + +.fa-redo-alt:before { + content: "\f2f9"; } + +.fa-registered:before { + content: "\f25d"; } + +.fa-rendact:before { + content: "\f3e4"; } + +.fa-renren:before { + content: "\f18b"; } + +.fa-reply:before { + content: "\f3e5"; } + +.fa-reply-all:before { + content: "\f122"; } + +.fa-replyd:before { + content: "\f3e6"; } + +.fa-resolving:before { + content: "\f3e7"; } + +.fa-retweet:before { + content: "\f079"; } + +.fa-road:before { + content: "\f018"; } + +.fa-rocket:before { + content: "\f135"; } + +.fa-rocketchat:before { + content: "\f3e8"; } + +.fa-rockrms:before { + content: "\f3e9"; } + +.fa-rss:before { + content: "\f09e"; } + +.fa-rss-square:before { + content: "\f143"; } + +.fa-ruble-sign:before { + content: "\f158"; } + +.fa-rupee-sign:before { + content: "\f156"; } + +.fa-safari:before { + content: "\f267"; } + +.fa-sass:before { + content: "\f41e"; } + +.fa-save:before { + content: "\f0c7"; } + +.fa-schlix:before { + content: "\f3ea"; } + +.fa-scribd:before { + content: "\f28a"; } + +.fa-search:before { + content: "\f002"; } + +.fa-search-minus:before { + content: "\f010"; } + +.fa-search-plus:before { + content: "\f00e"; } + +.fa-searchengin:before { + content: "\f3eb"; } + +.fa-sellcast:before { + content: "\f2da"; } + +.fa-sellsy:before { + content: "\f213"; } + +.fa-server:before { + content: "\f233"; } + +.fa-servicestack:before { + content: "\f3ec"; } + +.fa-share:before { + content: "\f064"; } + +.fa-share-alt:before { + content: "\f1e0"; } + +.fa-share-alt-square:before { + content: "\f1e1"; } + +.fa-share-square:before { + content: "\f14d"; } + +.fa-shekel-sign:before { + content: "\f20b"; } + +.fa-shield-alt:before { + content: "\f3ed"; } + +.fa-ship:before { + content: "\f21a"; } + +.fa-shirtsinbulk:before { + content: "\f214"; } + +.fa-shopping-bag:before { + content: "\f290"; } + +.fa-shopping-basket:before { + content: "\f291"; } + +.fa-shopping-cart:before { + content: "\f07a"; } + +.fa-shower:before { + content: "\f2cc"; } + +.fa-sign-in-alt:before { + content: "\f2f6"; } + +.fa-sign-language:before { + content: "\f2a7"; } + +.fa-sign-out-alt:before { + content: "\f2f5"; } + +.fa-signal:before { + content: "\f012"; } + +.fa-simplybuilt:before { + content: "\f215"; } + +.fa-sistrix:before { + content: "\f3ee"; } + +.fa-sitemap:before { + content: "\f0e8"; } + +.fa-skyatlas:before { + content: "\f216"; } + +.fa-skype:before { + content: "\f17e"; } + +.fa-slack:before { + content: "\f198"; } + +.fa-slack-hash:before { + content: "\f3ef"; } + +.fa-sliders-h:before { + content: "\f1de"; } + +.fa-slideshare:before { + content: "\f1e7"; } + +.fa-smile:before { + content: "\f118"; } + +.fa-snapchat:before { + content: "\f2ab"; } + +.fa-snapchat-ghost:before { + content: "\f2ac"; } + +.fa-snapchat-square:before { + content: "\f2ad"; } + +.fa-snowflake:before { + content: "\f2dc"; } + +.fa-sort:before { + content: "\f0dc"; } + +.fa-sort-alpha-down:before { + content: "\f15d"; } + +.fa-sort-alpha-up:before { + content: "\f15e"; } + +.fa-sort-amount-down:before { + content: "\f160"; } + +.fa-sort-amount-up:before { + content: "\f161"; } + +.fa-sort-down:before { + content: "\f0dd"; } + +.fa-sort-numeric-down:before { + content: "\f162"; } + +.fa-sort-numeric-up:before { + content: "\f163"; } + +.fa-sort-up:before { + content: "\f0de"; } + +.fa-soundcloud:before { + content: "\f1be"; } + +.fa-space-shuttle:before { + content: "\f197"; } + +.fa-speakap:before { + content: "\f3f3"; } + +.fa-spinner:before { + content: "\f110"; } + +.fa-spotify:before { + content: "\f1bc"; } + +.fa-square:before { + content: "\f0c8"; } + +.fa-stack-exchange:before { + content: "\f18d"; } + +.fa-stack-overflow:before { + content: "\f16c"; } + +.fa-star:before { + content: "\f005"; } + +.fa-star-half:before { + content: "\f089"; } + +.fa-staylinked:before { + content: "\f3f5"; } + +.fa-steam:before { + content: "\f1b6"; } + +.fa-steam-square:before { + content: "\f1b7"; } + +.fa-steam-symbol:before { + content: "\f3f6"; } + +.fa-step-backward:before { + content: "\f048"; } + +.fa-step-forward:before { + content: "\f051"; } + +.fa-stethoscope:before { + content: "\f0f1"; } + +.fa-sticker-mule:before { + content: "\f3f7"; } + +.fa-sticky-note:before { + content: "\f249"; } + +.fa-stop:before { + content: "\f04d"; } + +.fa-stop-circle:before { + content: "\f28d"; } + +.fa-stopwatch:before { + content: "\f2f2"; } + +.fa-strava:before { + content: "\f428"; } + +.fa-street-view:before { + content: "\f21d"; } + +.fa-strikethrough:before { + content: "\f0cc"; } + +.fa-stripe:before { + content: "\f429"; } + +.fa-stripe-s:before { + content: "\f42a"; } + +.fa-studiovinari:before { + content: "\f3f8"; } + +.fa-stumbleupon:before { + content: "\f1a4"; } + +.fa-stumbleupon-circle:before { + content: "\f1a3"; } + +.fa-subscript:before { + content: "\f12c"; } + +.fa-subway:before { + content: "\f239"; } + +.fa-suitcase:before { + content: "\f0f2"; } + +.fa-sun:before { + content: "\f185"; } + +.fa-superpowers:before { + content: "\f2dd"; } + +.fa-superscript:before { + content: "\f12b"; } + +.fa-supple:before { + content: "\f3f9"; } + +.fa-sync:before { + content: "\f021"; } + +.fa-sync-alt:before { + content: "\f2f1"; } + +.fa-table:before { + content: "\f0ce"; } + +.fa-tablet:before { + content: "\f10a"; } + +.fa-tablet-alt:before { + content: "\f3fa"; } + +.fa-tachometer-alt:before { + content: "\f3fd"; } + +.fa-tag:before { + content: "\f02b"; } + +.fa-tags:before { + content: "\f02c"; } + +.fa-tasks:before { + content: "\f0ae"; } + +.fa-taxi:before { + content: "\f1ba"; } + +.fa-telegram:before { + content: "\f2c6"; } + +.fa-telegram-plane:before { + content: "\f3fe"; } + +.fa-tencent-weibo:before { + content: "\f1d5"; } + +.fa-terminal:before { + content: "\f120"; } + +.fa-text-height:before { + content: "\f034"; } + +.fa-text-width:before { + content: "\f035"; } + +.fa-th:before { + content: "\f00a"; } + +.fa-th-large:before { + content: "\f009"; } + +.fa-th-list:before { + content: "\f00b"; } + +.fa-themeisle:before { + content: "\f2b2"; } + +.fa-thermometer-empty:before { + content: "\f2cb"; } + +.fa-thermometer-full:before { + content: "\f2c7"; } + +.fa-thermometer-half:before { + content: "\f2c9"; } + +.fa-thermometer-quarter:before { + content: "\f2ca"; } + +.fa-thermometer-three-quarters:before { + content: "\f2c8"; } + +.fa-thumbs-down:before { + content: "\f165"; } + +.fa-thumbs-up:before { + content: "\f164"; } + +.fa-thumbtack:before { + content: "\f08d"; } + +.fa-ticket-alt:before { + content: "\f3ff"; } + +.fa-times:before { + content: "\f00d"; } + +.fa-times-circle:before { + content: "\f057"; } + +.fa-tint:before { + content: "\f043"; } + +.fa-toggle-off:before { + content: "\f204"; } + +.fa-toggle-on:before { + content: "\f205"; } + +.fa-trademark:before { + content: "\f25c"; } + +.fa-train:before { + content: "\f238"; } + +.fa-transgender:before { + content: "\f224"; } + +.fa-transgender-alt:before { + content: "\f225"; } + +.fa-trash:before { + content: "\f1f8"; } + +.fa-trash-alt:before { + content: "\f2ed"; } + +.fa-tree:before { + content: "\f1bb"; } + +.fa-trello:before { + content: "\f181"; } + +.fa-tripadvisor:before { + content: "\f262"; } + +.fa-trophy:before { + content: "\f091"; } + +.fa-truck:before { + content: "\f0d1"; } + +.fa-tty:before { + content: "\f1e4"; } + +.fa-tumblr:before { + content: "\f173"; } + +.fa-tumblr-square:before { + content: "\f174"; } + +.fa-tv:before { + content: "\f26c"; } + +.fa-twitch:before { + content: "\f1e8"; } + +.fa-twitter:before { + content: "\f099"; } + +.fa-twitter-square:before { + content: "\f081"; } + +.fa-typo3:before { + content: "\f42b"; } + +.fa-uber:before { + content: "\f402"; } + +.fa-uikit:before { + content: "\f403"; } + +.fa-umbrella:before { + content: "\f0e9"; } + +.fa-underline:before { + content: "\f0cd"; } + +.fa-undo:before { + content: "\f0e2"; } + +.fa-undo-alt:before { + content: "\f2ea"; } + +.fa-uniregistry:before { + content: "\f404"; } + +.fa-universal-access:before { + content: "\f29a"; } + +.fa-university:before { + content: "\f19c"; } + +.fa-unlink:before { + content: "\f127"; } + +.fa-unlock:before { + content: "\f09c"; } + +.fa-unlock-alt:before { + content: "\f13e"; } + +.fa-untappd:before { + content: "\f405"; } + +.fa-upload:before { + content: "\f093"; } + +.fa-usb:before { + content: "\f287"; } + +.fa-user:before { + content: "\f007"; } + +.fa-user-circle:before { + content: "\f2bd"; } + +.fa-user-md:before { + content: "\f0f0"; } + +.fa-user-plus:before { + content: "\f234"; } + +.fa-user-secret:before { + content: "\f21b"; } + +.fa-user-times:before { + content: "\f235"; } + +.fa-users:before { + content: "\f0c0"; } + +.fa-ussunnah:before { + content: "\f407"; } + +.fa-utensil-spoon:before { + content: "\f2e5"; } + +.fa-utensils:before { + content: "\f2e7"; } + +.fa-vaadin:before { + content: "\f408"; } + +.fa-venus:before { + content: "\f221"; } + +.fa-venus-double:before { + content: "\f226"; } + +.fa-venus-mars:before { + content: "\f228"; } + +.fa-viacoin:before { + content: "\f237"; } + +.fa-viadeo:before { + content: "\f2a9"; } + +.fa-viadeo-square:before { + content: "\f2aa"; } + +.fa-viber:before { + content: "\f409"; } + +.fa-video:before { + content: "\f03d"; } + +.fa-vimeo:before { + content: "\f40a"; } + +.fa-vimeo-square:before { + content: "\f194"; } + +.fa-vimeo-v:before { + content: "\f27d"; } + +.fa-vine:before { + content: "\f1ca"; } + +.fa-vk:before { + content: "\f189"; } + +.fa-vnv:before { + content: "\f40b"; } + +.fa-volume-down:before { + content: "\f027"; } + +.fa-volume-off:before { + content: "\f026"; } + +.fa-volume-up:before { + content: "\f028"; } + +.fa-vuejs:before { + content: "\f41f"; } + +.fa-weibo:before { + content: "\f18a"; } + +.fa-weixin:before { + content: "\f1d7"; } + +.fa-whatsapp:before { + content: "\f232"; } + +.fa-whatsapp-square:before { + content: "\f40c"; } + +.fa-wheelchair:before { + content: "\f193"; } + +.fa-whmcs:before { + content: "\f40d"; } + +.fa-wifi:before { + content: "\f1eb"; } + +.fa-wikipedia-w:before { + content: "\f266"; } + +.fa-window-close:before { + content: "\f410"; } + +.fa-window-maximize:before { + content: "\f2d0"; } + +.fa-window-minimize:before { + content: "\f2d1"; } + +.fa-window-restore:before { + content: "\f2d2"; } + +.fa-windows:before { + content: "\f17a"; } + +.fa-won-sign:before { + content: "\f159"; } + +.fa-wordpress:before { + content: "\f19a"; } + +.fa-wordpress-simple:before { + content: "\f411"; } + +.fa-wpbeginner:before { + content: "\f297"; } + +.fa-wpexplorer:before { + content: "\f2de"; } + +.fa-wpforms:before { + content: "\f298"; } + +.fa-wrench:before { + content: "\f0ad"; } + +.fa-xbox:before { + content: "\f412"; } + +.fa-xing:before { + content: "\f168"; } + +.fa-xing-square:before { + content: "\f169"; } + +.fa-y-combinator:before { + content: "\f23b"; } + +.fa-yahoo:before { + content: "\f19e"; } + +.fa-yandex:before { + content: "\f413"; } + +.fa-yandex-international:before { + content: "\f414"; } + +.fa-yelp:before { + content: "\f1e9"; } + +.fa-yen-sign:before { + content: "\f157"; } + +.fa-yoast:before { + content: "\f2b1"; } + +.fa-youtube:before { + content: "\f167"; } + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.sr-only-focusable:active, .sr-only-focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; } +@font-face { + font-family: 'Font Awesome 5 Brands'; + font-style: normal; + font-weight: normal; + src: url("../webfonts/fa-brands-400.eot"); + src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } + +.fab { + font-family: 'Font Awesome 5 Brands'; } +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 400; + src: url("../webfonts/fa-regular-400.eot"); + src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } + +.far { + font-family: 'Font Awesome 5 Free'; + font-weight: 400; } +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 900; + src: url("../webfonts/fa-solid-900.eot"); + src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } + +.fa, +.fas { + font-family: 'Font Awesome 5 Free'; + font-weight: 900; } diff --git a/docs/webfonts/fa-brands-400.eot b/docs/webfonts/fa-brands-400.eot new file mode 100644 index 0000000..b5abfeb Binary files /dev/null and b/docs/webfonts/fa-brands-400.eot differ diff --git a/docs/webfonts/fa-brands-400.svg b/docs/webfonts/fa-brands-400.svg new file mode 100644 index 0000000..2b28036 --- /dev/null +++ b/docs/webfonts/fa-brands-400.svg @@ -0,0 +1,990 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/webfonts/fa-brands-400.ttf b/docs/webfonts/fa-brands-400.ttf new file mode 100644 index 0000000..9afb0be Binary files /dev/null and b/docs/webfonts/fa-brands-400.ttf differ diff --git a/docs/webfonts/fa-brands-400.woff b/docs/webfonts/fa-brands-400.woff new file mode 100644 index 0000000..189fd74 Binary files /dev/null and b/docs/webfonts/fa-brands-400.woff differ diff --git a/docs/webfonts/fa-brands-400.woff2 b/docs/webfonts/fa-brands-400.woff2 new file mode 100644 index 0000000..1b2fecf Binary files /dev/null and b/docs/webfonts/fa-brands-400.woff2 differ diff --git a/docs/webfonts/fa-regular-400.eot b/docs/webfonts/fa-regular-400.eot new file mode 100644 index 0000000..acd09ed Binary files /dev/null and b/docs/webfonts/fa-regular-400.eot differ diff --git a/docs/webfonts/fa-regular-400.svg b/docs/webfonts/fa-regular-400.svg new file mode 100644 index 0000000..fdaf256 --- /dev/null +++ b/docs/webfonts/fa-regular-400.svg @@ -0,0 +1,363 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/webfonts/fa-regular-400.ttf b/docs/webfonts/fa-regular-400.ttf new file mode 100644 index 0000000..1a09a74 Binary files /dev/null and b/docs/webfonts/fa-regular-400.ttf differ diff --git a/docs/webfonts/fa-regular-400.woff b/docs/webfonts/fa-regular-400.woff new file mode 100644 index 0000000..c76f982 Binary files /dev/null and b/docs/webfonts/fa-regular-400.woff differ diff --git a/docs/webfonts/fa-regular-400.woff2 b/docs/webfonts/fa-regular-400.woff2 new file mode 100644 index 0000000..4cd7573 Binary files /dev/null and b/docs/webfonts/fa-regular-400.woff2 differ diff --git a/docs/webfonts/fa-solid-900.eot b/docs/webfonts/fa-solid-900.eot new file mode 100644 index 0000000..6154a9c Binary files /dev/null and b/docs/webfonts/fa-solid-900.eot differ diff --git a/docs/webfonts/fa-solid-900.svg b/docs/webfonts/fa-solid-900.svg new file mode 100644 index 0000000..516446c --- /dev/null +++ b/docs/webfonts/fa-solid-900.svg @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/webfonts/fa-solid-900.ttf b/docs/webfonts/fa-solid-900.ttf new file mode 100644 index 0000000..e2b9c72 Binary files /dev/null and b/docs/webfonts/fa-solid-900.ttf differ diff --git a/docs/webfonts/fa-solid-900.woff b/docs/webfonts/fa-solid-900.woff new file mode 100644 index 0000000..1730c2d Binary files /dev/null and b/docs/webfonts/fa-solid-900.woff differ diff --git a/docs/webfonts/fa-solid-900.woff2 b/docs/webfonts/fa-solid-900.woff2 new file mode 100644 index 0000000..f652aab Binary files /dev/null and b/docs/webfonts/fa-solid-900.woff2 differ diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..3964602 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,158 @@ +site_name: Documentations +site_description: Project documentation with Markdown. +site_author: bruno@clicclac.info + +#nav: 1 espace après le tiret +#mettre des titres aux pages évite une majuscules auto dans les menus formés à +#partir des noms de fichiers (sauf si camelCase?) + +nav: + - Accueil: index.md + - Linux: + - Index: Linux/index.md + - Archiver / compresser: Linux/archiver.md + - apt-get: Raspberry/apt-get.md + - aptitude: Raspberry/aptitude.md + - Commandes sympas: Linux/commandes.md + - Conditions: Linux/conditions.md + - Editeurs: + - index: Linux/Editeurs/index.md + - nano: Linux/Editeurs/nano.md + - vi: Linux/Editeurs/vi.md + - Executer: Linux/executer.md + - Filtres: Linux/filtres.md + - find: Linux/find.md + - grep: Linux/grep.md + - MàJ sans internet: Linux/maj.md + - Permissions: Linux/permissions.md + - Pipelines: Linux/pipeline.md + - I/O Redirections: Linux/redirections.md + - SCP: Linux/scp.md + - SFTP: Linux/sftp.md + - Shells: Linux/shell.md + - SSH: Linux/ssh.md + - Tail / Head: Linux/tail-head.md + - Variables: Linux/variables.md + - macos: + - Index: macos/index.md + - Bash (exemples): macos/bash_exemples.md + - Exécuter un script Bash: macos/executer_shell_script.md + - Homebrew: + - homebrew: macos/homebrew/brew.md + - homebrew-cask: macos/homebrew/brew-cask.md + - md5: macos/md5.md + - Node.js: + - Index: macos/node/index.md + - Ghost: macos/node/ghost.md + - node-js: macos/node/node-js.md + - nvm: macos/node/nvm.md + - Python: + - Index: macos/python/index.md + - Django: macos/python/Django.md + - pip: macos/python/pip.md + - Python 3: macos/python/python3.md + - Sécurité (Gatekeeper): macos/securite.md + - ssh: + - SSH: macos/ssh/ssh.md + - passwordless: macos/ssh/ssh-passwordless.md + - Touch ID: macos/TouchID.md + - WebServer: + - Index: macos/webserver/index.md + - Apache: macos/webserver/apache.md + - Composer: macos/webserver/composer.md + - erreurs: macos/webserver/errors_apache.md + - mongodb: macos/webserver/mongodb.md + - MySQL: macos/webserver/mysql.md + - PHP: macos/webserver/php.md + - PHP 7.2: macos/webserver/php72.md + - Xhprof: macos/webserver/Xhprof.md + - you have mail: macos/youhavemail.md + - Divers: macos/Divers.md + - Liens: macos/liens.md + - MySQL: + - Index: MySQL/index.md + - Backup: MySQL/Backup.md + - mysqlcheck: MySQL/mysqlcheck.md + - Reset Password: MySQL/Expired-root-Password.md + - Socket error: MySQL/Socket-error.md + - Commandes diverses: MySQL/diverses.md + - Plesk Onyx: + - Index: Plesk/index.md + - Ghost: Plesk/Ghost.md + - Raspberry: + - Index: Raspberry/index.md + - apt-get: Raspberry/apt-get.md + - aptitude: Raspberry/aptitude.md + - Boot et clone: Raspberry/boot.md + - Backup: Raspberry/backup.md + - Pi Desktop: Raspberry/pi-desktop.md + - Réseau: Raspberry/reseau.md + - Divers: Raspberry/divers.md + - Synology: + - Index: Synology/index.md + - bash: Synology/bash.md + - DSM 6: Synology/dsm6.md + - eadir: Synology/eadir.md + - oPKG: + - iPKG (DSM5): Synology/opkg/iPKG5.md + - iPKG (DSM6): Synology/opkg/iPKG6.md + - oPKG: Synology/opkg/oPKG.md + - ownCloud (DSM6): Synology/owncloud.md + - Python 3: Synology/python.md + - Scripts: Synology/scripts.md + - Divers: + - Index: Divers/index.md + - batch: + - Commades DOS (1): Divers/batch/Commandes_DOS.md + - Commades DOS (2): Divers/batch/Commandes_DOS_2.md + - Chromium: Divers/Chromium.md + - git: + - Index: Divers/git/index.md + - git: Divers/git/git.md + - Session de travail avec git: Divers/git/git-session.md + - go: Divers/go.md + - Plex: Divers/plex.md + - Vider le cache DNS: Divers/Vider_cache_DNS.md + - wp-cli: + - Index: Divers/wp-cli/index.md + - cli: Divers/wp-cli/wp_cli.md + - comment: Divers/wp-cli/wp_comment.md + - config: Divers/wp-cli/wp_config.md + - core: Divers/wp-cli/wp_core.md + - db: Divers/wp-cli/wp_db.md + - Installation: Divers/wp-cli/Installation.md + - language: Divers/wp-cli/wp_language.md + - media: Divers/wp-cli/wp_media.md + - package: Divers/wp-cli/wp_package.md + - plugin: Divers/wp-cli/wp_plugin.md + - post: Divers/wp-cli/wp_post.md + - revisions: Divers/wp-cli/wp_revisions.md + - scaffold: Divers/wp-cli/wp_scaffold.md + - Scenarios: Divers/wp-cli/scenarios.md + - search-remplace: Divers/wp-cli/wp_search-replace.md + - site: Divers/wp-cli/wp_site.md + - theme: Divers/wp-cli/wp_theme.md + - user: Divers/wp-cli/wp_user.md + - autres: Divers/wp-cli/autres.md + - MkDocs: mkdocs.md + +theme: + #name: bootstrap + name: material + language: fr + +extra_css: + - stylesheets/fontawesome-all.css + +markdown_extensions: + - codehilite + - pymdownx.magiclink + - pymdownx.mark + - admonition + - fontawesome_markdown + - footnotes + - toc: + permalink: true + +site_dir: central_docs + diff --git a/mkdocs_backup.yml b/mkdocs_backup.yml new file mode 100644 index 0000000..3964602 --- /dev/null +++ b/mkdocs_backup.yml @@ -0,0 +1,158 @@ +site_name: Documentations +site_description: Project documentation with Markdown. +site_author: bruno@clicclac.info + +#nav: 1 espace après le tiret +#mettre des titres aux pages évite une majuscules auto dans les menus formés à +#partir des noms de fichiers (sauf si camelCase?) + +nav: + - Accueil: index.md + - Linux: + - Index: Linux/index.md + - Archiver / compresser: Linux/archiver.md + - apt-get: Raspberry/apt-get.md + - aptitude: Raspberry/aptitude.md + - Commandes sympas: Linux/commandes.md + - Conditions: Linux/conditions.md + - Editeurs: + - index: Linux/Editeurs/index.md + - nano: Linux/Editeurs/nano.md + - vi: Linux/Editeurs/vi.md + - Executer: Linux/executer.md + - Filtres: Linux/filtres.md + - find: Linux/find.md + - grep: Linux/grep.md + - MàJ sans internet: Linux/maj.md + - Permissions: Linux/permissions.md + - Pipelines: Linux/pipeline.md + - I/O Redirections: Linux/redirections.md + - SCP: Linux/scp.md + - SFTP: Linux/sftp.md + - Shells: Linux/shell.md + - SSH: Linux/ssh.md + - Tail / Head: Linux/tail-head.md + - Variables: Linux/variables.md + - macos: + - Index: macos/index.md + - Bash (exemples): macos/bash_exemples.md + - Exécuter un script Bash: macos/executer_shell_script.md + - Homebrew: + - homebrew: macos/homebrew/brew.md + - homebrew-cask: macos/homebrew/brew-cask.md + - md5: macos/md5.md + - Node.js: + - Index: macos/node/index.md + - Ghost: macos/node/ghost.md + - node-js: macos/node/node-js.md + - nvm: macos/node/nvm.md + - Python: + - Index: macos/python/index.md + - Django: macos/python/Django.md + - pip: macos/python/pip.md + - Python 3: macos/python/python3.md + - Sécurité (Gatekeeper): macos/securite.md + - ssh: + - SSH: macos/ssh/ssh.md + - passwordless: macos/ssh/ssh-passwordless.md + - Touch ID: macos/TouchID.md + - WebServer: + - Index: macos/webserver/index.md + - Apache: macos/webserver/apache.md + - Composer: macos/webserver/composer.md + - erreurs: macos/webserver/errors_apache.md + - mongodb: macos/webserver/mongodb.md + - MySQL: macos/webserver/mysql.md + - PHP: macos/webserver/php.md + - PHP 7.2: macos/webserver/php72.md + - Xhprof: macos/webserver/Xhprof.md + - you have mail: macos/youhavemail.md + - Divers: macos/Divers.md + - Liens: macos/liens.md + - MySQL: + - Index: MySQL/index.md + - Backup: MySQL/Backup.md + - mysqlcheck: MySQL/mysqlcheck.md + - Reset Password: MySQL/Expired-root-Password.md + - Socket error: MySQL/Socket-error.md + - Commandes diverses: MySQL/diverses.md + - Plesk Onyx: + - Index: Plesk/index.md + - Ghost: Plesk/Ghost.md + - Raspberry: + - Index: Raspberry/index.md + - apt-get: Raspberry/apt-get.md + - aptitude: Raspberry/aptitude.md + - Boot et clone: Raspberry/boot.md + - Backup: Raspberry/backup.md + - Pi Desktop: Raspberry/pi-desktop.md + - Réseau: Raspberry/reseau.md + - Divers: Raspberry/divers.md + - Synology: + - Index: Synology/index.md + - bash: Synology/bash.md + - DSM 6: Synology/dsm6.md + - eadir: Synology/eadir.md + - oPKG: + - iPKG (DSM5): Synology/opkg/iPKG5.md + - iPKG (DSM6): Synology/opkg/iPKG6.md + - oPKG: Synology/opkg/oPKG.md + - ownCloud (DSM6): Synology/owncloud.md + - Python 3: Synology/python.md + - Scripts: Synology/scripts.md + - Divers: + - Index: Divers/index.md + - batch: + - Commades DOS (1): Divers/batch/Commandes_DOS.md + - Commades DOS (2): Divers/batch/Commandes_DOS_2.md + - Chromium: Divers/Chromium.md + - git: + - Index: Divers/git/index.md + - git: Divers/git/git.md + - Session de travail avec git: Divers/git/git-session.md + - go: Divers/go.md + - Plex: Divers/plex.md + - Vider le cache DNS: Divers/Vider_cache_DNS.md + - wp-cli: + - Index: Divers/wp-cli/index.md + - cli: Divers/wp-cli/wp_cli.md + - comment: Divers/wp-cli/wp_comment.md + - config: Divers/wp-cli/wp_config.md + - core: Divers/wp-cli/wp_core.md + - db: Divers/wp-cli/wp_db.md + - Installation: Divers/wp-cli/Installation.md + - language: Divers/wp-cli/wp_language.md + - media: Divers/wp-cli/wp_media.md + - package: Divers/wp-cli/wp_package.md + - plugin: Divers/wp-cli/wp_plugin.md + - post: Divers/wp-cli/wp_post.md + - revisions: Divers/wp-cli/wp_revisions.md + - scaffold: Divers/wp-cli/wp_scaffold.md + - Scenarios: Divers/wp-cli/scenarios.md + - search-remplace: Divers/wp-cli/wp_search-replace.md + - site: Divers/wp-cli/wp_site.md + - theme: Divers/wp-cli/wp_theme.md + - user: Divers/wp-cli/wp_user.md + - autres: Divers/wp-cli/autres.md + - MkDocs: mkdocs.md + +theme: + #name: bootstrap + name: material + language: fr + +extra_css: + - stylesheets/fontawesome-all.css + +markdown_extensions: + - codehilite + - pymdownx.magiclink + - pymdownx.mark + - admonition + - fontawesome_markdown + - footnotes + - toc: + permalink: true + +site_dir: central_docs + diff --git a/mkdocs_base.yml b/mkdocs_base.yml new file mode 100644 index 0000000..c84a0ad --- /dev/null +++ b/mkdocs_base.yml @@ -0,0 +1,43 @@ +site_name: Documentations +site_description: Project documentation with Markdown. +site_author: bruno@clicclac.info + +nav: + - Accueil: index.md + - Linux: + - Index: Linux/index.md + - macos: + - Index: macos/index.md + - WebServer: + - Index: macos/webserver/index.md + - MySQL: + - Index: MySQL/index.md + - Raspberry: + - Index: Raspberry/index.md + - Synology: + - Index: Synology/index.md + - Divers: + - Index: Divers/index.md + - wp-cli: + - Index: Divers/wp-cli.md + - MkDocs: mkdocs.md + +theme: + name: material + language: fr + +extra_css: + - stylesheets/fontawesome-all.css + +markdown_extensions: + - codehilite + - pymdownx.magiclink + - pymdownx.mark + - admonition + - fontawesome_markdown + - footnotes + - toc: + permalink: true + +site_dir: central_docs +