MaJ du 22-10-2020
This commit is contained in:
@@ -636,7 +636,7 @@ $ brew tap <tapname>
|
||||
$ brew untap <tapname>
|
||||
```
|
||||
|
||||
#### Configuration de Homebrew:
|
||||
#### Configuration de Homebrew (brew config):
|
||||
|
||||
```bash
|
||||
$ brew config
|
||||
@@ -662,6 +662,57 @@ Xcode: 11.3.1
|
||||
XQuartz: 2.7.11 => /opt/X11
|
||||
```
|
||||
|
||||
#### Afficher les formules qui ont le paquet cité comme dépendance (brew uses):
|
||||
|
||||
```bash
|
||||
$ brew uses autoconf
|
||||
asdf autoconf-archive automake crosstool-ng node-build php php@7.2 php@7.3 pyenv ruby-build vice
|
||||
|
||||
# afficher uniquement les paquets installés
|
||||
|
||||
$ brew uses --installed autoconf
|
||||
php php@7.2 php@7.3 pyenv
|
||||
|
||||
$ brew info python@3.7
|
||||
python@3.7: stable 3.7.9 (bottled) [keg-only]
|
||||
Interpreted, interactive, object-oriented programming language
|
||||
https://www.python.org/
|
||||
Not installed
|
||||
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/python@3.7.rb
|
||||
License: Python-2.0
|
||||
==> Dependencies
|
||||
Build: pkg-config ✔
|
||||
Required: gdbm ✔, openssl@1.1 ✔, readline ✔, sqlite ✔, xz ✔
|
||||
```
|
||||
|
||||
#### Voir les dépendances d'un paquet:
|
||||
|
||||
```bash
|
||||
$ brew deps thefuck
|
||||
gdbm
|
||||
openssl@1.1
|
||||
python@3.8
|
||||
readline
|
||||
sqlite
|
||||
xz
|
||||
```
|
||||
|
||||
#### Voir tous les packages installés, ainsi que tous les packages installés qui en dépendent:
|
||||
|
||||
```bash
|
||||
$ brew list -1 | while read cask; do echo -ne "\x1B[1;34m $cask \x1B[0m"; brew uses $cask --installed | awk '{printf(" %s ", $0)}'; echo ""; done
|
||||
annie
|
||||
antibody
|
||||
aom ffmpeg
|
||||
apr apr-util httpd php php@7.2 php@7.3
|
||||
apr-util httpd php php@7.2 php@7.3
|
||||
argon2 php php@7.2 php@7.3
|
||||
argyll-cms displaycal
|
||||
aspell php php@7.2 php@7.3
|
||||
atk gtk+ gtk+3
|
||||
autoconf php php@7.2 php@7.3 pyenv
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Commandes externes:
|
||||
|
||||
@@ -214,6 +214,43 @@ published over a year ago by cohara87 <cohara87@gmail.com>
|
||||
|
||||
|
||||
|
||||
#### Funding:
|
||||
|
||||
```bash
|
||||
2 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
```
|
||||
|
||||
Ce message apparait généralement après la m-à-j d'un package tel Angular, React, Vue...
|
||||
Il demande de lancer la commande `npm fund` pour lister les packages qui demandent des fonds pour continuer leur développement.
|
||||
|
||||
```bash
|
||||
~/Sites/node_modules master* ⇡
|
||||
❯ npm fund
|
||||
/Users/bruno/Sites
|
||||
├─┬ https://opencollective.com/bootstrap
|
||||
│ └── bootstrap@4.5.2
|
||||
└─┬ https://opencollective.com/popperjs
|
||||
└── popper.js@1.16.1
|
||||
```
|
||||
|
||||
Pour éviter ce message:
|
||||
|
||||
```bash
|
||||
# à l'installation:
|
||||
npm install --no-fund <package>
|
||||
|
||||
# configuration globale
|
||||
npm config set fund false --global
|
||||
|
||||
# configuration par package:
|
||||
npm config set fund false
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Packages:
|
||||
|
||||
[Rechercher un package](https://npms.io)
|
||||
|
||||
@@ -94,12 +94,12 @@ Mettre à jour NodeJS et réinstaller les paquets.
|
||||
```bash
|
||||
Latest version:
|
||||
nvm install node --reinstall-packages-from=node
|
||||
# nvm install node && nvm reinstall-packages $(nvm current)
|
||||
# nvm install node && nvm reinstall-packages $(nvm current | sed 's/^.//')
|
||||
|
||||
Stable (LTS) version:
|
||||
nvm install lts/* --reinstall-packages-from=node
|
||||
# nvm install --lts=erbium && nvm reinstall-packages $(nvm current)
|
||||
# nvm install --lts=erbium && nvm reinstall-packages 12.13.1
|
||||
# nvm install --lts=erbium && nvm reinstall-packages $(nvm current | sed 's/^.//')
|
||||
# nvm install --lts=erbium && nvm reinstall-packages 12.18.3
|
||||
```
|
||||
|
||||
Liste des versions de Node installées:
|
||||
@@ -202,6 +202,9 @@ Désinstaller une version de Node:
|
||||
```bash
|
||||
$ nvm uninstall 10.16.2
|
||||
Uninstalled node v10.16.2
|
||||
|
||||
$ nvm uninstall --lts=carbon
|
||||
Uninstalled node v8.17.0
|
||||
```
|
||||
|
||||
Les paquets sont installés dans:
|
||||
|
||||
@@ -219,6 +219,42 @@ $ pip3 install 'tornado~=4.5.2'
|
||||
# Installe une version “==4.5.*” qui est aussi “>=4.5.2”.
|
||||
```
|
||||
|
||||
#### Spécifier la version:
|
||||
|
||||
```bash
|
||||
# Opérateurs: ==, >, >=, <, <=, !=, ~=, ===
|
||||
|
||||
docopt == 0.6.1 # Correspondance de version. La version doit être 0.6.1
|
||||
# exclu pre-releases, post releases, developmental releases et 0.6.1.x maintenance releases.
|
||||
|
||||
docopt == 0.6.* # Correspondance de version. La version doit commencer par 0.6. Idem ~= 0.6.0
|
||||
|
||||
|
||||
keyring >= 4.1.1 # Version minimale 4.1.1
|
||||
coverage != 3.5 # Version Exclue. Tout sauf la version 3.5
|
||||
|
||||
Mopidy-Dirble ~= 1.1 # Compatible release. Idem >= 1.1, == 1.* (>= 1.1 AND == 1.*)
|
||||
# version 1.1 ou plus, mais exclu 2.0 ou plus
|
||||
|
||||
tornado ~= 4.5.3 # Compatible release. Idem >= 4.5.3, == 4.5.*
|
||||
# version 4.5.3 ou plus, mais exclu 4.6.0 ou plus
|
||||
tornado === 4.5.3 # Arbitrary equality (Égalité arbitraire)
|
||||
|
||||
|
||||
# On peut spécifier 2 conditions:
|
||||
|
||||
package >= 1.0, <=2.0 # Version comprise entre 1.0 et 2.0
|
||||
|
||||
|
||||
# Si aucune version n'est spécifiée, la dernière version est installée:
|
||||
|
||||
beautifulsoup4
|
||||
tornado
|
||||
|
||||
```
|
||||
|
||||
[PEP 440](https://www.python.org/dev/peps/pep-0440/#version-specifiers)
|
||||
|
||||
|
||||
|
||||
#### Désinstaller un module:
|
||||
@@ -364,6 +400,14 @@ $ pip3 install --user -U mkdocs-material
|
||||
|
||||
|
||||
|
||||
#### Mettre à jour tous les modules:
|
||||
|
||||
```bash
|
||||
$ pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Chercher un module:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -185,6 +185,24 @@ $ ssh-keygen -l -f ~/.ssh/id_rsa.pub
|
||||
|
||||
|
||||
|
||||
#### Vérifier la passphrase:
|
||||
|
||||
```bash
|
||||
# si la passphrase est correcte, renvoie la clé publique:
|
||||
$ ssh-keygen -y
|
||||
Enter file in which the key is (/Users/bruno/.ssh/id_rsa):
|
||||
Enter passphrase:
|
||||
ssh-rsa AAAAB3N....
|
||||
|
||||
# si la passphrase n'est pas correcte:
|
||||
$ ssh-keygen -y
|
||||
Enter file in which the key is (/Users/bruno/.ssh/id_rsa):
|
||||
Enter passphrase:
|
||||
Load key "/Users/bruno/.ssh/id_rsa": incorrect passphrase supplied to decrypt private key
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Changer la passphrase:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -6,15 +6,19 @@
|
||||
|
||||
[composer](composer.md)
|
||||
|
||||
[PHP](php.md)
|
||||
|
||||
[PHP 7.2](php72)
|
||||
|
||||
[MySQL](mysql)
|
||||
|
||||
[mongodb](mongodb)
|
||||
|
||||
[PHP](php.md)
|
||||
|
||||
[PHP 7.2](php72)
|
||||
|
||||
[PHP 7.3](php73.md)
|
||||
|
||||
[Protéger l'accès à une page par un mot-de-passe](htpasswd.md)
|
||||
|
||||
[Xhprof](Xhprof.md)
|
||||
|
||||
[Protéger l'accès à une page](htpasswd.md)
|
||||
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# PHP 7.2
|
||||
|
||||
|
||||
|
||||
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
|
||||
@@ -106,6 +106,17 @@ xdebug.remote_port=9000
|
||||
|
||||
```
|
||||
|
||||
Chaque version de PHP a son propre répertoire d'extensions:
|
||||
|
||||
```bash
|
||||
/usr/local/lib/php/pecl/20160303 ← 7.1
|
||||
/usr/local/lib/php/pecl/20170718 ← 7.2
|
||||
/usr/local/lib/php/pecl/20180731 ← 7.3
|
||||
/usr/local/lib/php/pecl/20190902 ← 7.4
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Installer une extension (depuis les sources):
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user