Update 08-12-2019
This commit is contained in:
@@ -354,6 +354,10 @@ https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-c
|
||||
|
||||
```bash
|
||||
$ git remote -v
|
||||
KYMSU https://Bruno21@github.com/Bruno21/kymsu.git (fetch)
|
||||
KYMSU https://Bruno21@github.com/Bruno21/kymsu.git (push)
|
||||
kymsu_dsm bruno@dsm916e:/volume1/Repositories/kymsu_dsm.git (fetch)
|
||||
kymsu_dsm bruno@dsm916e:/volume1/Repositories/kymsu_dsm.git (push)
|
||||
```
|
||||
|
||||
#### [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)
|
||||
@@ -372,6 +376,18 @@ $ git push origin master
|
||||
|
||||
```bash
|
||||
$ git remote show origin
|
||||
|
||||
$ git remote show KYMSU
|
||||
* distante KYMSU
|
||||
URL de rapatriement : https://Bruno21@github.com/Bruno21/kymsu.git
|
||||
URL push : https://Bruno21@github.com/Bruno21/kymsu.git
|
||||
Branche HEAD : master
|
||||
Branche distante :
|
||||
master suivi
|
||||
Branche locale configurée pour 'git pull' :
|
||||
master fusionne avec la distante master
|
||||
Référence locale configurée pour 'git push' :
|
||||
master pousse vers master (à jour)
|
||||
```
|
||||
|
||||
##### Ajouter un dépot distant:
|
||||
@@ -384,14 +400,24 @@ GIT_SSL_NO_VERIFY=true git remote add origin ssh://bruno@192.168.1.7:42666/volum
|
||||
|
||||
### Etiquettes:
|
||||
|
||||
[https://git-scm.com/book/fr/v2/Les-bases-de-Git-Étiquetage](https://git-scm.com/book/fr/v2/Les-bases-de-Git-Étiquetage)
|
||||
|
||||
#### Lister les étiquettes
|
||||
|
||||
```bash
|
||||
$ git tag
|
||||
|
||||
$ git tag -l 'v1.4.2.*'
|
||||
$ git tag -l 'v1.4.2*'
|
||||
v1.4.2
|
||||
v1.4.2-rc0
|
||||
v1.4.2-rc1
|
||||
v1.4.2-rc2
|
||||
```
|
||||
|
||||
|
||||
|
||||
Il existe 2 types d'étiquettes: légère ou annotée.
|
||||
|
||||
#### Créer des étiquettes annotées
|
||||
|
||||
```bash
|
||||
@@ -401,13 +427,95 @@ $ git tag -a v1.4 -m 'my version 1.4'
|
||||
# -m message d'étiquetage
|
||||
```
|
||||
|
||||
../..
|
||||
#### Créer des étiquettes légères
|
||||
|
||||
```bash
|
||||
# ne pas utiliser les options -a, -m et -s
|
||||
|
||||
$ git tag v1.4
|
||||
```
|
||||
|
||||
#### Voir les données de l'étiquette
|
||||
|
||||
```bash
|
||||
$ git show v1.0
|
||||
tag v1.0
|
||||
Tagger: Bruno 21 <bruno@clicclac.info>
|
||||
Date: Sun Dec 8 08:47:05 2019 +0100
|
||||
|
||||
version 1.0
|
||||
|
||||
commit 1f8e7c7c4d2b7337eb28816d92fa31ed26c6d656 (HEAD -> master, tag: v1.0, KYMSU/master)
|
||||
Author: Bruno 21 <bruno@clicclac.info>
|
||||
Date: Sun Dec 8 08:04:54 2019 +0100
|
||||
```
|
||||
|
||||
#### Tagger une ancienne version
|
||||
|
||||
On récupère le commit de la version: eaeda19
|
||||
|
||||
```bash
|
||||
$ git log --pretty=oneline
|
||||
1f8e7c7c4d2b7337eb28816d92fa31ed26c6d656 (HEAD -> master, tag: v1.0, KYMSU/master) Update README.md
|
||||
8497b0d0d560ad782643b0b8a4ef096d03692f1f (kymsu_dsm/master) pecl.sh
|
||||
d076210d4f1883504dbed7a707201944dc52af75 homebrew.sh
|
||||
ce5fa6e908fb8b3545a83f894e42920e3b913cc9 homebrew.sh
|
||||
5dab2b9d33632f343f914b0e9f670fc5fff0122b homebrew.sh
|
||||
e8a6b02a95d7e9a3f5166b1524f420acf15fb4d4 Homebrew - Pinned package support
|
||||
f354d0b6990be2ec8841b133901b3ff3557089fb homebrew.sh
|
||||
4399d440ec8747745b8ec817b57024234e75cd8f homebrew.sh
|
||||
f678d88c78737dcfa734979b5c93465b28d2bc8e Bugfix
|
||||
d0898cb1e44b898cbceb67c1912c32ab013f3026 Bugfix - amélioration
|
||||
eaeda193d6c76cca30e7346a6355ad77311d860f LaunchAgent
|
||||
```
|
||||
|
||||
On tag le commit
|
||||
|
||||
```bash
|
||||
git tag -a v0.9 -m 'pré-version' eaeda19
|
||||
```
|
||||
|
||||
```bash
|
||||
$ git tag
|
||||
v0.9
|
||||
v1.0
|
||||
```
|
||||
|
||||
#### Partager les étiquettes
|
||||
|
||||
Par défaut, la commande `git push` ne transfère pas les étiquettes vers les serveurs distants. Il faut explicitement pousser les étiquettes après les avoir créées localement.
|
||||
|
||||
`git remote -v` pour obtenir le nom court du dépot distant.
|
||||
|
||||
```bash
|
||||
# Pousser 1 tag précis
|
||||
|
||||
$ git push KYMSU v0.9
|
||||
Énumération des objets: 1, fait.
|
||||
Décompte des objets: 100% (1/1), fait.
|
||||
Écriture des objets: 100% (1/1), 163 octets | 81.00 Kio/s, fait.
|
||||
Total 1 (delta 0), réutilisés 0 (delta 0)
|
||||
To https://github.com/Bruno21/kymsu.git
|
||||
* [new tag] v0.9 -> v0.9
|
||||
|
||||
# Pousser tous les tags
|
||||
|
||||
$ git push KYMSU --tags
|
||||
Énumération des objets: 1, fait.
|
||||
Décompte des objets: 100% (1/1), fait.
|
||||
Écriture des objets: 100% (1/1), 158 octets | 158.00 Kio/s, fait.
|
||||
Total 1 (delta 0), réutilisés 0 (delta 0)
|
||||
To https://github.com/Bruno21/kymsu.git
|
||||
* [new tag] v1.0 -> v1.0
|
||||
```
|
||||
|
||||
Dans **Tower**: push -> options -> Push All Tags
|
||||
|
||||
|
||||
|
||||
### Branches:
|
||||
|
||||
https://git-scm.com/book/fr/v1/Les-branches-avec-Git-Ce-qu-est-une-branche
|
||||
https://git-scm.com/book/fr/v2/Les-branches-avec-Git-Les-branches-en-bref
|
||||
|
||||
#### Gérer les branches
|
||||
|
||||
|
||||
@@ -2,45 +2,198 @@
|
||||
|
||||
|
||||
|
||||
### [nyae]?
|
||||
[The Z Shell Manual](http://zsh.sourceforge.net/Doc/Release/index.html#Top)
|
||||
|
||||
`n`: **n**o. Ne corrige pas et exécute la commande entrée.
|
||||
|
||||
|
||||
#### Fichiers de configurations:
|
||||
|
||||
* ~/.zshenv : contient les variables de l'environnement
|
||||
* ~/.zshrc : contient les aliases, les options (setopt), les fonctions, les zstyles…
|
||||
* ~/.zlogin : contient des commandes executées aprés le login.
|
||||
* ~/.zlogout : contient des commandes executées lors de la fermeture logout.
|
||||
|
||||
|
||||
|
||||
Globbing
|
||||
|
||||
```bash
|
||||
[bruno@silverbook/~] $ lx
|
||||
zsh: correct 'lx' to 'ls' [nyae]? n
|
||||
zsh: command not found: lx
|
||||
|
||||
# list every file directly below the zsh_demo folder
|
||||
ls zsh_demo
|
||||
|
||||
# list every file in the folders directly below the zsh_demo folder
|
||||
ls zsh_demo/*
|
||||
|
||||
# list every file in every folder two levels below the zsh_demo folder
|
||||
ls zsh_demo/*/*
|
||||
|
||||
# list every file anywhere below the zsh_demo folder
|
||||
ls zsh_demo/**/*
|
||||
|
||||
# list every file that ends in .txt in every folder at any level below the zsh_demo folder
|
||||
ls zsh_demo/**/*.txt
|
||||
```
|
||||
|
||||
`y`: **y**es. Corrige et exécute la modification suggérée par zsh.
|
||||
Glob operators
|
||||
|
||||
```bash
|
||||
[bruno@silverbook/~] $ lx
|
||||
zsh: correct 'lx' to 'ls' [nyae]? y
|
||||
Applications Movies Sites
|
||||
Applications (Parallels) Music SynologyDrive
|
||||
Brewfile Nextcloud backup_list.conf
|
||||
Cloud OneDrive pCloud Drive
|
||||
Desktop Parallels path
|
||||
Documents Pictures plugins.d
|
||||
Downloads Public project
|
||||
Dropbox PycharmProjects
|
||||
Library Shared with me
|
||||
# list text files that end in a number from 1 to 10
|
||||
ls -l zsh_demo/**/*<1-10>.txt
|
||||
|
||||
# list text files that start with the letter a
|
||||
ls -l zsh_demo/**/[a]*.txt
|
||||
|
||||
# list text files that start with either ab or bc
|
||||
ls -l zsh_demo/**/(ab|bc)*.txt
|
||||
|
||||
# list text files that don't start with a lower or uppercase c
|
||||
ls -l zsh_demo/**/[^cC]*.txt
|
||||
```
|
||||
|
||||
`a`: **a**bort. Ne fait rien et affiche un nouveau prompt.
|
||||
Glob qualifiers
|
||||
|
||||
```bash
|
||||
$ setfile
|
||||
zsh: correct 'setfile' to 'SetFile' [nyae]? a
|
||||
$
|
||||
# show only directories
|
||||
print -l zsh_demo/**/*(/)
|
||||
|
||||
# show only regular files
|
||||
print -l zsh_demo/**/*(.)
|
||||
|
||||
# show empty files
|
||||
ls -l zsh_demo/**/*(L0)
|
||||
|
||||
# show files greater than 3 KB
|
||||
ls -l zsh_demo/**/*(Lk+3)
|
||||
|
||||
# show files modified in the last hour
|
||||
print -l zsh_demo/**/*(mh-1)
|
||||
|
||||
# sort files from most to least recently modified and show the last 3
|
||||
ls -l zsh_demo/**/*(om[1,3])
|
||||
```
|
||||
|
||||
`e`: **e**dit. Editer la ligne.
|
||||
Modifiers
|
||||
|
||||
```bash
|
||||
$ setfile
|
||||
zsh: correct 'setfile' to 'SetFile' [nyae]? e
|
||||
$ setfile|
|
||||
# A plain old glob
|
||||
print -l zsh_demo/data/europe/poland/*.txt
|
||||
|
||||
# Return the file name (t stands for tail)
|
||||
print -l zsh_demo/data/europe/poland/*.txt(:t)
|
||||
|
||||
# Return the file name without the extension (r stands for remove_extension, I think)
|
||||
print -l zsh_demo/data/europe/poland/*.txt(:t:r)
|
||||
|
||||
# Return the extension
|
||||
print -l zsh_demo/data/europe/poland/*.txt(:e)
|
||||
|
||||
# Return the parent folder of the file (h stands for head)
|
||||
print -l zsh_demo/data/europe/poland/*.txt(:h)
|
||||
|
||||
# Return the parent folder of the parent
|
||||
print -l zsh_demo/data/europe/poland/*.txt(:h:h)
|
||||
|
||||
# Return the parent folder of the first file
|
||||
print -l zsh_demo/data/europe/poland/*.txt([1]:h)
|
||||
# Remember you can combine qualifiers and modifiers.
|
||||
```
|
||||
|
||||
### ZLE
|
||||
|
||||
ZLE désigne la zone dans laquelle vous tapez vos commandes. Vous pouvez utiliser les raccourcis claviers de vi ou d'emacs, au choix, et définir très facilement vos propres raccourcis. En vrac, quelques raccourcis par défaut :
|
||||
|
||||
- <Echap>h va appeler la page de manuel du premier mot que vous êtes en train de taper
|
||||
- <Echap>q va copier la ligne que vous étiez en train de taper en mémoire, pour vous laisser devant une ligne vide. Vous pouvez alors rentrer une nouvelle commande, lorsque celle-ci sera terminée, zsh vous affichera la ligne en mémoire.
|
||||
|
||||
|
||||
|
||||
#### Alias suffixes
|
||||
|
||||
```
|
||||
alias -s tex=vim
|
||||
alias -s html=w3m
|
||||
alias -s org=w3m
|
||||
```
|
||||
|
||||
Now pressing return-key after entering *foobar.tex* starts vim with foobar.tex. Calling a html-file runs browser w3m. *www.zsh.org* and pressing enter starts w3m with argument www.zsh.org.
|
||||
|
||||
|
||||
|
||||
#### Alias globaux
|
||||
|
||||
Zsh permet également de définir des alias "globaux" qui s’exécuteront quelle que soit leur position dans la ligne de commande, ainsi:
|
||||
|
||||
```bash
|
||||
alias -g G=' | grep '
|
||||
```
|
||||
|
||||
remplacera la commande
|
||||
|
||||
```bash
|
||||
ls /bin G zsh
|
||||
```
|
||||
|
||||
par
|
||||
|
||||
```bash
|
||||
ls /bin | grep zsh
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
alias -g G='| wc -l'
|
||||
```
|
||||
|
||||
remplacera la commande
|
||||
|
||||
```bash
|
||||
grep alias ~/.zshrc C
|
||||
```
|
||||
|
||||
par
|
||||
|
||||
```bash
|
||||
grep alias ~/.zshrc | wc -l
|
||||
```
|
||||
|
||||
```bash
|
||||
alias -g ...='../..'
|
||||
alias -g ....='../../..'
|
||||
alias -g .....='../../../..'
|
||||
|
||||
alias -g C='| wc -l'
|
||||
|
||||
alias -g DN=/dev/null
|
||||
|
||||
alias -g H='| head'
|
||||
|
||||
alias -g LL="2>&1 | less"
|
||||
alias -g L="| less"
|
||||
alias -g LS='| less -S'
|
||||
|
||||
alias -g NE="2> /dev/null"
|
||||
alias -g NUL="> /dev/null 2>&1"
|
||||
|
||||
alias -g NS='| sort -n'
|
||||
alias -g RNS='| sort -nr'
|
||||
alias -g S='| sort'
|
||||
alias -g US='| sort -u'
|
||||
|
||||
alias -g TL='| tail -20'
|
||||
alias -g T='| tail'
|
||||
|
||||
alias -g X='| xargs'
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Raccourcis:
|
||||
|
||||
ESC - H: Affiche le MAN d'une commande
|
||||
|
||||
|
||||
|
||||
http://grml.org/zsh/zsh-lovers.html
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ Si les chaines sont <u>*différentes*</u> [ STRING1 != STRING2 ]
|
||||
if [ “$userinput” != “$password” ]; then
|
||||
```
|
||||
|
||||
Si la chaine 1 *<u>contient la sous-chaine</u>* chaine 2 [ STRING1 != STRING2 ]
|
||||
Si la chaine 1 *<u>contient la sous-chaine</u>* chaine 2
|
||||
|
||||
```bash
|
||||
if [ “$userinput” == *“$password”* ]; then
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
@@ -25,6 +25,8 @@ sh-4.3#
|
||||
```
|
||||
|
||||
```bash
|
||||
# ok
|
||||
|
||||
bruno@DS916:~ $ sudo -i
|
||||
root@DS916:~#
|
||||
```
|
||||
|
||||
@@ -166,8 +166,6 @@ Package nano (2.9.6-1) is installed on root and has the following files:
|
||||
##### Chercher un paquet:
|
||||
|
||||
```bash
|
||||
bruno@DS916:~ $ sudo opkg search '*php*'
|
||||
|
||||
bruno@DS916:~ $ sudo opkg find '*php*'
|
||||
```
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# 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 {} +
|
||||
```
|
||||
|
||||
@@ -350,3 +350,19 @@ $ HOMEBREW_NO_AUTO_UPDATE=1 brew cask install virtualbox-extension-pack
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Chromium
|
||||
|
||||
```bash
|
||||
$ brew cask list | grep chrom
|
||||
chromium
|
||||
eloston-chromium
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Qlmarkdown et Catalina
|
||||
|
||||
https://github.com/toland/qlmarkdown/issues/89
|
||||
|
||||
|
||||
@@ -102,6 +102,31 @@ $ brew pin <formula>
|
||||
bruno@SilverBook:/usr/local/Cellar/terminal-notifier/1.8.0$ brew pin terminal-notifier
|
||||
```
|
||||
|
||||
```bash
|
||||
$ brew pin php
|
||||
|
||||
$ brew info php
|
||||
php: stable 7.4.0 (bottled) [pinned at 7.3.12]
|
||||
```
|
||||
|
||||
Liste des paquets 'pinned':
|
||||
|
||||
```bash
|
||||
$ brew list --pinned
|
||||
php
|
||||
```
|
||||
|
||||
Essayer de mettre-à-jour un paquet 'pinned':
|
||||
|
||||
```bash
|
||||
$ brew upgrade -n php
|
||||
Error: Not upgrading 1 pinned package:
|
||||
php 7.4.0
|
||||
==> No packages to upgrade
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Re-permettre la m-à-j:
|
||||
|
||||
```bash
|
||||
@@ -206,6 +231,158 @@ Cleaning /usr/local/Cellar/terminal-notifier/1.8.0
|
||||
1 links created for /usr/local/Cellar/terminal-notifier/1.7.1
|
||||
```
|
||||
|
||||
#### Installer une ancienne version d'une formule:
|
||||
|
||||
Exemple avec [annie](https://github.com/iawia002/annie), un téléchargeur de vidéo. La version courante est la dernière (0.9.6)
|
||||
|
||||
```bash
|
||||
~ master*
|
||||
❯ annie -v
|
||||
|
||||
annie: version 0.9.6, A fast, simple and clean video downloader.
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
~ master*
|
||||
❯ cd "$(brew --repo homebrew/core)"
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master
|
||||
❯ git log Formula/annie.rb
|
||||
commit 377c142a619f2b2563c4c01b06f2560707fa3228
|
||||
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
|
||||
Date: Fri Nov 8 10:23:24 2019 +0000
|
||||
|
||||
annie: update 0.9.6 bottle.
|
||||
|
||||
commit e3201eb44c3eade6f113f616b67315ae13f5a70b
|
||||
Author: iawia002 <xuxinzhao@caicloud.io>
|
||||
Date: Fri Nov 8 18:15:49 2019 +0800
|
||||
|
||||
annie 0.9.6
|
||||
|
||||
Closes #46491.
|
||||
|
||||
Signed-off-by: Rui Chen <rchen@meetup.com>
|
||||
|
||||
commit ef762f724ce45afb0007f7d3b96a8f10ceeb3b58
|
||||
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
|
||||
Date: Fri Oct 11 21:56:45 2019 +0000
|
||||
|
||||
annie: update 0.9.5 bottle.
|
||||
|
||||
commit 249669ab6a53335d85d8973c8e82f182903434ca
|
||||
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
|
||||
Date: Tue Aug 13 14:30:19 2019 +0000
|
||||
|
||||
annie: update 0.9.5 bottle.
|
||||
|
||||
commit 5fa1c6903f84cc22c2cbed751de6125cab4fe214
|
||||
Author: iawia002 <xuxinzhao@caicloud.io>
|
||||
Date: Tue Aug 13 22:22:21 2019 +0800
|
||||
|
||||
annie 0.9.5
|
||||
|
||||
Closes #43069.
|
||||
|
||||
Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
|
||||
|
||||
```
|
||||
|
||||
Création d'une nouvelle branche pour l'ancienne version:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master 19s
|
||||
❯ git checkout -b annie-0.9.5 ef762f724ce45afb0007f7d3b96a8f10ceeb3b58
|
||||
Basculement sur la nouvelle branche 'annie-0.9.5'
|
||||
```
|
||||
|
||||
Unlink la version courante:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core annie-0.9.5
|
||||
❯ brew unlink annie
|
||||
Unlinking /usr/local/Cellar/annie/0.9.6... 1 symlinks removed
|
||||
```
|
||||
|
||||
Installation de la version 0.9.5:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core annie-0.9.5
|
||||
❯ HOMEBREW_NO_AUTO_UPDATE=1 brew install annie
|
||||
==> Downloading https://homebrew.bintray.com/bottles/annie-0.9.5.catalina.bottle.tar.gz
|
||||
==> Downloading from https://akamai.bintray.com/06/06ff55a2834ad01a262b66f181a8c99800157ec0f465f80e0cc3518be7ebd1da?__gda__=exp=1575195423~hmac=edc063962f1a5b12a715444b0f1eff
|
||||
######################################################################## 100.0%
|
||||
==> Pouring annie-0.9.5.catalina.bottle.tar.gz
|
||||
🍺 /usr/local/Cellar/annie/0.9.5: 5 files, 8.6MB
|
||||
```
|
||||
|
||||
L'ancienne version 0.9.5 est bien active:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core annie-0.9.5
|
||||
❯ annie -v
|
||||
|
||||
annie: version 0.9.5, A fast, simple and clean video downloader.
|
||||
```
|
||||
|
||||
Retour sur la branche 'master'
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core annie-0.9.5
|
||||
❯ git checkout master
|
||||
Basculement sur la branche 'master'
|
||||
Votre branche est à jour avec 'origin/master'.
|
||||
```
|
||||
|
||||
Suppression de l'ancienne branche 0.9.5
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master
|
||||
❯ git branch -d annie-0.9.5
|
||||
Branche annie-0.9.5 supprimée (précédemment ef762f72).
|
||||
```
|
||||
|
||||
Liste des versions installés:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master
|
||||
❯ brew list annie --versions
|
||||
annie 0.9.6 0.9.5
|
||||
```
|
||||
|
||||
Info sur la formule 'annie'
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master
|
||||
❯ brew info annie
|
||||
annie: stable 0.9.6 (bottled)
|
||||
Fast, simple and clean video downloader
|
||||
https://github.com/iawia002/annie
|
||||
/usr/local/Cellar/annie/0.9.5 (5 files, 8.6MB) *
|
||||
Poured from bottle on 2019-12-01 at 11:05:06
|
||||
/usr/local/Cellar/annie/0.9.6 (5 files, 8.6MB)
|
||||
Poured from bottle on 2019-12-01 at 10:57:11
|
||||
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/annie.rb
|
||||
```
|
||||
|
||||
Changement de version:
|
||||
|
||||
```bash
|
||||
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core master
|
||||
❯ brew switch annie 0.9.6
|
||||
Cleaning /usr/local/Cellar/annie/0.9.6
|
||||
Cleaning /usr/local/Cellar/annie/0.9.5
|
||||
1 links created for /usr/local/Cellar/annie/0.9.6
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Configurer (arguments) une formule:
|
||||
|
||||
```bash
|
||||
@@ -232,7 +409,7 @@ $ brew log <formula>
|
||||
|
||||
#### « keg-only »
|
||||
|
||||
La formule est installée dans Cellar. Elle n’est pas linkée dans /usr/local
|
||||
La formule est installée dans Cellar. Elle n’est pas linkée dans /usr/local (elle n'est pas appelable directement, faire /usr/local/my-command_keg-only)
|
||||
|
||||
<u>Pour la linker:</u>
|
||||
|
||||
@@ -513,6 +690,157 @@ To use the assemblies from other formulae you need to set:
|
||||
|
||||
|
||||
|
||||
### coreutils (GNU Tools)
|
||||
|
||||
Installer la version GNU des outils lignes de commande (OSX utilise la version BSD):
|
||||
|
||||
```bash
|
||||
$ brew install coreutils
|
||||
```
|
||||
|
||||
Les outils GNU sont préfixés par la lettre **g** (**g**ls, **g**cat, **g**chmod...), permettant d'utiliser également leur pendant BSD (ls, cat, chmod...)
|
||||
|
||||
*Les outils GNU sont installés dans /usr/local/bin/*
|
||||
|
||||
*Un alias sans le préfixe **g** est crée dans /usr/local/opt/coreutils/libexec/gnubin/*
|
||||
|
||||
|
||||
|
||||
On peut ajouter le dossier /usr/local/opt/coreutils/libexec/gnubin dans le $PATH. Les outils GNU sont alors disponibles sans préfixe, à la place des outils BSD.
|
||||
|
||||
De même pour les man (`MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"`)
|
||||
|
||||
```bash
|
||||
# AVEC PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
||||
|
||||
❯ which ls
|
||||
/usr/local/opt/coreutils/libexec/gnubin/ls
|
||||
|
||||
❯ which gls
|
||||
/usr/local/bin/gls
|
||||
(gls -> ../Cellar/coreutils/8.31/bin/gls)
|
||||
|
||||
❯ which /bin/ls
|
||||
/bin/ls
|
||||
|
||||
❯ ls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
|
||||
❯ gls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
|
||||
|
||||
# SANS PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
||||
|
||||
❯ which ls
|
||||
/bin/ls
|
||||
|
||||
❯ which gls
|
||||
/usr/local/bin/gls
|
||||
|
||||
❯ which /bin/ls
|
||||
/bin/ls
|
||||
|
||||
❯ ls --version
|
||||
ls: illegal option -- -
|
||||
|
||||
❯ gls --version
|
||||
ls (GNU coreutils) 8.31
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### findutils (GNU Tools)
|
||||
|
||||
Comprend les versions GNU de *find, locate, xargs* (pas de updatedb dans osx )
|
||||
|
||||
```bash
|
||||
$ brew install findutils
|
||||
|
||||
# SANS PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
|
||||
|
||||
$ which find
|
||||
/usr/bin/find
|
||||
|
||||
$ which gfind
|
||||
/usr/local/bin/gfind
|
||||
|
||||
$ gfind --version
|
||||
find (GNU findutils) 4.7.0
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
|
||||
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
|
||||
|
||||
```
|
||||
|
||||
Ajouter `PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"` et `PATH="/usr/local/opt/findutils/libexec/gnuman:$PATH"` au $PATH pour accéder aux commandes sans le préfixe **g**.
|
||||
|
||||
|
||||
|
||||
<u>Autres paquets GNU:</u>
|
||||
|
||||
- gnu-getopt (keg-only)
|
||||
- gnutls
|
||||
- grep (ggrep)(`PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"`)
|
||||
- moreutils (https://joeyh.name/code/moreutils/)
|
||||
- gnu-sed
|
||||
- gawk
|
||||
- gnu-tar
|
||||
- ...
|
||||
|
||||
|
||||
|
||||
### Erreurs:
|
||||
|
||||
**`require': cannot load such file -- active_support/core_ext/object/blank (LoadError)**
|
||||
|
||||
```bash
|
||||
# Erreur sur chaque commande brew...
|
||||
|
||||
% brew doctor
|
||||
Traceback (most recent call last):
|
||||
4: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
|
||||
3: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
|
||||
2: from /usr/local/Homebrew/Library/Homebrew/global.rb:13:in `<top (required)>'
|
||||
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
|
||||
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- active_support/core_ext/object/blank (LoadError)
|
||||
|
||||
|
||||
```
|
||||
|
||||
Lancer **brew update-reset** pour réparer:
|
||||
|
||||
```bash
|
||||
% brew update-reset
|
||||
==> Fetching /usr/local/Homebrew...
|
||||
remote: Enumerating objects: 38, done.
|
||||
remote: Counting objects: 100% (38/38), done.
|
||||
remote: Compressing objects: 100% (31/31), done.
|
||||
remote: Total 38 (delta 5), reused 31 (delta 2), pack-reused 0
|
||||
Unpacking objects: 100% (38/38), done.
|
||||
From https://github.com/Homebrew/brew
|
||||
|
||||
* [new branch] dependabot/bundler/Library/Homebrew/rubocop-rspec-1.37.0 -> origin/dependabot/bundler/Library/Homebrew/rubocop-rspec-1.37.0
|
||||
|
||||
==> Resetting /usr/local/Homebrew...
|
||||
Branch 'master' set up to track remote branch 'master' from 'origin'.
|
||||
Reset branch 'master'
|
||||
Your branch is up to date with 'origin/master'.
|
||||
|
||||
==> Fetching /usr/local/Homebrew/Library/Taps/getantibody/homebrew-tap...
|
||||
|
||||
==> Resetting /usr/local/Homebrew/Library/Taps/getantibody/homebrew-tap...
|
||||
Branch 'master' set up to track remote branch 'master' from 'origin'.
|
||||
Reset branch 'master'
|
||||
Your branch is up to date with 'origin/master'.
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Cask:
|
||||
|
||||
### [:fa-link: Homebrew-Cask](brew-cask.md)
|
||||
@@ -59,6 +59,16 @@ export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
```
|
||||
|
||||
#### Mettre à jour:
|
||||
|
||||
Relancer le script d'installation
|
||||
|
||||
```bash
|
||||
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Utilisation:
|
||||
@@ -79,6 +89,17 @@ $ nvm install 6
|
||||
$ nvm install --lts=dubnium
|
||||
```
|
||||
|
||||
Mettre à jour NodeJS et réinstaller les paquets.
|
||||
|
||||
```bash
|
||||
Latest version:
|
||||
nvm install node --reinstall-packages-from=node
|
||||
Stable (LTS) version:
|
||||
nvm install lts/* --reinstall-packages-from=node
|
||||
|
||||
# nvm install node --reinstall-packages-from=$(nvm current)
|
||||
```
|
||||
|
||||
Liste des versions de Node installées:
|
||||
|
||||
```bash
|
||||
@@ -97,6 +118,22 @@ lts/boron -> v6.14.4 (-> N/A)
|
||||
lts/carbon -> v8.11.4
|
||||
```
|
||||
|
||||
Liste des versions de Node installables:
|
||||
|
||||
```bash
|
||||
$ nvm ls-remote
|
||||
v0.1.14
|
||||
v0.1.15
|
||||
.../...
|
||||
v12.12.0
|
||||
v12.13.0 (LTS: Erbium)
|
||||
-> v12.13.1 (Latest LTS: Erbium)
|
||||
v13.0.0
|
||||
v13.0.1
|
||||
v13.1.0
|
||||
v13.2.0
|
||||
```
|
||||
|
||||
Versions téléchargées:
|
||||
|
||||
```bash
|
||||
@@ -153,6 +190,16 @@ $ nvm install --lts=dubnium
|
||||
Now using node v10.15.0 (npm v6.4.1)
|
||||
|
||||
$ nvm reinstall-packages 8
|
||||
|
||||
# update 12.13.1 depuis 12.13.0
|
||||
$ nvm reinstall-packages 12.13.0
|
||||
```
|
||||
|
||||
Désinstaller une version de Node:
|
||||
|
||||
```bash
|
||||
$ nvm uninstall 10.16.2
|
||||
Uninstalled node v10.16.2
|
||||
```
|
||||
|
||||
Les paquets sont installés dans:
|
||||
|
||||
@@ -157,6 +157,8 @@ Rajouter ce bloc pour chaque Virtual Host.
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
https://deliciousbrains.com/https-locally-without-browser-privacy-errors/
|
||||
|
||||
|
||||
|
||||
### Générer un certificat auto-signé:
|
||||
@@ -307,7 +309,7 @@ $ sudo apachectl start
|
||||
`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:
|
||||
Dans `httpd.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"`
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ On installe un petit utilitaire [PHP Switcher Script](https://gist.github.com/rh
|
||||
$ curl -L https://gist.githubusercontent.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
|
||||
$ chmod +x /usr/local/bin/sphp
|
||||
|
||||
|
||||
https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw/b51e5f561dc6492249ac167813b9b40dcdd72bd0/sphp.sh
|
||||
```
|
||||
|
||||
Ensuite. pour changer de version:
|
||||
Ensuite pour changer de version:
|
||||
|
||||
```bash
|
||||
$ sphp 7.3
|
||||
@@ -106,6 +106,26 @@ xdebug.remote_port=9000
|
||||
|
||||
```
|
||||
|
||||
#### Installer l'extension ssh2:
|
||||
|
||||
```bash
|
||||
$ brew install libssh2
|
||||
|
||||
$ cd ~/Downloads
|
||||
$ git clone https://git.php.net/repository/pecl/networking/ssh2.git
|
||||
$ cd ssh2
|
||||
$ phpize
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
$ cd /usr/local/etc/php/7.3/conf.d
|
||||
$ nano ext-ssh2.ini
|
||||
|
||||
Ajouter au fichier:
|
||||
extension="ssh2.so"
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Erreurs:
|
||||
|
||||
Reference in New Issue
Block a user