04-03-2022
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
nvm est un gestionnaire de version pour Node.
|
||||
[nvm](https://github.com/nvm-sh/nvm) est un gestionnaire de version pour Node.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ lrwxr-xr-x 42 bruno staff 17 aoû 10:47 17 aoû 10:47 python3.9@
|
||||
.rwxr-xr-x 245 bruno staff 17 aoû 10:47 17 aoû 10:47 uvicorn*
|
||||
```
|
||||
|
||||
Les applis sont linkées dans `$HOME/.local/bin`
|
||||
|
||||
```bash
|
||||
$ which soco
|
||||
/Users/bruno/.local/bin/soco
|
||||
@@ -125,7 +127,8 @@ apps are exposed on your $PATH at /Users/bruno/.local/bin
|
||||
#### Installer un paquet dans un environnement virtuel:
|
||||
|
||||
```bash
|
||||
$ pipx inject mkdocs mkdocs-material mkdocs-material-extensions mkdocs-minify-plugin mkdocs-git-revision-date-localized-plugin mkdocs-pdf-export-plugin fontawesome_markdown
|
||||
$ pipx inject mkdocs mkdocs-material mkdocs-material-extensions mkdocs-minify-plugin mkdocs-git-revision-date-localized-plugin mkdocs-pdf-export-plugin fontawesome_markdown markdown pymdown-extensions
|
||||
|
||||
injected package mkdocs-material into venv mkdocs
|
||||
done! ✨ 🌟 ✨
|
||||
injected package mkdocs-material-extensions into venv mkdocs
|
||||
@@ -138,6 +141,11 @@ done! ✨ 🌟 ✨
|
||||
done! ✨ 🌟 ✨
|
||||
injected package fontawesome-markdown into venv mkdocs
|
||||
done! ✨ 🌟 ✨
|
||||
injected package markdown into venv mkdocs
|
||||
done! ✨ 🌟 ✨
|
||||
injected package pymdown-extensions into venv mkdocs
|
||||
done! ✨ 🌟 ✨
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -159,7 +167,7 @@ mkdocs-git-revision-date-localized-plugin is already at latest version 0.9.2 (lo
|
||||
mkdocs-material is already at latest version 7.2.4 (location: /Users/bruno/.local/pipx/venvs/mkdocs)
|
||||
mkdocs-material-extensions is already at latest version 1.0.1 (location: /Users/bruno/.local/pipx/venvs/mkdocs)
|
||||
mkdocs-minify-plugin is already at latest version 0.4.0 (location: /Users/bruno/.local/pipx/venvs/mkdocs)
|
||||
mkdocs-pdf-export-plugin is already at latest version 0.5.8 (location: /Users/bruno/.local/pipx/venvs/mkdocs)p
|
||||
mkdocs-pdf-export-plugin is already at latest version 0.5.8 (location: /Users/bruno/.local/pipx/venvs/mkdocs)
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -178,6 +186,27 @@ uninstalled glances! ✨ 🌟 ✨
|
||||
|
||||
|
||||
|
||||
#### Reinstaller:
|
||||
|
||||
En réinstallant un paquet, on met aussi à jour sa version de Python.
|
||||
|
||||
```bash
|
||||
$ pipx list
|
||||
package pycowsay 0.0.0.1, installed using Python 3.9.6
|
||||
- pycowsay
|
||||
```
|
||||
|
||||
```bash
|
||||
$ pipx reinstall pycowsay
|
||||
uninstalled pycowsay! ✨ 🌟 ✨
|
||||
installed package pycowsay 0.0.0.1, installed using Python 3.10.2
|
||||
These apps are now globally available
|
||||
- pycowsay
|
||||
done! ✨ 🌟 ✨
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Aide:
|
||||
|
||||
```bash
|
||||
@@ -185,3 +214,8 @@ $ pipx --help
|
||||
$ pipx <commande> --help
|
||||
```
|
||||
|
||||
|
||||
|
||||
The HTML specification is maintained by the W3C.
|
||||
|
||||
--8<-- "includes/abbreviations.md"
|
||||
|
||||
110
docs/macos/rust.md
Normal file
110
docs/macos/rust.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# rust
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install rustup-init
|
||||
```
|
||||
|
||||
Installer le compilateur et Cargo, le gestionnaire de paquet:
|
||||
|
||||
```bash
|
||||
$ rustup-init
|
||||
|
||||
Welcome to Rust!
|
||||
|
||||
This will download and install the official compiler for the Rust
|
||||
programming language, and its package manager, Cargo.
|
||||
|
||||
Rustup metadata and toolchains will be installed into the Rustup
|
||||
home directory, located at:
|
||||
|
||||
/Users/bruno/.rustup
|
||||
|
||||
This can be modified with the RUSTUP_HOME environment variable.
|
||||
|
||||
The Cargo home directory located at:
|
||||
|
||||
/Users/bruno/.cargo
|
||||
|
||||
This can be modified with the CARGO_HOME environment variable.
|
||||
|
||||
The cargo, rustc, rustup and other commands will be added to
|
||||
Cargo's bin directory, located at:
|
||||
|
||||
/Users/bruno/.cargo/bin
|
||||
|
||||
This path will then be added to your PATH environment variable by
|
||||
modifying the profile files located at:
|
||||
|
||||
/Users/bruno/.profile
|
||||
/Users/bruno/.bash_profile
|
||||
/Users/bruno/.bashrc
|
||||
/Users/bruno/.zshenv
|
||||
|
||||
You can uninstall at any time with rustup self uninstall and
|
||||
these changes will be reverted.
|
||||
|
||||
Current installation options:
|
||||
|
||||
|
||||
default host triple: aarch64-apple-darwin
|
||||
default toolchain: stable (default)
|
||||
profile: default
|
||||
modify PATH variable: yes
|
||||
|
||||
1) Proceed with installation (default)
|
||||
2) Customize installation
|
||||
3) Cancel installation
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Installer kiro-editor:
|
||||
|
||||
```bash
|
||||
$ cargo install kiro-editor
|
||||
Updating crates.io index
|
||||
Downloaded kiro-editor v0.4.3
|
||||
Downloaded 1 crate (38.2 KB) in 1.59s
|
||||
Installing kiro-editor v0.4.3
|
||||
Downloaded dirs-sys-next v0.1.2
|
||||
Downloaded getopts v0.2.21
|
||||
Downloaded term_size v0.3.2
|
||||
Downloaded unicode-width v0.1.9
|
||||
Downloaded termios v0.3.3
|
||||
Downloaded term v0.7.0
|
||||
Downloaded jemallocator v0.3.2
|
||||
Downloaded libc v0.2.117
|
||||
Downloaded jemalloc-sys v0.3.2
|
||||
Downloaded signal-hook-registry v1.4.0
|
||||
Downloaded signal-hook v0.3.13
|
||||
Downloaded fs_extra v1.2.0
|
||||
Downloaded cfg-if v1.0.0
|
||||
Downloaded cc v1.0.72
|
||||
Downloaded dirs-next v2.0.0
|
||||
Downloaded 15 crates (2.2 MB) in 0.68s (largest was `jemalloc-sys` at 1.3 MB)
|
||||
Compiling libc v0.2.117
|
||||
Compiling fs_extra v1.2.0
|
||||
Compiling cc v1.0.72
|
||||
Compiling cfg-if v1.0.0
|
||||
Compiling signal-hook v0.3.13
|
||||
Compiling unicode-width v0.1.9
|
||||
Compiling getopts v0.2.21
|
||||
Compiling jemalloc-sys v0.3.2
|
||||
Compiling dirs-sys-next v0.1.2
|
||||
Compiling signal-hook-registry v1.4.0
|
||||
Compiling termios v0.3.3
|
||||
Compiling term_size v0.3.2
|
||||
Compiling dirs-next v2.0.0
|
||||
Compiling term v0.7.0
|
||||
Compiling jemallocator v0.3.2
|
||||
Compiling kiro-editor v0.4.3
|
||||
Finished release [optimized + debuginfo] target(s) in 1m 05s
|
||||
Installing /Users/bruno/.cargo/bin/kiro
|
||||
Installed package `kiro-editor v0.4.3` (executable `kiro`)
|
||||
|
||||
```
|
||||
|
||||
@@ -93,6 +93,12 @@ Sur le serveur, vérifier les autorisations:
|
||||
[server]$ chmod 600 ~/.ssh/*
|
||||
```
|
||||
|
||||
Ainsi que le dossier Users:
|
||||
|
||||
```bash
|
||||
$ chmod go-w sur-le-sentier.fr/
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Ajouter la passphrase à SSH-agent.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
##### Ouvrir une page man dans un fenêtre spécifique:
|
||||
#### Ouvrir une page man dans un fenêtre spécifique:
|
||||
|
||||
```bash
|
||||
$ open x-man-page://ls
|
||||
@@ -11,7 +11,9 @@ $ open x-man-page://ls
|
||||
function xmanpage() { open x-man-page://$@ ; }
|
||||
```
|
||||
|
||||
##### Ouvrir une page man dans Aperçu:
|
||||
|
||||
|
||||
#### Ouvrir une page man dans Aperçu:
|
||||
|
||||
```bash
|
||||
$ man -t ls | open -f -a "Preview"
|
||||
@@ -20,7 +22,9 @@ $ man -t ls | open -f -a "Preview"
|
||||
function preman() { man -t "$@" | open -f -a "Preview" ;}
|
||||
```
|
||||
|
||||
##### Obtenir le chemin de la fenêtre courante du Finder:
|
||||
|
||||
|
||||
#### Obtenir le chemin de la fenêtre courante du Finder:
|
||||
|
||||
```bash
|
||||
$ osascript -e 'tell app "Finder" to get posix path of ((target of window 1) as alias)'
|
||||
@@ -49,6 +53,27 @@ alias cdf='pwdf; cd "$(pwdf)"'
|
||||
|
||||
|
||||
|
||||
#### Erreur: 'zsh: operation not permitted'
|
||||
|
||||
```bash
|
||||
zsh: operation not permitted: /Users/bruno/.local/bin/convert-videos-for-plex.sh
|
||||
```
|
||||
|
||||
Le script est peut-être en quarantaine:
|
||||
|
||||
```bash
|
||||
$ xattr -l /Users/bruno/.local/bin/convert-videos-for-plex.sh
|
||||
com.apple.quarantine
|
||||
```
|
||||
|
||||
Pour supprimer la quarantaine:
|
||||
|
||||
```bash
|
||||
$ xattr -d com.apple.quarantine /Users/bruno/.local/bin/convert-videos-for-plex.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Raccourcis:
|
||||
|
||||
Aller en début de ligne: `CTRL+A`
|
||||
|
||||
124
docs/macos/terminal/xattr.md
Normal file
124
docs/macos/terminal/xattr.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# xattr
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
alubook:Custom bruno$ ls -la
|
||||
total 7960
|
||||
drwxr-xr-x 18 bruno staff 612 24 déc 09:11 .
|
||||
drwx------+ 92 bruno staff 3128 24 déc 09:05 ..
|
||||
-rw-r--r--@ 1 bruno staff 6148 24 déc 09:05 .DS_Store
|
||||
-rw-r--r-- 1 bruno staff 558 7 oct 01:14 Localizable.strings
|
||||
-rw-r--r--@ 1 bruno staff 16836 24 déc 08:28 MacOSX copie.png
|
||||
-rw-r--r-- 1 bruno staff 10284 21 aoû 03:00 MacOSX.png
|
||||
```
|
||||
|
||||
|
||||
|
||||
1er caractère
|
||||
|
||||
- d: dossier
|
||||
|
||||
- -: fichier
|
||||
|
||||
|
||||
|
||||
Dernier caractère:
|
||||
|
||||
- @: extended attributes
|
||||
|
||||
- +: extended security information (acl)
|
||||
|
||||
|
||||
|
||||
Afficher les attributs étendus: `xattr -l <filename>`
|
||||
|
||||
Effacer un attribut étendu: `xattr -d com.apple.quarantine my_jar.jar`
|
||||
|
||||
Effacer tous les attributs étendus: `xattr -c my_jar.jar`
|
||||
|
||||
|
||||
|
||||
#### Affiche les attributs étendus:
|
||||
|
||||
```bash
|
||||
$ xattr tabColor.sh
|
||||
com.apple.TextEncoding
|
||||
com.apple.lastuseddate#PS
|
||||
com.apple.macl
|
||||
com.apple.metadata:_kMDItemUserTags
|
||||
com.apple.metadata:kMDItemDownloadedDate
|
||||
com.apple.metadata:kMDItemWhereFroms
|
||||
com.apple.metadata:kMDLabel_mpkqupmo7cxdxxjnmfdfxofpfe
|
||||
com.apple.quarantine
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Affiche les attributs étendus et leur valeur:
|
||||
|
||||
```bash
|
||||
$ xattr -l tabColor.sh
|
||||
com.apple.TextEncoding: UTF-8;134217984
|
||||
com.apple.lastuseddate#PS: <20><>]
|
||||
com.apple.macl:
|
||||
com.apple.metadata:_kMDItemUserTags: bplist00<30>
|
||||
com.apple.metadata:kMDItemDownloadedDate: bplist00<30>3A<33>Yw<59><77>#<23>
|
||||
|
||||
com.apple.metadata:kMDItemWhereFroms: bplist00<30>_Ahttps://www.admin-linux.fr/wp-content/uploads/2013/09/tabColor.sh
|
||||
|
||||
com.apple.metadata:kMDLabel_mpkqupmo7cxdxxjnmfdfxofpfe: <20>
|
||||
com.apple.quarantine: 0081;00000000;;
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Affiche (-p (print)) la valeur d'un attribut étendu:
|
||||
|
||||
```bash
|
||||
$ xattr -p com.apple.TextEncoding tabColor.sh
|
||||
UTF-8;134217984
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Modifie (-w (write)) la valeur d'un attribut étendu:
|
||||
|
||||
```bash
|
||||
$ xattr -w <attribut> <valeur> tabColor.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Supprime (-d (delete)) l'attribut étendu et sa valeur:
|
||||
|
||||
```bash
|
||||
$ xattr -d <attribut> tabColor.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Supprime (-c (clear)) tous les attributs étendus:
|
||||
|
||||
```bash
|
||||
$ xattr -c tabColor.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Options:
|
||||
|
||||
- `-l`
|
||||
- `-r`: récursive
|
||||
- `-s`
|
||||
- `-v`
|
||||
- `-x`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
https://developer.apple.com/library/archive/documentation/CoreServices/Reference/MetadataAttributesRef/MetadataAttrRef.html#//apple_ref/doc/uid/TP40001691-BCICJDHA
|
||||
|
||||
@@ -684,6 +684,27 @@ WSGIPythonHome "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework
|
||||
|
||||
|
||||
|
||||
### Erreur _apr_bucket:
|
||||
|
||||
```bash
|
||||
dyld[15170]: Symbol not found: _apr_bucket_file_set_buf_size
|
||||
Referenced from: /opt/homebrew/Cellar/httpd/2.4.52/bin/httpd
|
||||
Expected in: /usr/lib/libaprutil-1.0.dylib
|
||||
|
||||
```
|
||||
|
||||
Il faut réinstaller apr-util
|
||||
|
||||
https://stackoverflow.com/questions/69892715/installing-httpd-and-php-in-mac-os-12
|
||||
|
||||
```bash
|
||||
$ brew reinstall apr-util
|
||||
|
||||
$ brew services restart httpd
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Liens:
|
||||
|
||||
[:fa-link: https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions](https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions)
|
||||
|
||||
@@ -8,8 +8,25 @@ $ brew install mariadb
|
||||
$ brew services start mariadb
|
||||
```
|
||||
|
||||
<u>MariaDb est installé ici:</u>
|
||||
|
||||
Mac intel:
|
||||
|
||||
`/usr/local/Cellar/mariadb/10.2.11`
|
||||
|
||||
Mac M1:
|
||||
|
||||
`/opt/homebrew/Cellar/mariadb/10.6.4`
|
||||
|
||||
### Sécuriser l'installation:
|
||||
|
||||
```bash
|
||||
$ sudo /opt/homebrew/bin/mysql_secure_installation
|
||||
|
||||
mysql -u root -p
|
||||
Enter password:
|
||||
```
|
||||
|
||||
### Arrêter MySQL:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -174,6 +174,10 @@ par
|
||||
|
||||
|
||||
|
||||
Si PHP n'est pas interprété, redémarrer le mac.
|
||||
|
||||
|
||||
|
||||
### Changer de version:
|
||||
|
||||
*PHP switcher script*:
|
||||
|
||||
@@ -234,10 +234,18 @@ install ok: channel://pecl.php.net/yaml-2.2.1
|
||||
Extension yaml enabled in php.ini
|
||||
```
|
||||
|
||||
```bash
|
||||
echo $(brew --prefix yaml) | pecl install yaml
|
||||
```
|
||||
|
||||
|
||||
|
||||
PECL a un souci avec l'installation homebrew des macs M1:
|
||||
|
||||
https://stackoverflow.com/a/68138560/12431632
|
||||
|
||||
|
||||
|
||||
Chaque version de PHP a son propre répertoire d'extensions:
|
||||
|
||||
Mac intel:
|
||||
|
||||
Reference in New Issue
Block a user